Why: establish the authorized task workspace and its initial baseline.
Evidence: preserved precheck receipt in .task/fix-svc-dsn-reuse-dbref.md; R0=890b9b2bf2e9b356351d373a21f358ea04ca958b.
Impact: task metadata only; the feature workspace starts at 890b9b2bf2.
Refs: .task/fix-svc-dsn-reuse-dbref.md
Why: Resume the pre-started task with the defect analysis (G1-7 precheck
mismatch, reuse-path DSN loss, DSN_ENV leakage) recorded per delivery policy.
Evidence: make precheck receipt (SELF) imported via make evidence.
Impact: Task card only; no code change yet.
Refs: .task/fix-svc-dsn-reuse-dbref.md
Why: G1-7 moved the DSN into AGENT_SYSTEM_DSN, but the precheck only read
the arg string, so a non-loopback restart with auth auto was wrongly
rejected (2026-10-10 dev incident); the reuse path no longer restored the
dbref-bound DSN and would silently fall back to SQLite; and DSN_ENV leaked
across same-process starts (update --all) into other services' env.
Evidence: tests/test_svc_precheck.py 19 cases green (auth matrix vs
config.go AuthEnabled, reuse migration/dbref restore, scope isolation);
full governance suite 123 green; incident-scenario replay allowed + DSN
carried. Recorded via make evidence.
Impact: scripts/svc.sh precheck and reuse-start DSN handling only; no
binary change, no persistence-format change.
Refs: .task/fix-svc-dsn-reuse-dbref.md; config.go AuthEnabled (on || (not
off && DSN non-empty), env DSN counts).
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=73c901fa341a3653d6e0826d0da3497507995482.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: Complete the three-stage evidence (precheck/task-sync/tests) and the
self-check stage row per the evidence and delivery gates.
Evidence: make test exit=0 and make test-governance exit=0 receipts written
by make evidence at HEAD 8d73075.
Impact: Task card only.
Refs: .task/fix-svc-dsn-reuse-dbref.md
Why: The card's primary record must point at the real PR per the delivery gate.
Evidence: PR #317 open (API verified).
Impact: Task card only.
Refs: .task/fix-svc-dsn-reuse-dbref.md
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=95992d751f0a6ea8e345109dbb6b9367d9055e92.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: Fold the card close into PR #317 per the post-merge cleanup instruction.
Evidence: make test exit=0 re-run at the synced head 0303040 (receipt in card).
Impact: Task card only.
Refs: .task/fix-svc-dsn-reuse-dbref.md
Why: branches merged into main had left their task cards open; backfill status and archive to prevent bookkeeping debt.
Evidence: fix-svc-dsn-reuse-dbref.md(already-complete) — merges verified via git log --merges against origin/main.
Impact: .task/*.md moved to .task/archive/ with status backfilled; no code or submodule change.
Refs: task.sh close (card-autoclose-r1)
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=80a518628c526fd6ddece4abeb707ab4bb0b5618.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
weichen
merged commit b3b48f5efa into main2026-10-11 08:55:14 +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.
修复 G1-7 引入的 svc.sh 三处缺陷(任务卡:.task/fix-svc-dsn-reuse-dbref.md,本 PR 为任务主记录)。
Why: 2026-10-10
./scripts/svc.sh update dev非回环复用启动被预检误拒(当时以--auth on应急解锁,记忆 svc-g17-precheck-dsn-bug)。根因:agent_args_authed只看参数串,不认AGENT_SYSTEM_DSN环境变量;二进制AuthEnabled = on‖(非off && DSN非空)(config.go:301,env 为合法 DSN 来源,默认 auto)——「非回环 + auto + env DSN」被误判认证关。DSN_ENV全局且每次启动不重置:update --all同进程连续启动时前一个服务的 DSN 泄漏进后一个的AGENT_SYSTEM_DSN(跨服务串库)。变更(scripts/svc.sh + tests/test_svc_precheck.py):
agent_args_authed ARGS [DSN_ENV]:显式 off 优先;否则命令行--dsn或环境 DSN 任一非空即认证开,与二进制同口径。agent_listen_rejected EXEC DEFAULT_ADDR INSECURE DSN_ENV(回环/显式放行/认证开均不拦)。agent_reuse_exec EXEC OUT_VAR(nameref 回写;不得在 $() 中调用,DSN_ENV 赋值会留子壳):G1-7 迁移剥离后,DSN_ENV 为空且 dbref= 在案时经dsn_from_dbref重建。agent_do_start内local DSN_ENV=""隔离;文件尾main "$@"加 source 守卫供测试 source。Evidence: (SELF,任务卡收据)tests/test_svc_precheck.py 19/19;make test-governance 123/123 exit=0;make test 全量 exit=0(HEAD 8d73075,含 worktree/governance/boundaries/pins/libs/core/backend/frontend/ui/agentcmd);事故场景重放:非回环+auto+dbref → 放行且 DSN 随守卫环境传递。GATE 待 CI 在 PR HEAD 运行 make test+make build。
Impact: 仅 svc.sh 预检与复用启动 DSN 处理;不改二进制、不改持久化格式(dbref= 已是既有登记)。
Refs: .task/fix-svc-dsn-reuse-dbref.md;G1-7 变更 a6d434e;modules/backend/internal/config/config.go AuthEnabled。