Skip to content

[Gap]: Store recipes' fixtures run only against the Bearer stand-in; adopting one into an auth site rewrites every case and misses the auth mount's coverage #1001

Closed

Description

@jimhoyd

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 a steps fixture that signs in first, and to add auth.users to tests/seed.json. The agent rewrote every case by hand: 22 (booking), 34 (credits) and 38 (approval). A recipe with two users interleaving in one steps list 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-directory only writes a new directory; there is no way to add a recipe to an existing site's app/.

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.json beside the stand-in one) that runs against extensions add auth, including the asserted sign-in and a covered GET on 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 GET and POST then 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

  1. added
    ai-first
    examples
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstexamples

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions