@medusajs Built RBAC by hand for MercurJS marketplace modules. Having roles cover custom modules, API routes and admin widgets in core removes a lot of that custom wiring.
@joshsum_ From the coding side, the verifier is the weak link. A green test suite often passes a plausible wrong fix. Most of my time writing coding tasks for AI training goes into tests that catch it. Maybe that deserves its own slot in part 2?
Check cost too. I once traced an N+1 query that took a page from 10s to 700ms. A test that only compares output never sees it.
What's the sneakiest "passes the tests, still wrong" fix you've seen?
A smoke detector that only beeps for burnt toast sleeps through an electrical fire.
That's most test suites when an AI writes the fix. A thread on writing tests that catch wrong fixes:
What helps:
- write the wrong fix yourself first; make sure a test fails on it
- test what the spec promises, not just the happy path
- vary inputs so hard-coding doesn't pay
@owjuhl@medusajs Live vs test payment accounts per environment is config I've wired by hand on every Razorpay and Stripe integration, webhook endpoints included. Making it an environment-level switch removes a whole class of go-live mistakes.
@medusajs@ChatGPT Read-only reports from a prompt make sense. Updating restock lists is a write though. I'd want an approval step or a dry-run diff before it touches inventory.
@jomulr@joinHandshakeAI Curious what separated the envs that moved Terminal-Bench from the ones that didn't. Reviewing coding tasks, the hard part for me is tests that reject plausible-but-wrong fixes. Was verifier quality the main lever?
@owjuhl Agree on storefronts. Integrations are where I'd hedge: the glue code is easy, the edge cases aren't. Duplicate payment webhooks only get handled if someone knows to ask for idempotency.
@mercor@jake_cole1 Does OWE-Bench grade non-functional requirements like performance? An N+1 query passes functional tests fine; fixing one in a production Medusa store took a page from 10s to 700ms.
4/ Same in production: my N+1 fix (10s to 700ms) gave identical output before and after. Only measuring what changed shows it.
What wrong fix do you see AI agents reach for most?
@rodri_shema Idempotency on incoming payment webhooks too, not just the checkout button. Providers retry, and I've had duplicate webhooks hit a live store's order flow. Dedupe on the event ID before any side effect.