Skip to content

[Gap]: npm run validate needs urlcode-auth migrate on a fresh site, though test and audit are hermetic #954

Closed

Description

@jimhoyd

From the third agent workflow trial. It happened on all three fresh sites.

What you were trying to do

The generated edit loop on a fresh site: urlcode init, extensions add auth store, write app/urlcode.yaml, then npm run validate.

Where it broke down

npm run validate refuses until the site's own data/auth.sqlite is migrated:

$ npm run validate
> urlcode validate --local --project app --host-file host.mjs --local-review
{"event":"local_review",…}
{"event":"error","message":"Extension \"auth\" failed to activate: auth: Better Auth's tables are not initialized (user, session, account, verification, rateLimit); run npx urlcode-auth migrate","code":"extension-activation","extension":"auth"}

npx urlcode-auth migrate fixes it. The refusal names the fix, and extensions add prints it under Next:. But since #930, npm test and npm run audit never open data/auth.sqlite: each run uses a fresh, seeded database. So validate --local-review is the only local check that still depends on the site's live data. That costs one correction round on every new auth site: all three trial sites hit it.

Expected, one of:

  • validate --local-review activates auth against a throwaway database, as test and audit do;
  • or extensions add auth runs the migration it asks for, since it already writes data/auth.secret.

Code or YAML you had to write by hand

None. The command npx urlcode-auth migrate was run once per site.

What you could not verify

Whether validate intentionally checks the real database so that a serving site's missing migration surfaces early. If so, the generated validate script could say so, or skip that check under --local-review.

Runtime revision and environment

main f850492a (0.6.5), packed install, macOS, Node 26.10.0.

Activity

  1. added
    ai-first
    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-first

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions