Why: identity ensure/verify must not create or migrate a database.
Evidence: go test of identity, store, and unknown-subcommand cases passed locally (SELF).
Impact: version --json publishes the capability document, including schema.target and schema.compatFloor.
Refs: recovery plan r3.1 D1/D2
Why: identity ensure/verify must not create or migrate a database.
Evidence: go test of identity, store, and unknown-subcommand cases passed locally (SELF).
Impact: version --json publishes the capability document, including schema.target and schema.compatFloor.
Refs: recovery plan r3.1 D1/D2
Why: identity ensure/verify went through the normal store open, which
creates a database and runs migrations. A deploy gate that calls the
candidate before stopping the old service could migrate production
ahead of the switch, and a missing database was turned into an empty one.
Evidence: go test ./pkg/identity/ ./internal/store/ ./cmd/agent-system/ -run 'TestCapabilities|TestEnsure|TestVerify|TestDSN|TestUsage|TestSystemIdentity|TestOpenIdentity|TestUnknownSubcommand' passed in this worktree.
Impact: identity CLI refuses a missing file or a missing agent_system_identity table, does not migrate, reads DSN from the environment or a 0600 file, and version --json plus identity capabilities emit one capability document. Unknown top-level commands exit 2.
Refs: recovery plan r3.1 D1; Dev feature/svc-d1-identity-flow
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: a rollback can only be safe when the candidate says which schema it
will migrate to and whether older binaries can still read that schema.
A new migration that forgets to register that fact must fail the test.
Evidence: go test ./internal/store/ ./pkg/identity/ -run 'TestMigrationCompat|TestCapabilities' passed.
Impact: version --json and identity capabilities include schema.target and
schema.compatFloor. Every migration version is listed in
migrationBreaksOldReaders. Current versions do not break old readers, so
the floor stays 0.
Refs: recovery plan r3.1 D2
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: main gained AGENT_SYSTEM_DSN fallback in #182 after this branch
was cut. Both changes touch identity DSN parsing.
Evidence: go test ./pkg/identity/ ./internal/store/ ./cmd/agent-system/ for the identity, schema, and unknown-subcommand cases passed after the resolution.
Impact: keeps open-existing identity mode and the 0600 dsn file. Environment
DSN still wins when --dsn is absent, via ResolveDSN.
Refs: Backend #182; recovery plan r3.1 D1
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen
merged commit c6fb13016a into main2026-10-12 15:05:05 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why: identity ensure/verify must not create or migrate a database.
Evidence: go test of identity, store, and unknown-subcommand cases passed locally (SELF).
Impact: version --json publishes the capability document, including schema.target and schema.compatFloor.
Refs: recovery plan r3.1 D1/D2