Gate deploys on identity capabilities and a reversible release #485

Merged
weichen merged 9 commits from feature/svc-d1-identity-flow into main 2026-10-12 15:41:31 +00:00
Owner

Why: probes, missing identity rows, caller environment, and in-place overwrites still let a failed update leave a mixed instance.

Evidence: unittest of identity, recover, deploy transaction, and pin tests passed (SELF). make test-lifecycle exits 2 without AGENT_PG_TEST_DSN.

Impact: pins Backend 5c26a86 and documents cb7e254. Login and the real combo stay NOT_RUN.

Refs: recovery plan r3.1. Merge after Backend, RDM, and Documents.

Why: probes, missing identity rows, caller environment, and in-place overwrites still let a failed update leave a mixed instance. Evidence: unittest of identity, recover, deploy transaction, and pin tests passed (SELF). make test-lifecycle exits 2 without AGENT_PG_TEST_DSN. Impact: pins Backend 5c26a86 and documents cb7e254. Login and the real combo stay NOT_RUN. Refs: recovery plan r3.1. Merge after Backend, RDM, and Documents.
weichen added 4 commits 2026-10-12 14:45:19 +00:00
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-svc-d1-identity-flow.md; R0=6ba91239e680ef240625dc1e86232c48c4221716.

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

Refs: .task/feature-svc-d1-identity-flow.md
Why: probing identity by running the subcommand still launched old RDM
builds, and ensure on a missing database created an empty one. A batch
update also inherited the caller's AGENT_SYSTEM_* variables.
Evidence: python3 -m unittest tests.test_svc_identity tests.test_svc_recover passed (41 tests, 1 skipped). tests.test_svc_lifecycle_isolation caller-env and restart cases passed.
Impact: capability probes use version --json only. Established instances
refuse a missing identity row until adopt --confirm. update and recover
run each service in a clean environment. serve reads a 0600 serve.env
and does not inherit the caller environment. Backend and documents pins
move to the D1 identity and recovery-plan commits.
Refs: recovery plan r3.1 D1; Backend feature/d1-identity-open; RDM feature/d1-version-json

Co-authored-by: Cursor <cursoragent@cursor.com>
Why: an update that stops the old process and overwrites the binary cannot
get the previous version back, and a migration the old binary cannot read
must be refused before that stop. CI also had no fixed RDM SHA to build from.
Evidence: python3 -m unittest tests.test_svc_identity tests.test_svc_recover tests.test_svc_deploy_txn tests.test_lifecycle_pin passed. make test-lifecycle exits 2 when AGENT_PG_TEST_DSN is unset.
Impact: installs land in releases/<rid> and current switches with mv -T.
Deploy keeps the desired state and rolls back a non-terminal journal.
Schema compatFloor above the installed target is refused unless
--migrate-schema --confirm is paired with a backup. test-lifecycle fails
closed without PostgreSQL and an RDM checkout. Login stays NOT_RUN.
Refs: recovery plan r3.1 D2 and D3; Backend feature/d1-identity-open

Co-authored-by: Cursor <cursoragent@cursor.com>
Record D1-D3 local progress on the task card
ci / test (pull_request) Failing after 2m2s
ci / test-pg (pull_request) Successful in 2m27s
2c88b75ab9
Why: the branches are ready for review but are not merged, so the card
must stay open and say what was verified on the live instances.
Evidence: local commits listed in the card. Companion pages titled RDM 工作台 returned HTTP 200. rdm.ping did not return a domain result. No data was moved.
Impact: documentation only. Login and the real lifecycle suite stay NOT_RUN.
Refs: recovery plan r3.1

Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 15:07:04 +00:00
Merge origin/main into feature/svc-d1-identity-flow
ci / test-pg (pull_request) Successful in 1m52s
ci / test (pull_request) Failing after 2m51s
7cc553d5a3
Why: main already has one release transaction, so this branch keeps that path and only isolates update and recover in a clean child.
Evidence: SELF bash -n scripts/svc.sh; python3 -m unittest identity/recover/deploy/u2/lifecycle pin 92 tests OK (2 skipped), then 66 tests OK after dropping the obsolete journal hook.
Impact: deploy uses releases/ and deploy.journal; the lifecycle child reconciles that journal before deploy or recover. Backend pin is 0f192a4.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 15:13:37 +00:00
Forward stub trace variables into the clean serve process
ci / test-pg (pull_request) Successful in 1m49s
ci / test (pull_request) Successful in 4m11s
797d3248f0
Why: env -i dropped SVC_STUB_*, so recovery tests saw an empty serve record even though the bound DSN was still passed.
Evidence: SELF python3 -m unittest tests.test_svc.SvcDbRecoveryTests tests.test_svc_lifecycle_isolation — 34 tests OK.
Impact: only SVC_STUB_* is added at launch; serve.env still omits them, and caller AGENT_SYSTEM_* stays out of the process.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 15:26:59 +00:00
Merge origin/main into feature/svc-d1-identity-flow
ci / svc-realcombo (pull_request) Failing after 1m55s
ci / test (pull_request) Failing after 2m49s
ci / test-pg (pull_request) Failing after 4m9s
b10406a58f
Why: main gained the real-combination CI gate after the previous sync, and this branch still has to carry that gate with the isolated identity calls.
Evidence: SELF python3 -m unittest recovery/identity/u2/deploy/pin/isolation — 100 tests OK (2 skipped); bash -n scripts/svc.sh.
Impact: identity ensure/verify still pass DSN only through the environment; stop waits for the port and can keep the desired state. CI keeps the lifecycle pin step and the svc-realcombo job.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 15:31:29 +00:00
Pass the exec-tool kill switch into the clean serve process
ci / svc-realcombo (pull_request) Successful in 1m42s
ci / test-pg (pull_request) Failing after 3m21s
ci / test (pull_request) Successful in 4m16s
0a56150d01
Why: env -i dropped RDM_DISABLE_EXEC_TOOLS, so the real RDM binary exited immediately on runners without bwrap, and the capability probe now prints the JSON document.
Evidence: SELF bash -n scripts/svc.sh; python3 -m py_compile tests/test_svc_realcombo.py. GATE run 2656 job 3831 failed on the previous head before this fix.
Impact: serve and the lifecycle child forward that one switch; identity capabilities is checked as protocol 1 JSON.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 15:36:44 +00:00
Migrate PostgreSQL before the identity probe in the real combo
ci / svc-realcombo (pull_request) Successful in 1m44s
ci / test-pg (pull_request) Successful in 3m37s
ci / test (pull_request) Successful in 4m36s
b4eb3a814c
Why: identity ensure no longer creates the schema, so the probe has to follow a real serve that applies migrations.
Evidence: SELF python3 -m py_compile tests/test_svc_realcombo.py. GATE run 2663 job 3839 failed on the previous head with identity table missing.
Impact: the PostgreSQL check still passes the DSN only through the environment, after serve has migrated.
Refs: #485
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit cd61bbb112 into main 2026-10-12 15:41:31 +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#485