Repository navigation
Description
From the fourth agent workflow trial (booking, credits and approval tasks). Each app started from its recipe, as plan-feature pointed to store-booking, store-credits and store-approval.
What you were trying to do
Adopt a store recipe into a site created with urlcode init <site> and urlcode extensions add auth store, so that the site ends validate + test + audit ready with the real auth extension.
Where it broke down
The recipe YAML carried over unchanged. The fixtures did not:
- Every recipe fixture names its caller with
Authorization: Bearer <id>, which only the stand-in principal in each recipe README accepts. The README says so and tells the reader to rewrite each caller's requests as astepsfixture that signs in first, and to addauth.userstotests/seed.json. The agent rewrote every case by hand: 22 (booking), 34 (credits) and 38 (approval). A recipe with two users interleaving in onestepslist became a list with a sign-in step each time the caller changes (5, 6 and 7 sign-ins). - The recipe README does not say that the auth mount itself is then a route the audit must cover. On the booking site, the first audit after all fixtures passed answered:
"ready":false,"notReadyReasons":["uncovered-route-methods"], ... "unassertedCases":[2,9,18,20,23],"uncovered":[{"route":"/api/auth/*","method":"GET"},{"route":"/api/auth/*","method":"POST"}], "coverageNotes":[{"code":"unasserted-success","cases":[2,9,18,20,23],"message":"These cases passed with a status below 400 but assert nothing else, so they cover no route: ..."}]
The fix was "expectJson": {"/user/id": "<id>"} on each sign-in and one GET /api/auth/get-session step. The credits and approval sites had it from the start because the agent had just learned it.
urlcode recipes add <name> --out new-directoryonly writes a new directory; there is no way to add a recipe to an existing site'sapp/.
Code or YAML you had to write by hand
No code. The recipe YAML was copied as is (the only edits were dropping comments and shortening route descriptions). The fixtures were rewritten; one sign-in step looks like this, repeated at each change of caller:
{"path": "/api/auth/sign-in/email", "method": "POST", "headers": {"origin": "{{origin}}", "content-type": "application/json"}, "body": "{\"email\":\"[email protected]\",\"password\":\"alice-local-demo-password\"}", "status": 200, "expectJson": {"/user/id": "alice"}}and each recipe's tests/seed.json gained an auth.users list with synthetic accounts for the ids store.members names.
Expected, one of:
- the store recipes ship the signed-in form of their fixtures (or a
requests.auth.jsonbeside the stand-in one) that runs againstextensions add auth, including the asserted sign-in and a coveredGETon the auth mount; or recipes add <name> --into <site>merges the recipe's collections and routes into an existing site and writes signed-in fixtures and seed accounts for it; and- the recipe README's "The fixtures need this stand-in principal" paragraph says the auth mount's own
GETandPOSTthen need an asserting case.
What you could not verify
Whether the audit's unasserted-success note should also name the auth mount's missing GET directly; it listed it under uncovered only. Not checked on the MCP path (search_recipes).
Activity
fix(recipes): auth-gated recipes sign in through the real auth extens…