Implement U1 I3 DB identity marker (agent_system_identity) #426

Merged
weichen merged 14 commits from feature/recovery-u1-db-identity into main 2026-10-12 05:35:21 +00:00
Owner

Summary

  • Pin Backend for migration v26 + identity ensure|verify + serve gate (AGENT_SYSTEM_INSTANCE_ID) — Backend PR Close the context-engineering task card (#170)
  • Wire scripts/svc.sh start/init: file marker verify → DB ensure → DB verify; export identity env to serve
  • Extend stub + tests/test_svc_identity.py (I3 SQLite ensure / wrong-id blocks); real PG remains NOT_RUN without SVC_TEST_PG
  • Update docs/recovery/u1-identity-manifest.md I3 status

Test plan

  • python3 -m unittest tests.test_svc_identity tests.test_svc_recover (evidence on task card)
  • PR CI GATE (make test + make build)
  • Merge Backend #170 before or with this pin

Task card

.task/feature-recovery-u1-db-identity.md

Refs: U1 design §5.2; parent #415; Backend #170

## Summary - Pin Backend for migration v26 + `identity ensure|verify` + serve gate (`AGENT_SYSTEM_INSTANCE_ID`) — Backend PR #170 - Wire `scripts/svc.sh` start/init: file marker verify → DB ensure → DB verify; export identity env to serve - Extend stub + `tests/test_svc_identity.py` (I3 SQLite ensure / wrong-id blocks); real PG remains NOT_RUN without `SVC_TEST_PG` - Update `docs/recovery/u1-identity-manifest.md` I3 status ## Test plan - [x] `python3 -m unittest tests.test_svc_identity tests.test_svc_recover` (evidence on task card) - [ ] PR CI GATE (`make test` + `make build`) - [ ] Merge Backend #170 before or with this pin ## Task card `.task/feature-recovery-u1-db-identity.md` Refs: U1 design §5.2; parent #415; Backend #170
weichen added 3 commits 2026-10-12 03:53:53 +00:00
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-recovery-u1-db-identity.md; R0=b6307db015da4a3718baadb242c52cb66b024f74.

Impact: task metadata only; the feature workspace starts at b6307db015.

Refs: .task/feature-recovery-u1-db-identity.md
Why: after #415 file markers, startup must also bind
manifest.instance_id to agent_system_identity (I4).
Evidence: python3 -m unittest tests.test_svc_identity
tests.test_svc_recover (OK, 1 skipped NOT_RUN for real PG);
Backend pin b92eaca (PR #170).
Impact: svc ensure/verify + AGENT_SYSTEM_* env; stub identity;
I3 SQLite tests; design doc status; modules/backend gitlink.
Refs: docs/recovery/u1-identity-manifest.md §5.2; Backend #170

Co-authored-by: Cursor <cursoragent@cursor.com>
Record identity suite evidence on the I3 task card
ci / test-pg (pull_request) Failing after 2m13s
ci / test (pull_request) Failing after 2m36s
8d43a9cea5
Why: completion claims need tool-written receipts, not hand copies.
Evidence: IMPORT_RECEIPT of unittest identity+recover (exit 0).
Impact: .task/feature-recovery-u1-db-identity.md evidence table.
Refs: AGENTS.md evidence gate
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 03:54:07 +00:00
Record Dev PR #426 on the I3 task card
ci / test-pg (pull_request) Failing after 2m3s
ci / test (pull_request) Failing after 2m30s
4afb182646
Why: task card and PR description share one document; link must be on-card.
Evidence: Gitea API created pull #426 for feature/recovery-u1-db-identity.
Impact: .task/feature-recovery-u1-db-identity.md header only.
Refs: PR #426; Backend #170
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 04:05:29 +00:00
Merge origin/main into recovery-u1-db-identity and retarget backend pin
ci / test-pg (pull_request) Successful in 1m38s
ci / test (pull_request) Successful in 3m7s
bad29e09da
Why: task-sync hit a submodule conflict; pin must track Backend #170
HEAD after rebase onto main (copyOrder fix).
Evidence: backend 0c79618; origin/main merge completed in worktree.
Impact: modules/backend gitlink; sync with main.
Refs: Backend #170; Dev #426

Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 2 commits 2026-10-12 05:06:06 +00:00
Why: record CI success for review without pushing a new tip that
would retrigger runners (same convention as U1 #415 closeout).
Evidence: Dev #426 bad29e0 test+test-pg success; Backend #170
0c79618 vet-and-test success.
Impact: task card only; push deferred until after merge or explicit.
Refs: PR #426; Backend #170

Co-authored-by: Cursor <cursoragent@cursor.com>
Retarget backend pin to #170 tip after v27 rebase
ci / test-pg (pull_request) Failing after 1m21s
ci / test (pull_request) Successful in 3m9s
9b6bfc1a5b
Why: main claimed migration v26; Backend #170 rebased to e7b70c2
(v27 identity + copyOrder). Dev pin must track that tip.
Evidence: Backend CI success on e7b70c2; mergeable True.
Impact: modules/backend gitlink → e7b70c2.
Refs: Backend PR #170; Dev PR #426

Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 3 commits 2026-10-12 05:07:54 +00:00
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=b431777c9fa9c74f096d7f14fce40d1beba53fe2.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
Why: bind the task validation checkpoint to the latest integration baseline.

Evidence: SELF recursive component checks; sync_base=b431777c9fa9c74f096d7f14fce40d1beba53fe2; candidate=904a8351c7e78195be0567acf02c3a897dc327c8.

Impact: task metadata only.

Refs: .task/feature-recovery-u1-db-identity.md
Note identity migration is v27 after login_keys took v26
ci / test-pg (pull_request) Failing after 1m23s
ci / test (pull_request) Successful in 3m9s
aef689f9e7
Why: Backend #170 rebased; design doc still said v26.
Evidence: local unittest identity+backup OK after task-sync.
Impact: docs/recovery/u1-identity-manifest.md §5.2 version note.
Refs: Backend PR #170; Dev PR #426
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 05:08:35 +00:00
Record post-sync identity suite evidence on the I3 card
ci / test-pg (pull_request) Failing after 1m28s
ci / test (pull_request) Successful in 3m8s
bce5934228
Why: task-sync + Backend #170 v27 tip need SELF evidence on the card.
Evidence: unittest identity+backup exit 0 (skipped=1 PG NOT_RUN).
Impact: task card only.
Refs: .task/feature-recovery-u1-db-identity.md; Dev PR #426
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 05:24:04 +00:00
Clear must_change before API-key use in multi-instance U7
ci / test-pg (pull_request) Successful in 1m28s
ci / test (pull_request) Successful in 3m7s
a5d44df505
Why: Backend login_keys gate blocks Key traffic while
must_change_password is set; U7 failed on PUT settings/user 403.
Evidence: go test -c multi-instance compiles; CI test-pg will GATE.
Impact: loginAlice does session password change alicePass0→alicePass.
Refs: Dev PR #426; Backend #170 pin e7b70c2

Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 2 commits 2026-10-12 05:29:29 +00:00
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=673e687c5c85b9af3ce13ca30845d5e68de5dfa0.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
Record the sync checkpoint
ci / test-pg (pull_request) Successful in 1m52s
ci / test (pull_request) Successful in 3m46s
2634ad1c0a
Why: bind the task validation checkpoint to the latest integration baseline.

Evidence: SELF recursive component checks; sync_base=673e687c5c85b9af3ce13ca30845d5e68de5dfa0; candidate=ee7903344f6f5e954dcb1edd8e02f9b6a3b8544c.

Impact: task metadata only.

Refs: .task/feature-recovery-u1-db-identity.md
weichen merged commit 4bf6e4a0cf into main 2026-10-12 05:35:21 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#426