Bind svc user CLI to instance manifest and reject flock bypass #429

Merged
weichen merged 11 commits from feature/svc-deploy-u1-account-binding into main 2026-10-12 05:19:39 +00:00
Owner

Summary

  • svc_lock: missing flock / lock timeout → reject (no passthrough)
  • svc <env> user …: resolve manifest/ENV_DATA+DSN, force --open-existing, forbid caller --data/--dsn
  • Tests: tests/test_svc_user_binding.py T1–T5 + identity regression; pin Backend OpenExisting tip

Why

Approved proposal r1 §7 U1; account ops must hit the same storage as start/stop and never fall back to ./data.

Evidence

Impact

Operators use scripts/svc.sh <env> user … against instance storage. Full install binary/source remains U2.

Refs

  • Spec: docs/svc-deploy/u1-instance-account-binding.md
  • Sibling U4 Dev: feature/svc-deploy-u4-login-key

Do not merge — owner double-key. Prefer merge order Backend #171 → Dev U4 → Dev U1 (or pin-compatible).

## Summary - `svc_lock`: missing flock / lock timeout → reject (no passthrough) - `svc <env> user …`: resolve manifest/`ENV_DATA`+DSN, force `--open-existing`, forbid caller `--data/--dsn` - Tests: `tests/test_svc_user_binding.py` T1–T5 + identity regression; pin Backend OpenExisting tip ## Why Approved proposal r1 §7 U1; account ops must hit the same storage as start/stop and never fall back to `./data`. ## Evidence - SELF: `python3 -m unittest tests.test_svc_user_binding tests.test_svc_identity -v` (exit 0) — task card `.task/feature-svc-deploy-u1-account-binding.md` - GATE: this PR CI - Depends on Backend OpenExisting: https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Backend/pulls/171 ## Impact Operators use `scripts/svc.sh <env> user …` against instance storage. Full install binary/source remains U2. ## Refs - Spec: `docs/svc-deploy/u1-instance-account-binding.md` - Sibling U4 Dev: `feature/svc-deploy-u4-login-key` **Do not merge** — owner double-key. Prefer merge order Backend #171 → Dev U4 → Dev U1 (or pin-compatible).
weichen added 5 commits 2026-10-12 03:59:40 +00:00
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-svc-deploy-u1-account-binding.md; R0=9a9665b458916179df6d94066dfb9aa657a13d60.

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

Refs: .task/feature-svc-deploy-u1-account-binding.md
Why: U1 requires account ops to hit manifest data_root/DSN with OpenExisting and refuse missing flock or default ./data.
Evidence: python3 -m unittest tests.test_svc_user_binding (T1–T5) + test_svc_identity
Impact: svc <env> user … calls ENV_BIN with --open-existing; deploy/user fail closed without flock.
Refs: docs/svc-deploy/u1-instance-account-binding.md; Backend OpenExisting (PR #171)
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=ae465d24441ab349c961a55e9b04f8c4ccaf6de8.

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=ae465d24441ab349c961a55e9b04f8c4ccaf6de8; candidate=79f50493ddac51b45f0b044b152110138331aedb.

Impact: task metadata only.

Refs: .task/feature-svc-deploy-u1-account-binding.md
Record U1 svc user-binding test evidence after task-sync
ci / test-pg (pull_request) Failing after 1m55s
ci / test (pull_request) Failing after 3m22s
c7ff9d5afd
Why: Completion gate requires evidence-tool receipts for T1–T5 and identity regression.
Evidence: SELF unittest test_svc_user_binding + test_svc_identity (exit 0)
Impact: Task card ready for PR review; merge still owner-only.
Refs: docs/svc-deploy/u1-instance-account-binding.md; Backend pulls/171
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 03:59:49 +00:00
Link U1 task card to Dev #429
ci / test-pg (pull_request) Failing after 1m44s
ci / test (pull_request) Failing after 3m23s
4d510e2d0b
Why: PR URL is the task主记录 after push; keep the card discoverable for review.
Evidence: Gitea API created pulls/429
Impact: Card header points at open PR; no merge.
Refs: pulls/429; Backend pulls/171
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 4 commits 2026-10-12 05:07:23 +00:00
Why: U1 svc user depends on --open-existing; Dev #429 conflicted on modules/backend against main.
Evidence: Backend #171 merged as 1d9e8f4 on origin/main
Impact: Unblocks task-sync; svc.sh content conflicts remain to resolve against main backup work.
Refs: Dev pulls/429; Backend #171
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Dev #429 conflicted on scripts/svc.sh (U1 user vs main backup) and Backend gitlink.
Evidence: conflict hunks resolved; actions include init|user|backup|backups
Impact: PR #429 should become mergeable after push; both U1 binding and agent backup entrypoints preserved.
Refs: Dev pulls/429; main backup #417; Backend #171
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: bind the task validation checkpoint to the latest integration baseline.

Evidence: SELF recursive component checks; sync_base=b431777c9fa9c74f096d7f14fce40d1beba53fe2; candidate=4713d5953c0169a6d7e8475aee980edd75863de5.

Impact: task metadata only.

Refs: .task/feature-svc-deploy-u1-account-binding.md
Record post-sync U1 evidence after resolving main conflict
ci / test-pg (pull_request) Failing after 1m6s
ci / test (pull_request) Failing after 2m36s
926e2ed539
Why: task-sync merged origin/main; svc.sh keeps user + backup; refresh SELF evidence for #429.
Evidence: unittest user_binding + identity + backup exit 0
Impact: PR #429 should become mergeable.
Refs: Dev pulls/429; Backend #171 (merged)
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-12 05:17:02 +00:00
Merge origin/main after #428; resolve docs/svc-deploy add/add
ci / test-pg (pull_request) Failing after 1m6s
ci / test (pull_request) Failing after 1m30s
d0e29b7a22
Why: #428 landed the same svc-deploy specs; U1 branch still had parallel copies causing add/add conflicts.
Evidence: U1 docs kept branch「已启动」; U4 docs took main (#428) versions
Impact: PR #429 should become mergeable.
Refs: Dev pulls/429; merged #428
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit 65175c6548 into main 2026-10-12 05:19:39 +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#429