Author SHA1 Message Date
weichen 473cbd61b9 Record the lifecycle suite attempt and remaining W12 items
Why: the lifecycle suite ran with the full environment but failed (pin-build-digests missing, designed NOT_RUN for login, real-combo cases failing); the attempt and env matrix are recorded for the next session.
Evidence: receipt w12-lifecycle-attempt.json; pin_build/login/rdm.ping NOT_RUN documented per the suite's own U7/U5 dependency note.
Impact: Task card only.
Refs: stage-5 plan W12
2026-10-22 10:00:42 +00:00
weichen 332f6b4c0f Record the Dev-side W12 verification results
Why: W12 requires the Dev candidate verification (test/build/backend-pg) recorded as evidence in the increment D card.
Evidence: make test exit 0 (555 tests), make build exit 0, make test-backend-pg exit 0 against the isolated PG (w12pg @127.0.0.1:8897) after one pgbus fanout flake (isolated rerun PASS); receipts under ~/.cache/agent-system-dev/agent-exec-receipts/.
Impact: Task card only.
Refs: stage-5 plan W12
2026-10-22 09:57:00 +00:00
weichen 5692e47efd Record the product-smoke super-admin fix and W12 progress
Why: the RDM product smoke script predated the startup-super-admin auth model; the repair unit updated it with synthetic default credentials and the W12 verification started.
Evidence: product-smoke PASS at 800edbe (root React product, unauthenticated 401, 7x rdm.inspect.* enabled) with env unset; RDM make test 17 packages green.
Impact: Task card and smoke script only.
Refs: stage-5 plan W12
2026-10-22 09:27:30 +00:00
weichen 1a25bbf3c3 Record the W11-U6 asset catalog expansion unit
Why: agent-per-unit governance requires the attempt recorded in the increment D card.
Evidence: w11-u6-asset-catalog-expansion completed via cursor attempt 1; transport 99adce1; SELF vet ok and domain/rdmapp/plugins tests all ok.
Impact: Task card only.
Refs: stage-5 plan W11 (U6); W0 template ledger
2026-10-22 09:10:31 +00:00
weichen a7bfaf79e5 Record the W11-U5 product preview and offline package unit
Why: agent-per-unit governance requires the attempt recorded in the increment D card.
Evidence: w11-u5-product-preview-offline completed via cursor attempt 1; transport d0f777d; SELF vet ok and domain/rdmapp/plugins tests all ok.
Impact: Task card only.
Refs: stage-5 plan W11 (U5)
2026-10-22 08:46:47 +00:00
weichen 212d2567e4 Record the W11-U4 approved Word render unit
Why: agent-per-unit governance requires the attempt recorded in the increment D card.
Evidence: w11-u4-approved-word-render completed via cursor attempt 3 (attempts 1-2 hit cursor service connection stalls); transport 6f5f7a5; SELF vet ok and domain/rdmapp/plugins tests all ok.
Impact: Task card only.
Refs: stage-5 plan W11 (U4)
2026-10-22 08:24:08 +00:00
weichen ea04c01c6d Record the W11-U3 grounded generation unit
Why: agent-per-unit governance requires the attempt recorded in the increment D card.
Evidence: w11-u3-grounded-generation completed via cursor attempt 1; transport 43614d1; SELF vet ok and domain/rdmapp/plugins tests all ok; zero auto-confirm paths.
Impact: Task card only.
Refs: stage-5 plan W11 (U3)
2026-10-22 07:53:13 +00:00
weichen bb3216ad6a Record the W11-U2 release package unit in the increment D card
Why: agent-per-unit governance requires the attempt recorded in the increment D card.
Evidence: w11-u2-release-package completed via cursor attempt 1; transport 76f7620 on the RDM branch; SELF gofmt/vet and targeted+full domain/rdmapp/plugins tests all ok.
Impact: Task card only.
Refs: stage-5 plan W11 (U2); parent initiative feature/rdm-two-trees-followup
2026-10-22 07:29:59 +00:00
weichen 1ba66540bb Record the task card for feature-rdm-two-trees-followup-d-w11-w12
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-rdm-two-trees-followup-d-w11-w12.md; R0=33d6ef69212595c680a744549986c19bb6acd6c3.

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

Refs: .task/feature-rdm-two-trees-followup-d-w11-w12.md
2026-10-22 07:08:12 +00:00
weichen e8de6ba97b Take main's svc recover test with the shared free-port helper
ci / svc-realcombo (pull_request) Successful in 3m13s
ci / test (pull_request) Successful in 9m50s
ci / test-pg (pull_request) Successful in 15m28s
Why: the initiative branch's merge resolution kept a stale test_svc_recover.py that lost main's free_fixture_port helper while its callers (test_svc_superadmin_envfile) reference it, breaking the CI test job on every initiative-branch head.
Evidence: main @33d6ef69 has the helper and a fully green CI (test/test-pg/svc-realcombo success); this branch's callers now match.
Impact: Test helper alignment only; no production code.
Refs: initiative PR #635; merge af2e6b41
2026-10-22 06:44:06 +00:00
weichen 89a6054941 Merge the initiative branch remote advance
ci / svc-realcombo (pull_request) Successful in 2m58s
ci / test (pull_request) Failing after 6m28s
ci / test-pg (pull_request) Successful in 14m43s
2026-10-22 06:35:51 +00:00
weichen af2e6b4111 Record the sync checkpoint
Why: bind the task validation checkpoint to the integration baseline.

Evidence: SELF recursive component checks; sync_base=33d6ef69212595c680a744549986c19bb6acd6c3; before_record=1b286ec3e68260d9d25cb3ab651ede31143d5b06.

Impact: task metadata only.

Refs: .task/feature-rdm-two-trees-followup.md
2026-10-22 06:35:19 +00:00
weichen 1b286ec3e6 Merge authoritative main into the task branch
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=33d6ef69212595c680a744549986c19bb6acd6c3.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
2026-10-22 06:34:25 +00:00
weichen 7535554056 Merge pull request 'Deliver increment C stage-6 records to the initiative' (#693) from feature/rdm-two-trees-followup-c-w8-w10 into feature/rdm-two-trees-followup
ci / svc-realcombo (pull_request) Successful in 3m17s
ci / test (pull_request) Failing after 6m47s
ci / test-pg (pull_request) Failing after 13m43s
2026-10-22 06:31:59 +00:00
weichen 32ed66d11e Fold-close the task card before merge
ci / test (pull_request) Failing after 6m11s
ci / test-pg (pull_request) Skipped
ci / svc-realcombo (pull_request) Skipped
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/feature-rdm-two-trees-followup-c-w8-w10.md -> .task/archive/feature-rdm-two-trees-followup-c-w8-w10.md; status 已完成(合入前闭合); PR #693 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/693.
Impact: task metadata only; the card is archived within PR #693 and lands with its merge commit.
Refs: task.sh close --self
2026-10-22 06:25:47 +00:00
weichen d183e43adb Record the user stage-6 approval for increment C
ci / test-pg (pull_request) Skipped
ci / svc-realcombo (pull_request) Skipped
ci / test (pull_request) Failing after 6m10s
Why: the user approved W8/W9/W10 at stage 6 on 2026-10-22; RDM #470 and FE #125 merged after CI; the knowledge-multi-mount DTO and RDM review MINORs move to increment D, W11/W12 stay pending resource authorization.
Evidence: CI success at RDM 4951086 and FE a82a1e1 (both after merging latest main).
Impact: Task card only.
Refs: stage-6 review reports on this branch (docs/reviews/2026-10-22-increment-c-*)
2026-10-22 06:25:45 +00:00
weichen baf99ebd44 Record the increment C reviews and MAJOR repairs
Why: agent-per-unit governance requires review and repair attempts recorded in the increment C card.
Evidence: reviews 0 BLOCKING (RDM 5 MAJOR, FE 3 MAJOR) repaired in d835ae6 / 4882e0a; SELF domain/rdmapp/plugins and design-guard/workspace tests all ok.
Impact: Task card only.
Refs: parent initiative feature/rdm-two-trees-followup
2026-10-22 06:15:23 +00:00
weichen 33d6ef6921 Merge pull request 'Close the merged pin-advance task card' (#692) from feature/card-close-20261022-055959Z into main
ci / svc-realcombo (push) Successful in 2m54s
ci / test (push) Successful in 8m45s
ci / test-pg (push) Successful in 13m1s
2026-10-22 06:13:49 +00:00
weichen a600d7abf0 Close 1 merged task card(s) and archive them
ci / svc-realcombo (pull_request) Successful in 3m13s
ci / test (pull_request) Successful in 9m40s
ci / test-pg (pull_request) Successful in 12m59s
Why: branches merged into their immediate or root target had left their task cards open; backfill status and archive to prevent bookkeeping debt.
Evidence: fix-rdm-pin-advance-latest.md(PR#690 into main) — merges verified via git log --merges plus Gitea API squash lookup against each card's origin target.
Impact: .task/*.md moved to .task/archive/ with status backfilled; no code or submodule change.
Refs: task.sh close (card-autoclose-r1)
2026-10-22 05:59:59 +00:00
weichen 7778fdcee7 Merge pull request 'Advance the RDM pin to the current mainline head' (#690) from fix/rdm-pin-advance-latest into main
ci / svc-realcombo (push) Successful in 2m54s
ci / test (push) Successful in 9m37s
ci / test-pg (push) Successful in 14m2s
2026-10-22 05:49:16 +00:00
weichen 8b39017068 Record the sync checkpoint
ci / svc-realcombo (pull_request) Successful in 3m5s
ci / test (pull_request) Successful in 9m56s
ci / test-pg (pull_request) Successful in 13m58s
Why: bind the task validation checkpoint to the integration baseline.

Evidence: SELF recursive component checks; sync_base=b7636742fc9ea937e6030123afc608fd294861bf; before_record=d8fcc0d6f6d854fda7a92ddfdcda7d0bb8c5304a.

Impact: task metadata only.

Refs: .task/fix-rdm-pin-advance-latest.md
2026-10-22 05:34:32 +00:00
weichen d8fcc0d6f6 Merge authoritative main into the task branch
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=b7636742fc9ea937e6030123afc608fd294861bf.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
2026-10-22 05:33:46 +00:00
weichen b7636742fc Merge pull request 'Agent stack audit remediation batch 2 (U8, U9, U11)' (#689) from feature/agent-stack-audit-remediation-b2 into main
ci / svc-realcombo (push) Successful in 3m21s
ci / test (push) Successful in 9m43s
ci / test-pg (push) Successful in 14m54s
2026-10-22 05:31:19 +00:00
weichen 92757e9f17 Record the W10 frontend unit in the increment C card
Why: agent-per-unit governance requires the attempt recorded in the increment C card.
Evidence: w10-audit-workspace completed via cursor (attempt 2 after a legitimate scope-expansion re-dispatch); transport fa08be4 on FE branch feature/rdm-two-trees-followup-w10; SELF design-guard 7/7, component tests 33/33, build ok.
Impact: Task card only.
Refs: stage-5 plan W10; parent initiative feature/rdm-two-trees-followup
2026-10-22 05:30:25 +00:00
agent-exec-transport 032d8bb6b9 agent-exec transport 6600a116a8bc2802ee7eb4eff5bbc6d7/e9bec44bf54b
ci / svc-realcombo (pull_request) Successful in 2m57s
ci / test (pull_request) Successful in 9m45s
ci / test-pg (pull_request) Successful in 13m41s
2026-10-22 05:17:55 +00:00
weichen f2969664ef Merge authoritative main into the task branch
ci / svc-realcombo (pull_request) Successful in 3m21s
ci / test (pull_request) Successful in 9m13s
ci / test-pg (pull_request) Successful in 14m31s
Why: include the current integration baseline before merge.

Evidence: fetched origin/main=1de7c28c.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
2026-10-22 05:15:53 +00:00
weichen 87db22a3f7 Record the task card for fix-rdm-pin-advance-latest
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/fix-rdm-pin-advance-latest.md; R0=1de7c28c2122609dd9b6435881696492bd052a34.

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

Refs: .task/fix-rdm-pin-advance-latest.md
2026-10-22 05:10:36 +00:00
weichen c325d85fb6 Fold-close the task card before merge
ci / svc-realcombo (pull_request) Successful in 2m40s
ci / test (pull_request) Successful in 9m4s
ci / test-pg (pull_request) Successful in 11m59s
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/feature-agent-stack-audit-remediation-b2.md -> .task/archive/feature-agent-stack-audit-remediation-b2.md; status 已完成(合入前闭合); PR #689 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/689.
Impact: task metadata only; the card is archived within PR #689 and lands with its merge commit.
Refs: task.sh close --self
2026-10-22 05:03:17 +00:00
weichen 6b191579df Record the batch-2 review approval in the task card
ci / svc-realcombo (pull_request) Successful in 3m8s
ci / test (pull_request) Successful in 9m16s
ci / test-pg (pull_request) Successful in 11m46s
Why: independent review approved batch 2 (0 blockers, 0 majors, 5
minor follow-up notes); report committed; receipt SHAs annotated to
the final lineage per review minor 4.
Evidence: review receipt /tmp/agent-stack-b2/review-run.json
(pi-glm, success).
Impact: task metadata + review report.
Refs: PR #689
2026-10-22 04:51:05 +00:00
agent-exec-transport 8f742c7824 agent-exec transport 23992e9206bf4a03822a8516d4c78f97/e7eb0eda78ed 2026-10-22 04:50:27 +00:00
weichen ea099a5fbf Record batch-2 completion and the green combination run
ci / svc-realcombo (pull_request) Successful in 3m18s
ci / test (pull_request) Successful in 8m56s
ci / test-pg (pull_request) Successful in 11m59s
Why: all batch-2 units implemented, repaired and verified; full make
test green on the final pinned combination.
Evidence: verify-combo.json exit=0; component branches pushed
(native cff6935, squad 9edb6ba, backend 9b40595).
Impact: task metadata only.
Refs: feature/agent-stack-audit-remediation-b2
2026-10-22 04:32:50 +00:00
weichen 0b46569d85 Repin modules/backend to the nested-squad tip
Why: the backend branch tip 9b40595 additionally pins the nested
agent-squad (and its nested native) so the composed chain carries the
batch-2 event fields end to end.
Evidence: integration transport success (gitlinkb-run.json); full
make test re-run follows on this branch.
Impact: one component gitlink.
Refs: feature/agent-stack-audit-remediation-b2
2026-10-22 04:25:08 +00:00
weichen a0b8d12b43 Advance native, squad and backend pins to the batch-2 tips
Why: land U8, U9 and U11 across agent-native (cff6935), agent-squad
(9edb6ba) and modules/backend (race-repair tip) per the approved plan.
Evidence: per-unit SELF receipts under /tmp/agent-stack-b2 (all
exit=0); full make test re-run follows on this branch.
Impact: three component gitlinks.
Refs: docs/superpowers/plans/2026-10-21-agent-stack-audit-remediation-plan.md
2026-10-22 04:20:45 +00:00
weichen ebc3a6d137 Record the W9 RDM audit adapter unit
Why: agent-per-unit governance requires the attempt recorded in the increment C card.
Evidence: w9-rdm-audit-adapter completed via cursor attempt 1; transport c4c6df7; pin advanced to backend main 92a41183 (X1+X2+MINORs); SELF build/vet ok and domain/rdmapp/plugins tests all ok.
Impact: Task card only.
Refs: stage-5 plan W9; backend PR #243
2026-10-22 04:05:55 +00:00
weichen ef75fd7f25 Record batch-2 unit receipts so far
Why: per-unit audit trail for U8/U9/U11a/U11b/U11c including the
fail-stop redispatches and the frame-order repair.
Evidence: per-unit SELF receipts under /tmp/agent-stack-b2.
Impact: task metadata only.
Refs: feature/agent-stack-audit-remediation-b2
2026-10-22 04:00:34 +00:00
weichen 66b4f72844 Record the W8a and W8b units in the increment C card
Why: agent-per-unit governance requires each implementation attempt recorded in the task card.
Evidence: w8a 6fd0478 and w8b c3d3111 (attempt 2 after an infra retry); SELF vet ok and domain/rdmapp/plugins tests all ok.
Impact: Task card only.
Refs: stage-5 plan W8; parent initiative feature/rdm-two-trees-followup
2026-10-22 02:49:25 +00:00
weichen 1de7c28c21 Merge pull request 'Close the merged admit task card' (#688) from feature/card-close-20261022-022827Z into main
ci / svc-realcombo (push) Successful in 2m29s
ci / test (push) Successful in 8m41s
ci / test-pg (push) Successful in 12m2s
2026-10-22 02:40:55 +00:00
weichen 3b267dbe4d Close 1 merged task card(s) and archive them
ci / svc-realcombo (pull_request) Successful in 2m48s
ci / test (pull_request) Successful in 9m33s
ci / test-pg (pull_request) Successful in 12m5s
Why: branches merged into their immediate or root target had left their task cards open; backfill status and archive to prevent bookkeeping debt.
Evidence: fix-agent-exec-admit-authoritative-base.md(PR#687 into main) — merges verified via git log --merges plus Gitea API squash lookup against each card's origin target.
Impact: .task/*.md moved to .task/archive/ with status backfilled; no code or submodule change.
Refs: task.sh close (card-autoclose-r1)
2026-10-22 02:28:27 +00:00
weichen dae463b75d Merge pull request 'Record the admit baseline-recognition outcome' (#687) from fix/agent-exec-admit-authoritative-base into main
ci / svc-realcombo (push) Successful in 2m19s
ci / test (push) Successful in 8m45s
ci / test-pg (push) Successful in 12m6s
2026-10-22 02:23:20 +00:00
weichen fb38fd65f8 Record the sync checkpoint
ci / svc-realcombo (pull_request) Successful in 2m30s
ci / test (pull_request) Successful in 8m33s
ci / test-pg (pull_request) Successful in 11m32s
Why: bind the task validation checkpoint to the integration baseline.

Evidence: SELF recursive component checks; sync_base=a4311c6341c318d4bbf1563b3973358326086794; before_record=f20043be5a13e53240d39557291cf19eecc84098.

Impact: task metadata only.

Refs: .task/fix-agent-exec-admit-authoritative-base.md
2026-10-22 02:10:49 +00:00
weichen f20043be5a Merge authoritative main into the task branch
Why: include the current integration baseline before verification.

Evidence: fetched origin/main=a4311c6341c318d4bbf1563b3973358326086794.

Impact: integrate upstream changes without rewriting task history.

Refs: task-sync
2026-10-22 02:10:05 +00:00
weichen e465b7c18f Record the admit baseline-recognition outcome on the Dev task card
ci / svc-realcombo (pull_request) Successful in 2m25s
ci / test (pull_request) Successful in 8m31s
ci / test-pg (pull_request) Successful in 9m28s
Why: this Dev branch carries only the task record; the change itself landed in
Development-Manager PR #32. Without the outcome written down the card would sit
unmerged with no explanation of why.

Evidence: Development-Manager main 2c2e372, CI green, independent review PASS;
its effect measured on RDM (65 staged paths down to 5 needing transport) and on
Dev (90-commit sync admitted with no transport).

Impact: task card only.

Refs: Development-Manager PR #32, RDM PR #460, Dev PR #682, Dev PR #684
2026-10-22 01:55:37 +00:00
weichen ecf923d6ca Record the W8a operation audit core unit
Why: agent-per-unit governance requires each implementation attempt recorded in the increment C card.
Evidence: w8a-operation-audit-core completed via cursor attempt 1; transport 6fd0478; SELF gofmt/vet ok, domain+rdmapp tests ok.
Impact: Task card only.
Refs: stage-5 plan W8; parent initiative feature/rdm-two-trees-followup
2026-10-22 01:41:58 +00:00
weichen a4311c6341 Merge pull request 'Close the merged pin-advance task card' (#686) from feature/card-close-20261022-012859Z into main
ci / svc-realcombo (push) Successful in 2m33s
ci / test (push) Successful in 8m18s
ci / test-pg (push) Successful in 11m35s
2026-10-22 01:41:02 +00:00
weichen 6db7d37888 Close 1 merged task card(s) and archive them
ci / svc-realcombo (pull_request) Successful in 2m26s
ci / test (pull_request) Successful in 8m9s
ci / test-pg (pull_request) Successful in 11m8s
Why: branches merged into their immediate or root target had left their task cards open; backfill status and archive to prevent bookkeeping debt.
Evidence: fix-pal-component-delivery-pins.md(PR#682 into main) — merges verified via git log --merges plus Gitea API squash lookup against each card's origin target.
Impact: .task/*.md moved to .task/archive/ with status backfilled; no code or submodule change.
Refs: task.sh close (card-autoclose-r1)
2026-10-22 01:28:59 +00:00
weichen cc98cac699 Record the task card for feature-rdm-two-trees-followup-c-w8-w10
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-rdm-two-trees-followup-c-w8-w10.md; R0=f23f5bb01a8b96ab90686d3a1b07791d7f473de2.

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

Refs: .task/feature-rdm-two-trees-followup-c-w8-w10.md
2026-10-22 01:24:37 +00:00
weichen 5f09af2d58 Fill in the batch-2 card and record the pin restoration
Why: carry authorization, the discovered composition regression
(#682 reset batch-1 pins) and its restoration, plus the wave plan.
Evidence: restoration transport success (pinrestore-run.json).
Impact: task metadata only.
Refs: feature/agent-stack-audit-remediation-b2
2026-10-22 01:17:56 +00:00
weichen 646a219116 Restore the batch-1 component pins lost to the parallel pin merge
Why: PR #682 (f23f5bb0) merged a stale branch whose tree carried
pre-batch component pins, silently reverting the batch-1 composition
on main; batch 2 (U8/U9/U11) is defined on top of batch 1.
Evidence: restoration transport success (pinrestore-run.json); batch-1
tips pushed on all five component origins.
Impact: five component gitlinks restored to the audited batch-1 tips.
Refs: feature/agent-stack-audit-remediation-b2
2026-10-22 01:16:57 +00:00
weichen 387723b1a4 Record the task card for feature-agent-stack-audit-remediation-b2
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-agent-stack-audit-remediation-b2.md; R0=f23f5bb01a8b96ab90686d3a1b07791d7f473de2.

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

Refs: .task/feature-agent-stack-audit-remediation-b2.md
2026-10-22 01:10:03 +00:00
weichen 27d546f0fb Record the task card for fix-agent-exec-admit-authoritative-base
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/fix-agent-exec-admit-authoritative-base.md; R0=096b74b4775e81cfb2864f98cae2e9fc9d9c1a44.

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

Refs: .task/fix-agent-exec-admit-authoritative-base.md
2026-10-21 11:41:20 +00:00
15 changed files with 760 additions and 39 deletions
@@ -0,0 +1,175 @@
# feature/agent-stack-audit-remediation-b2 任务卡
任务主记录:PR #689 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/689;状态:已完成(合入前闭合);owner:weichen
## 基线与授权
- 权威仓:ssh://git@192.168.3.2:2222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= f23f5bb01a8b96ab90686d3a1b07791d7f473de2
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-agent-stack-audit-remediation-b2(worktree);分支:feature/agent-stack-audit-remediation-b2
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=22ed04d7fb30ca7299bbf8795c7dad867b9800c85f55b57619a717c3e7b762ed;triage_receipt=/tmp/triage-remediation-b2-1792631272.json;receipt_sha256=5c213b38ad4980f21fa92d0a83234460188fe5cc4fabe847f78bc20dd872e438
- 授权与交付终点:用户已批准按方案实施第二批(U8、U9、U11:持久化遗漏、并发限额、完成事件与工具结果一致性)。范围内连续推进至组件提交、Backend 嵌套 gitlink 与 Dev 组合指针更新、组合验证、独立 Review、PR/CI/合入。未授权:部署/迁移/发布、功能增量 A1-A4、A2A(F16)、第一批评审 5 条 minor 跟进项。
- 前置修复(已含):并行 PR #682(f23f5bb0)将五个组件 pin 回退到批次一之前,组合层面丢失批次一;已在 b2 分支以 pin-restore 单元恢复(646a2191),批次二基于恢复后的批次一 tip 构建。
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
- 人工决策点:仅限目标/范围/验收变更、重大取舍、高后果操作或无法自动判定的业务验收
- 当前阶段:需求拆解;当前增量:I1(待定义)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
**目标**:按方案修复 F11/F12/F14:U8 SQLite 完整保存 Mailbox/Handoffs/Board 且错误可见(终态/manifest/checkpoint flush 不发伪成功);U9 Claim 原子校验 agent 与 runtime 双重在途上限;U11 工具事件跨 native→squad→backend 保留 CallID、真实错误/状态(拆 U11a/U11b/U11c)。
**非目标**:A1-A4;A2A;第一批 5 条 minor 跟进;通用幂等平台;部署/迁移/发布。
## Agent 实施收据
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| pin-restore | Dev 五组件 pin 恢复批次一 tip | digest /tmp/agent-stack-b1/pin-restore-b2.json | implementation | [cursor,…] | 1 | cursor | success | 646a2191 | 否 | /tmp/agent-stack-b1/pinrestore-run.json |
| u11a | native: exec/、runtime/、adapters/native 事件字段 | digest /tmp/agent-stack-b2/u11a-run.json | implementation | [cursor,…] | 1 | cursor | success | native cff6935 | 否 | /tmp/agent-stack-b2/u11a-run.json |
| u8(首次) | squad: sqlite 持久化+错误可见 | digest /tmp/agent-stack-b2/u8-run.json | implementation | [pi,codex](cursor/agy 禁用) | 1 | pi | failed-unknown(终态记录不可解码,现场保留) | 无 | 否 | /tmp/agent-stack-b2/u8-run.json |
| u8(重派) | 同上 | digest /tmp/agent-stack-b2/u8b-run.json | implementation | [pi,codex] | 1 | pi | success | squad aa81b50→7d0630a | 否 | /tmp/agent-stack-b2/u8b-run.json |
| u9(首次) | squad: adapters/sqlite/queue 双重上限 | digest /tmp/agent-stack-b2/u9-run.json | implementation | [pi,codex] | 1 | pi | failed-unknown(同上模式,现场保留) | 无 | 否 | /tmp/agent-stack-b2/u9-run.json |
| u9(重派) | 同上 | digest /tmp/agent-stack-b2/u9b-run.json | implementation | [pi,codex] | 1 | pi | success | squad 25397e3 | 否 | /tmp/agent-stack-b2/u9b-run.json |
| u11b | squad: port/bridge/taps 事件字段 | digest /tmp/agent-stack-b2/u11b-run.json | implementation | [pi,codex] | 1 | pi | success | squad 676a1ed | 否 | /tmp/agent-stack-b2/u11b-run.json |
| u11b-repair | squad: 探针帧序保持 | digest /tmp/agent-stack-b2/u11br-run.json | repair | [pi,codex] | 1 | pi | success | squad 9edb6ba | 否 | /tmp/agent-stack-b2/u11br-run.json |
| u11c | backend: squad_runner/hostbridge 事件保真 | digest /tmp/agent-stack-b2/u11c-run.json | implementation | [pi,codex] | 1 | pi | success | backend fc0a050 | 否 | /tmp/agent-stack-b2/u11c-run.json |
| u11c-repair | backend: -race 数据竞争修复(runToolCtx 写 vs 回调读) | digest /tmp/agent-stack-b2/u11cr-run.json | repair | [pi,codex] | 1 | pi | success | backend 7b8a34d | 否 | /tmp/agent-stack-b2/u11cr-run.json |
| gitlink-integration(含 backend 微修正) | Dev 顶层 native/squad/backend 指针 | host 集成 | implementation | [cursor,…] | success×2 | cursor | success | a0b8d12b / 0b46569d | 否 | /tmp/agent-stack-b2/gitlink-run2.json、gitlinkb-run.json |
| 组合验证 | 全量 make test @ 0b46569d | host | host | — | — | host | PASS(exit=0) | — | — | /tmp/agent-stack-b2/verify-combo.json |
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
## 关联方向与规划
- 适用状态:待核对(无适用规划时说明原因)
- 主记录路径/版本:待核对(路径按仓库根目录定位,归档后不变;只引用唯一正文)
- 对应里程碑:待核对
## 需求分析
| ID | 描述 | 项目符合度及依据 | 优先级 | 验收条件 | 依赖 | 结论 |
|---|---|---|---|---|---|---|
| R1 | 待填写 | 待评估 | 待定 | 待定义 | 待确认 | 待评审 |
## 方案与计划
- 方案引用:待填写(含对象版本)
- 实施计划引用:待填写(含增量与需求 ID)
- 测试计划引用:待填写(含需求 ID 与验收条件)
## 阶段记录
| 阶段 | 对象版本 | 状态 | 决策/执行者 | 时间 | 依据 |
|---|---|---|---|---|---|
| 需求拆解 | 待定 | 待执行 | — | — | — |
| 需求评估 | 待定 | 待执行 | — | — | — |
| 需求表确认 | 待定 | 待执行 | — | — | — |
| 方案设计 | 待定 | 待执行 | — | — | — |
| 实施计划 | 待定 | 待执行 | — | — | — |
| 实施与自检 | 待定 | 待执行 | — | — | — |
| 正式测试与验收 | 待定 | 待执行 | — | — | — |
| 代码 Review | 待定 | 待执行 | — | — | — |
| 合入 | 待定 | 待执行 | — | — | — |
| 合入核验与收口 | 待定 | 待执行 | — | — | — |
## 探索试验与迭代
| 增量/试验 | 假设 | 范围 | 判断和停止条件 | 授权/决策依据 | 结果 | 变更影响 | 需重审补测 |
|---|---|---|---|---|---|---|---|
| 待定义 | — | — | — | 待核对 | NOT_RUN | 待评估 | 待评估 |
## 同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | f23f5bb01a8b96ab90686d3a1b07791d7f473de2 | f23f5bb01a8b96ab90686d3a1b07791d7f473de2 | 2026-10-22T01:10:02Z |
## 证据(Evidence)
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|---|---|---|---|---|---|
## 交付调度
- 调度状态:未入队;调度记录:无
- entry_id:无;attempt_id:无;窗口执行者:无
- 固定候选:无(base/head、组件与相关配置引用实际尝试)
- 调度依据:policy/delivery.md#合入调度
- 固定后证据:源码外 RECEIPT;实际结果后按授权原样导入和闭合
## 结果与验证
- 结果:
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
- 影响与剩余项:
## 规划进展与下一步
- 本次推进/剩余:待核对(依据实际成果更新适用方案/规划)
- 首选下一任务:待核对(无适用规划、已完成或受阻时如实说明,不虚构任务)
- 推荐依据:待填写
- 前置条件/待确认:待核对
- 预期产物/验收条件:待定义
- 重复任务核对:待核对(已有/在途任务、PR 与规划记录)
- 启动授权:未授权(建议不自动启动新任务,仍须明确授权)
## 合入与清理
- Review 记录:独立 CLI 评审单元 agent-stack-b2-independent-review(pi-glm attempt1 success,收据 /tmp/agent-stack-b2/review-run.json);结论 APPROVE(0 blocker / 0 major / 5 minor 非阻塞跟进项);报告 .task/reviews/2026-10-22-agent-stack-b2-independent-review.md;被审对象 0b46569d 组合 vs main。收据表 SHA 追注:u8 最终提交 cf83d30、u9 最终提交 12a53b0(transport 重建,与收据候选逐字节同树,评审 Minor 4)。
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-22T01:09:09.476561+00:00",
"command": "make precheck",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev",
"before_head": "f23f5bb01a8b96ab90686d3a1b07791d7f473de2",
"after_head": "f23f5bb01a8b96ab90686d3a1b07791d7f473de2",
"branch": "main",
"target_branch": "main",
"target_head": "f23f5bb01a8b96ab90686d3a1b07791d7f473de2",
"root_target": "main",
"immediate_target": "main",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
"[repo] branch=main head=f23f5bb01a",
"[remote] origin/main=f23f5bb01a ahead=0 behind=0",
"[tree] clean submodules_drift=0 uninit=0",
"[worktrees] linked=4",
"[recycle] merged un-recycled branches: fix/ci-rdm-pin-materialization fix/pal-component-delivery-pins",
"[cards] 已合入未闭合任务卡:fix-pal-component-delivery-pins.md——make task-close 回填归档(主检出运行)",
"[initiatives] local cards (not authoritative): none",
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
"[facts] policy/facts.md 6 条事实均在有效期内",
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
"[R0] f23f5bb01a(完整:f23f5bb01a8b96ab90686d3a1b07791d7f473de2)",
"[worktree] before-sync: recursive component checks passed",
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
],
"output_sha256": "92b6ee8eb18090df21e7b5fba9872453244ae0349806e7d9d194bf66af398aed",
"receipt_sha256": "69f512cfc922c4cedbec5995a9a1253b475bb7aefc3dfea83cb2f2b186b1a8e8",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/69f512cfc922c4cedbec5995a9a1253b475bb7aefc3dfea83cb2f2b186b1a8e8.json"
}
```
## 闭合记录(合入前折叠)
- 本卡在 PR #689(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/689)合入前闭合并归档,随该 PR 一同合入。
- 该 PR 的合并提交即本任务的落地记录。
- 合入后无需回填,也无需单独的闭合 PR。
@@ -0,0 +1,108 @@
# feature/rdm-two-trees-followup-c-w8-w10 任务卡
任务主记录:PR #693 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/693;状态:已完成(合入前闭合);owner:weichen(W8a+W8b+W9+W10 全部交付;独立 Review 完成且 MAJOR 全修复;MINOR 留档评审报告;下一步阶段 6 评审包→用户人审);owner:weichen
- 权威仓:ssh://git@192.168.3.2:2222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= f23f5bb01a8b96ab90686d3a1b07791d7f473de2
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-rdm-two-trees-followup-c-w8-w10(worktree);分支:feature/rdm-two-trees-followup-c-w8-w10
- 分支类型:child;initiative_id:feature-rdm-two-trees-followup;root_target:main;immediate_target:feature/rdm-two-trees-followup;accepting_requirements:false;parent_branch:feature/rdm-two-trees-followup;parent_head_sha:dcca5112923790506e0728a89ae3752349405653;parent_pr:无;parent_source:origin
- 需求分流:verdict=JOIN;selected_initiative=feature/rdm-two-trees-followup;requirement_sha256=f4a1ab636c59ce3df302201310d359eac88b105e8ffecd86da8f7266bf3fa58e;triage_receipt=/tmp/triage-incC.json;receipt_sha256=3fb1f7cb6dd41fc250c764d08dd612749f150f3e619b54cbc3a9144b37a4d298
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
<预期结果、受影响入口/模块/契约;明确不做什么。>
## Agent 实施收据
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| w8a-operation-audit-core | W8 领域核:操作审计事实/同事务写入/失败尝试/幂等回执/延迟补全/重放一致 | implementation | cursor | 1 | cursor(auto) | completed | 6fd0478(refs/agent-exec/…,收据 ~/.cache/agent-system-dev/agent-exec-receipts/w8a-operation-audit-core.json) | never | ~/.cache/agent-system-dev/agent-exec-receipts/w8a-operation-audit-core.json |
| w8a-operation-audit-core | W8 领域核(attempt 1 详见 ~/.cache/…/w8a-operation-audit-core.json;transport 6fd0478) | implementation | cursor | 1 | cursor(auto) | completed | 6fd0478 | never | ~/.cache/agent-system-dev/agent-exec-receipts/w8a-operation-audit-core.json |
| w8b-audit-projection | W8 可读投影:DTO 词典/游标分页/可见性接线/rdm.audit.operations(attempt 1 infra 重试) | implementation | cursor | 2 | cursor(auto) | completed | c3d3111 | never | /home/weichen/.cache/agent-system-dev/agent-exec-receipts/w8b-audit-projection.json |
| w9-rdm-audit-adapter | W9 RDM 消费端:audit.read 回调适配 Backend X2(受信裁剪/当时名称/owner 分离/拒绝事实)+ pin 前进 92a41183(worker 自纠 41 位笔误:按前缀 fetch 真 tip) | implementation | cursor | 1 | cursor(auto) | completed | c4c6df7 | never | /home/weichen/.cache/agent-system-dev/agent-exec-receipts/w9-rdm-audit-adapter.json |
| w10-audit-workspace | W10 正式 Frontend:审计工作台/树懒加载/工作卡/依据条/四态/seq(FE 子分支 feature/rdm-two-trees-followup-w10 @fa08be4;知识多挂载显示留 TODO 待 RDM DTO 增补) | implementation | cursor | 2(attempt1 合理扩围重派) | cursor(auto) | completed | fa08be4 | never | /home/weichen/.cache/agent-system-dev/agent-exec-receipts/w10-audit-workspace.json |
| rev-increment-c-rdm | RDM 增量 C 独立评审(0 BLOCKING/5 MAJOR/15 MINOR;报告 docs/reviews/2026-10-22-increment-c-rdm-review.md @b7b5227) | review | pi | 1 | pi(default) | completed | b7b5227 | never | ~/.cache/agent-system-dev/agent-exec-receipts/rev-c-rdm-receipt.json |
| fix-increment-c-rdm-majors | RDM 5 MAJOR 修复(schema-2 目录/copyState/生产写接线等,含回归测试) | repair | cursor | 1 | cursor(auto) | completed | d835ae6 | never | ~/.cache/agent-system-dev/agent-exec-receipts/fix-increment-c-rdm.json |
| rev-increment-c-fe | FE W10 独立评审(0 BLOCKING/3 MAJOR/MINOR;报告 docs/reviews/2026-10-22-increment-c-fe-review.md @a61eaac) | review | pi | 1 | pi(default) | completed | a61eaac | never | ~/.cache/agent-system-dev/agent-exec-receipts/rev-c-fe-receipt.json |
| fix-increment-c-fe-majors | FE 3 MAJOR 修复(openInbox 定位/能力门禁/@ui Collapsible,+6 回归测试) | repair | cursor | 1 | cursor(auto) | completed | 4882e0a | never | ~/.cache/agent-system-dev/agent-exec-receipts/fix-increment-c-fe.json |
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
## 同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | f23f5bb01a8b96ab90686d3a1b07791d7f473de2 | dcca5112923790506e0728a89ae3752349405653 | 2026-10-22T01:24:37Z |
## 证据(Evidence)
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|---|---|---|---|---|---|
## 结果与验证
- 结果:
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
- 影响与剩余项:
## 合入与清理
- Review 记录:NOT_RUN(审阅智能体/平台身份、base/head、结论、问题闭合及重放依据)
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-22T01:23:50.112388+00:00",
"command": "make precheck",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev",
"before_head": "f23f5bb01a8b96ab90686d3a1b07791d7f473de2",
"after_head": "f23f5bb01a8b96ab90686d3a1b07791d7f473de2",
"branch": "main",
"target_branch": "main",
"target_head": "f23f5bb01a8b96ab90686d3a1b07791d7f473de2",
"root_target": "main",
"immediate_target": "main",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
"[repo] branch=main head=f23f5bb01a",
"[remote] origin/main=f23f5bb01a ahead=0 behind=0",
"[tree] clean submodules_drift=0 uninit=0",
"[worktrees] linked=5",
"[recycle] merged un-recycled branches: fix/ci-rdm-pin-materialization fix/pal-component-delivery-pins",
"[cards] 已合入未闭合任务卡:fix-pal-component-delivery-pins.md——make task-close 回填归档(主检出运行)",
"[initiatives] local cards (not authoritative): none",
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
"[facts] policy/facts.md 6 条事实均在有效期内",
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
"[R0] f23f5bb01a(完整:f23f5bb01a8b96ab90686d3a1b07791d7f473de2)",
"[worktree] before-sync: recursive component checks passed",
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
],
"output_sha256": "013e1d4d93548576815e9e2fe8e735d049fea47507ef4492478b55e4cf3c7cd6",
"receipt_sha256": "643c76ed799ad8ca4ea16ba47a3510694218cdc18e387586ed9e36d6f9c44502",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/643c76ed799ad8ca4ea16ba47a3510694218cdc18e387586ed9e36d6f9c44502.json"
}
```
## 闭合记录(合入前折叠)
- 本卡在 PR #693(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/693)合入前闭合并归档,随该 PR 一同合入。
- 该 PR 的合并提交即本任务的落地记录。
- 合入后无需回填,也无需单独的闭合 PR。
@@ -0,0 +1,113 @@
# fix/agent-exec-admit-authoritative-base 任务卡
任务主记录:PR #687 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/687(merge dae463b75d);状态:已完成(回填);owner:weichen
- 权威仓:ssh://git@192.168.3.2:2222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 096b74b4775e81cfb2864f98cae2e9fc9d9c1a44
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-agent-exec-admit-authoritative-base(worktree);分支:fix/agent-exec-admit-authoritative-base
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=53b249b6af5952312ae8cbd129492dfedd05b47b55a2ea4c0b708cdbe01728e1;triage_receipt=/tmp/admit-triage.json;receipt_sha256=c91b7a1b57bcea0246668f8a95408c90649aeba18106b7cd8d673987d3fe7735
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
<预期结果、受影响入口/模块/契约;明确不做什么。>
## Agent 实施收据
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
## 同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | 096b74b4775e81cfb2864f98cae2e9fc9d9c1a44 | 096b74b4775e81cfb2864f98cae2e9fc9d9c1a44 | 2026-10-21T11:41:20Z |
## 证据(Evidence)
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|---|---|---|---|---|---|
## 结果与验证
- 结果:
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
- 影响与剩余项:
## 合入与清理
- Review 记录:NOT_RUN(审阅智能体/平台身份、base/head、结论、问题闭合及重放依据)
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-21T11:40:23.532845+00:00",
"command": "make precheck",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev",
"before_head": "096b74b4775e81cfb2864f98cae2e9fc9d9c1a44",
"after_head": "096b74b4775e81cfb2864f98cae2e9fc9d9c1a44",
"branch": "main",
"target_branch": "main",
"target_head": "096b74b4775e81cfb2864f98cae2e9fc9d9c1a44",
"root_target": "main",
"immediate_target": "main",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
"[repo] branch=main head=096b74b477",
"[remote] origin/main=096b74b477 ahead=0 behind=0",
"[tree] clean submodules_drift=0 uninit=0",
"[worktrees] linked=3",
"[recycle] merged un-recycled branches: feature/card-close-20261021-085838Z",
"[initiatives] local cards (not authoritative): none",
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
"[facts] policy/facts.md 6 条事实均在有效期内",
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
"[R0] 096b74b477(完整:096b74b4775e81cfb2864f98cae2e9fc9d9c1a44)",
"[worktree] before-sync: recursive component checks passed",
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
],
"output_sha256": "db26462a59dade7e8fba673f4a4f9470146c139eb8373c8d853f3c53980d0e26",
"receipt_sha256": "50098830e02af3cde918585689d25dcef3f5a58bcba16bc97ba9952a817d23ef",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/50098830e02af3cde918585689d25dcef3f5a58bcba16bc97ba9952a817d23ef.json"
}
```
## 结果与验证
- 结果:**交付发生在 Development-Manager 仓**,本分支仅承载 Dev 侧的任务记录。`admission.Admit` 新增「权威基线内容认可」:暂存路径若与权威基线**逐字节相同**则无需 transport 记录,其余路径仍走原有判定。
- Development-Manager PR #32 → `2c2e37255807ce94c945759925d6361e72977807`,CI 双作业绿,独立 Review 终判 PASS。核实:blob 比对(mode+hash)、stage 与路径集过滤;基线 ref 不可解析 / `ls-tree` 失败 / 路径不在基线 / 暂存删除**全部 fail-closed**;`covers` 的九条判定**一条未删未弱化**;未新增豁免路径与配置项。
- 测试:`internal/agentexec/admission` 全绿,既有 12 项拒绝用例**零删除**全部保留,新增 7 项正反例与 4 项 history 用例。
- 已知无关失败:`TestKeyRefusesSymlinkAndWrongMode`(history)与 `TestParseTerminalFixtures`(receipt)在 `origin/main` 上同样失败(环境相关),已在干净的 main worktree 上复现确认。
- 实际效果验证:RDM 合并的 65 个暂存路径由「全部被拒」降为「仅 5 个需 transport」;Dev 的 90 提交同步与 RDM 的空合并提交均以 `admit: ok` 通过,全程无 transport 妥协。
## 关联
- 实际交付:Development-Manager PR #32
- 本变更解锁的下游:RDM PR #460、Dev PR #682、Dev PR #684
| 同步(记录前对象) | a4311c6341c318d4bbf1563b3973358326086794 | f20043be5a13e53240d39557291cf19eecc84098 | 2026-10-22T02:10:49Z |
## 闭合记录(card-autoclose 回填)
- 依据:merge dae463b75d66e09133dc8914158951b7e98e707f(PR #687)已包含于 origin/main,分支成果已落盘;本段为合入后回填。
- 合并主题:Merge pull request 'Record the admit baseline-recognition outcome' (#687) from fix/agent-exec-admit-authoritative-base into main
- 归档:随闭合移入 .task/archive/;任务执行期的过程证据见原任务记录与 PR。
@@ -1,6 +1,6 @@
# fix/pal-component-delivery-pins 任务卡
任务主记录:<PR 链接,交付前填写>;状态:进行中;owner:weichen
任务主记录:PR #682 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/682(merge f23f5bb01a);状态:已完成(回填);owner:weichen
- 权威仓:ssh://git@192.168.3.2:2222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= a496ea0f0249b2b412354677ef97612ccd692d25
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-pal-component-delivery-pins(worktree);分支:fix/pal-component-delivery-pins
@@ -200,3 +200,9 @@ CI 物化修复**已生效**:三个 pin 全部通过 fail-loud 断言并各自
```
| 同步(记录前对象) | ccb6dfaa9cdf7e69eb15d7df024dee55f37b8df1 | 2af80d6a24bcde0a6da1f091acdb25c7e1e9a1f4 | 2026-10-21T13:32:30Z |
| 同步(记录前对象) | a736d5a420370cff052bd946f6d6397d4c354547 | e8dbbe001ae12048217c0a763ab7699d183f5b1f | 2026-10-21T13:57:35Z |
## 闭合记录(card-autoclose 回填)
- 依据:merge f23f5bb01a8b96ab90686d3a1b07791d7f473de2(PR #682)已包含于 origin/main,分支成果已落盘;本段为合入后回填。
- 合并主题:Merge pull request 'Advance the RDM artifact pin so the delivered lifecycle work actually ships' (#682) from fix/pal-component-delivery-pins into main
- 归档:随闭合移入 .task/archive/;任务执行期的过程证据见原任务记录与 PR。
@@ -0,0 +1,98 @@
# fix/rdm-pin-advance-latest 任务卡
任务主记录:PR #690 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/690(merge 7778fdcee7);状态:已完成(回填);owner:weichen
- 权威仓:ssh://git@192.168.3.2:2222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 1de7c28c2122609dd9b6435881696492bd052a34
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-rdm-pin-advance-latest(worktree);分支:fix/rdm-pin-advance-latest
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=2b6ce5d7821107020f4c49b973eeb7759b7c0469b0d5545016599930cd4de63c;triage_receipt=/tmp/pin-latest-triage.json;receipt_sha256=5373f2511b49f1989039e4b2ad8e500f78880a2f9ee3e759a1bf1f282abb95ef
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
<预期结果、受影响入口/模块/契约;明确不做什么。>
## Agent 实施收据
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
## 同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | 1de7c28c2122609dd9b6435881696492bd052a34 | 1de7c28c2122609dd9b6435881696492bd052a34 | 2026-10-22T05:10:35Z |
## 证据(Evidence)
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|---|---|---|---|---|---|
## 结果与验证
- 结果:
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
- 影响与剩余项:
## 合入与清理
- Review 记录:NOT_RUN(审阅智能体/平台身份、base/head、结论、问题闭合及重放依据)
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-22T05:09:36.202048+00:00",
"command": "make precheck",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev",
"before_head": "1de7c28c2122609dd9b6435881696492bd052a34",
"after_head": "1de7c28c2122609dd9b6435881696492bd052a34",
"branch": "main",
"target_branch": "main",
"target_head": "1de7c28c2122609dd9b6435881696492bd052a34",
"root_target": "main",
"immediate_target": "main",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
"[repo] branch=main head=1de7c28c21",
"[remote] origin/main=1de7c28c21 ahead=0 behind=0",
"[tree] clean submodules_drift=0 uninit=0",
"[worktrees] linked=5",
"[initiatives] local cards (not authoritative): none",
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
"[facts] policy/facts.md 6 条事实均在有效期内",
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
"[R0] 1de7c28c21(完整:1de7c28c2122609dd9b6435881696492bd052a34)",
"[worktree] before-sync: recursive component checks passed",
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
],
"output_sha256": "080b984995a553f9f8caa00556b826ba0fedd5dcdb562bec80a7422267ec9b3a",
"receipt_sha256": "a0b34b104e28c9da74270c410d6b3b43d7a4d59980c24e47ce59ff4b0ae37464",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/a0b34b104e28c9da74270c410d6b3b43d7a4d59980c24e47ce59ff4b0ae37464.json"
}
```
| 同步(记录前对象) | b7636742fc9ea937e6030123afc608fd294861bf | d8fcc0d6f6d854fda7a92ddfdcda7d0bb8c5304a | 2026-10-22T05:34:32Z |
## 闭合记录(card-autoclose 回填)
- 依据:merge 7778fdcee77505642997d4320c4036855dfcbac1(PR #690)已包含于 origin/main,分支成果已落盘;本段为合入后回填。
- 合并主题:Merge pull request 'Advance the RDM pin to the current mainline head' (#690) from fix/rdm-pin-advance-latest into main
- 归档:随闭合移入 .task/archive/;任务执行期的过程证据见原任务记录与 PR。
@@ -0,0 +1,108 @@
# feature/rdm-two-trees-followup-d-w11-w12 任务卡
任务主记录:<PR 链接,交付前填写>;状态:进行中;owner:weichen
- 权威仓:ssh://git@192.168.3.2:2222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 33d6ef69212595c680a744549986c19bb6acd6c3
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-rdm-two-trees-followup-d-w11-w12(worktree);分支:feature/rdm-two-trees-followup-d-w11-w12
- 分支类型:child;initiative_id:feature-rdm-two-trees-followup;root_target:main;immediate_target:feature/rdm-two-trees-followup;accepting_requirements:false;parent_branch:feature/rdm-two-trees-followup;parent_head_sha:e8de6ba97bc0d272af561269a10be5ec246431df;parent_pr:无;parent_source:origin
- 需求分流:verdict=JOIN;selected_initiative=feature/rdm-two-trees-followup;requirement_sha256=2e6b7a596d57861fd358bf30adca8e22defeedbea23c863e51c6fbb87eda957c;triage_receipt=/tmp/triage-incD.json;receipt_sha256=6539e3c5ab17053e7bd632a9e1bcdb15fd63c9a42e59a2d536069853a77daa97
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
<预期结果、受影响入口/模块/契约;明确不做什么。>
## Agent 实施收据
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| w11-u2-release-package | W11-U2 不可变发布包/显式用途绑定/实例化(hash 四层链,needs-review/blocked 可表达) | implementation | cursor | 1 | cursor(auto) | completed | 76f7620(RDM 分支 feature/rdm-two-trees-followup-d-w11-u2) | never | ~/.cache/agent-system-dev/agent-exec-receipts/w11-u2-release-package.json |
| w11-u3-grounded-generation | W11-U3 有依据逐块生成+真实编制人采纳(X1 provider 取证/候选草稿/禁自动确认/审计逐次记录;桩模型零真实调用) | implementation | cursor | 1 | cursor(auto) | completed | 43614d1 | never | /home/weichen/.cache/agent-system-dev/agent-exec-receipts/w11-u3-grounded-generation.json |
| w11-u4-approved-word-render | W11-U4 固定批准快照渲染/受控下载/历史持久化(hash 链延续;TTL 不触及批准快照;attempts1-2 基础设施失败,attempt3 通过) | implementation | cursor | 3 | cursor(auto) | completed | 6f5f7a5 | never | /home/weichen/.cache/agent-system-dev/agent-exec-receipts/w11-u4-approved-word-render.json |
| w11-u5-product-preview-offline | W11-U5 正式产品对话全链/单一预览入口/离线包(hash 清单+受控下载;桩模型零真实调用) | implementation | cursor | 1 | cursor(auto) | completed | d0f777d | never | /home/weichen/.cache/agent-system-dev/agent-exec-receipts/w11-u5-product-preview-offline.json |
| w11-u6-asset-catalog-expansion | W11-U6 管线扩至 44 逻辑资产+逐文件状态台账(试点族先行;needs-review/blocked 如实;零真实调用) | implementation | cursor | 1 | cursor(auto) | completed | 99adce1 | never | /home/weichen/.cache/agent-system-dev/agent-exec-receipts/w11-u6-asset-catalog-expansion.json |
| w11-smoke-superadmin-fix | product-smoke 脚本更新至新超管模型(默认合成凭据;attempt0 发现脚本沿用已废弃 bootstrap-admin) | repair | cursor | 1 | cursor(auto) | completed | 800edbe | never | ~/.cache/agent-system-dev/agent-exec-receipts/w11-smoke-superadmin-fix.json |
## 同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | 33d6ef69212595c680a744549986c19bb6acd6c3 | e8de6ba97bc0d272af561269a10be5ec246431df | 2026-10-22T07:08:11Z |
## 证据(Evidence)
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|---|---|---|---|---|---|
## 结果与验证(完成后填写)
- 结果:
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
- 影响与剩余项:
## 合入与清理
- Review 记录:NOT_RUN(审阅智能体/平台身份、base/head、结论、问题闭合及重放依据)
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-22T07:07:21.221463+00:00",
"command": "make precheck",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev",
"before_head": "33d6ef69212595c680a744549986c19bb6acd6c3",
"after_head": "33d6ef69212595c680a744549986c19bb6acd6c3",
"branch": "main",
"target_branch": "main",
"target_head": "33d6ef69212595c680a744549986c19bb6acd6c3",
"root_target": "main",
"immediate_target": "main",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
"[repo] branch=main head=33d6ef6921",
"[remote] origin/main=33d6ef6921 ahead=0 behind=0",
"[tree] clean submodules_drift=0 uninit=0",
"[worktrees] linked=6",
"[recycle] merged un-recycled branches: fix/rdm-pin-advance-latest",
"[initiatives] local cards (not authoritative): none",
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
"[facts] policy/facts.md 6 条事实均在有效期内",
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
"[R0] 33d6ef6921(完整:33d6ef69212595c680a744549986c19bb6acd6c3)",
"[worktree] before-sync: recursive component checks passed",
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
],
"output_sha256": "bae6a238774330d77e016166c60b79b796a22ec8cbdfed58574a18058fce3679",
"receipt_sha256": "fa321df05a95965c3ad2f3538b915a95b2246130d086aeb6779d10c96b8d1da6",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/fa321df05a95965c3ad2f3538b915a95b2246130d086aeb6779d10c96b8d1da6.json"
}
```
## W12 已完成项(2026-10-22)
- Dev 候选 5692e47e:`make test` exit 0(555 tests OK/skipped 18,make evidence 收据 ~/.cache/agent-system-dev/agent-exec-receipts/w12-dev-test.json)。
- Dev `make build` exit 0(bin/agent-system v0.4.0-1856-g5692e47e + storage-migrate)。
- Dev `make test-backend-pg` exit 0 @隔离 PG(svc.sh w12pg @127.0.0.1:8897 + redis 6399,实例在主检出 runtime/w12pg 保留复用);attempt1 的 pgbus TestNotifyListenerFanout 为并发 flake(隔离单测 PASS,attempt2 全绿);收据 w12-dev-pg2.json(flake)/w12-dev-pg3.json(绿)。
- 环境注意:worktree 深路径下 PG Unix socket 超 107 字节无法启动——隔离 PG 实例须建在短路径(主检出 runtime/)。
- RDM 候选 800edbe:`make test` 17 包全绿;`make product-smoke` PASS(root=React/未认证 401/7×rdm.inspect.* enabled,合成凭据)。
- `make test-lifecycle`(SVC_RDM_SRC_DIR=RDM 增量 D 工作区 + SVC_REAL_RDM_BIN=product @800edbe):套件运行但失败——pin_build NOT_RUN(RDM 源目录缺 pin-build-digests.txt,生成器待考)、登录/rdm.ping NOT_RUN(账户方案 U7/U5 依赖,设计内)、真实组合用例未通过(失败明细见收据 ~/.cache/agent-system-dev/agent-exec-receipts/w12-lifecycle-attempt.json,输出含 41 位笔误 pin 目标 SHA 的记录属 W9 历史非本仓)。待新会话按套件输出逐项调试;环境变量组合已在收据内固化。
- 待办:auth-on 浏览器矩阵、模型 A/B(预算 0/48 未动)。
+1
View File
@@ -250,3 +250,4 @@
}
```
| 同步(记录前对象) | 7e6c544b3c25c510e3d928bfb4515937a1cd6696 | 85624242789c823b96f2adb080e11833f73352e3 | 2026-10-20T11:41:24Z |
| 同步(记录前对象) | 33d6ef69212595c680a744549986c19bb6acd6c3 | 1b286ec3e68260d9d25cb3ab651ede31143d5b06 | 2026-10-22T06:35:19Z |
@@ -0,0 +1,121 @@
# 独立代码 Review:feature/agent-stack-audit-remediation-b2(U8 / U9 / U11a-c)
- 单元:agent-stack-b2-independent-review
- 评审对象:Dev 仓 `f23f5bb0...ea099a5f`(本 checkout 无 origin remote,`f23f5bb0` = R0/#682 合并点,即分支切出时 main 的 tip;`git merge-base` 确认为唯一基线)跨 pin 组件:
- deps/agent-native `2fc66be..cff6935`
- deps/agent-squad `c7121bd..9edb6ba`
- modules/backend `f084d10..9b40595`
- Dev 级:`.task/feature-agent-stack-audit-remediation-b2.md` + 五个 gitlink
- 方法:逐 diff 静态评审(spec / 回归 / 范围 / 测试四个透镜)+ 局部聚焦测试;产出 findings only,不改代码。
- pin-restore 认定:`646a2191` 恢复批次一 tip(command `fe7987d`、intent `765a7e7`、native `ac91b84`、squad `0f1daa8`、backend `b614180`),批次二增量基于其上。native 范围内 `afbb567`/`5c0d2d8`、squad 范围内 `aa15a5d..0f1daa8`、backend 范围内 `f084d10..b614180` 均为已合入批次一(#685)的恢复,按 packet 预定视为 intended,不做重复评审。
- 评审环境限制(诚实出口):本 worktree 仅材料化了 Dev 级组件;`modules/backend/deps/*`、`deps/agent-native/deps/*`、`deps/agent-squad/deps/*` 及 `adapters/{sqlite,native}` 子模块目录为空,且本单元禁止 submodule 操作,因此 backend 与上述包无法本地编译执行。相关验证以卡片记录的组合 `make test`(0b46569d 组合 PASS,exit=0)为执行证据,本地未跑部分标 NOT_RUN。
## Findings
### Blocker
无。
### Major
无。
### Minor
1. **`modules/backend/internal/runtime/squad_events.go:80`(onEvent 持锁发射)**:`squadEventLog.onEvent` 在 `l.mu` 临界区内调用 `l.rc.Emit(...)`(text_delta/tool start/end/usage 各分支)。锁内做 I/O 意味着慢 sink 会串行化所有后续帧并延迟收口 `toolParts()`。当前 sink 均为同步非阻塞,且「发射与部件同临界区」保证到达序一致(注释已说明),故不阻塞;建议后续把 Emit 摘要构造移出临界区或注明 sink 契约。属可维护性耦合,非正确性缺陷。
2. **`modules/backend/internal/runtime/llm_direct.go:755-763`(queued 在锁外读写,隐式不变量)**:`tool_execution_start` 分支 `len(st.queued)` 读取与 `takeQueued` 变更均未持 `toolMu`,仅 `inflight` 插入加锁(`:764-766`);`takeInflight` 注释要求「调用方须持有 toolMu」,`takeQueued` 无对应要求。安全性当前成立:native `serializeHostCallbacks` 串行化全部 OnEvent,且只有 onEvent 触碰 `queued`——但该不变量是隐式的,7b8a34d 的加锁改造未把它写进注释。此代码为批次一/既有(不在本 diff 修改行内),-race 全包绿;记一致性提示,不阻塞。
3. **`deps/agent-squad/squad/engine.go:998-1013`(gcFinish)/ `squad/review.go:329-343`(runReviewDriver):落盘失败后内存态与结果不一致**:终态 save 失败时函数返回 `RunFailed`,但内存 `st.Meta.Status` 仍是刚写入的 `"completed"`。结果对象主导后续流程,且 save 失败通常伴随存储故障,实际影响小;建议失败分支回写内存状态或在注释中说明取舍。
4. **任务卡收据 SHA 与最终 lineage 不一致(追溯性小疵)**:卡片实施收据表引用 `aa81b50/7d0630a`(u8)与 `25397e3`(u9),这三个提交不在 `9edb6ba` 的祖先链上。核对 `git diff aa81b50 cf83d30` 与 `git diff 25397e3 12a53b0` 均为空——即最终提交与收据候选逐字节相同,只是 transport 提交被重建。内容无偏差,建议收据表补注最终 SHA。
5. **`deps/agent-squad/adapters/sqlite/queue.go:256`(并发 claim 下的瞬时错误暴露)**:容量预读失败直接 `return error`;WAL + busy_timeout(5000)(`adapters/sqlite/db.go:20`)下高强度并发 claim 理论上可出现 SQLITE_BUSY 上抛为一次 Claim 失败。按 U9「读失败=拒绝、绝不静默放行」的语义这是正确取舍,调用方已有重试语义(runtime 轮询),仅记录为行为注记。
### Notes(不构成缺陷)
1. **pin restore 核对无误**:`646a2191` 恢复的五个 gitlink 与批次一 tip 一致;`a0b8d12b`/`0b46569d` 仅推进 native/squad/backend 至批次二 tip;Dev 级 diff = 任务卡 + 5 gitlink,无其他文件(`git diff f23f5bb0...HEAD --stat` 共 6 文件)。
2. **收据候选与最终提交同树**:见 Minor 4,无内容偏差。
3. U8 的 `migrate()` 在每次 Save/Load 都执行(PRAGMA table_info + 版本读),频度低(每次运行态保存一次),开销可接受。
4. U11c `noteRecovered`(`squad_events.go:126-131`)以「同名工具再次发起或成功」作为失败恢复启发式,注释已声明「失败部件仍留在过程部件里」;并行同名工具下极端顺序可能提前清除失败标记,仅影响收尾兜底文案,不影响部件与事件的真实状态。
## 分单元评审(spec 透镜:是否挡住 finding 的触发)
### U8 — SQLite 持久化 Mailbox/Handoffs/Board + 身份安全解码 + 错误可见
- 触发(F11):SQLite 运行重启丢失 mailbox/handoffs/board;相同 JSON 文本列互相覆盖;checkpoint/终态保存失败被吞、照发完成事件。
- 挡住触发:
- 持久化:`adapters/sqlite/runstore.go:159-176`(`runStateColumnsOf` 含 mailbox/handoffs/board)+ `:178-198`(SaveRun INSERT 三列,ON CONFLICT 同步更新);schema v2 增量迁移 `runstore.go:28`、`:60-77`、`:104-124`(ALTER TABLE 补列,旧行读 NULL→空默认,并发迁移复核)。
- 身份安全解码:`runstore.go:212-262` LoadRun 改为按列位置 Scan + 具名解码切片(`dec.col` 逐列报错),废除 `map[string]any` 文本键——同文本两列不再互相覆盖;`runstore.go:252` NULL/空串跳过。
- 错误可见:checkpoint flush 幂等化 `squad/runstore.go:146-149`、`:198-202`(flushOnce,出口与 defer 兜底只报一次);`squad/workflow.go:58-83` 出口 flush 失败经 `persistenceFailure` 折算可区分失败且幂等(`:1148-1152` 去重);`workflow.go:996-1005`(finalize 终态 save 失败→RunFailed,EvRunCompleted 不再发出)、`:1006-1012`(manifest 写失败同);边界快照失败带标记 `workflow.go:185-188`;engine 侧 `engine.go:976-985`(manualPass)、`:1001-1016`(cancelRun 可见但保持取消语义)、`groupchat.go:342-348`、`review.go:329-335`。失败经外层 `finalizeEvent`(`engine.go:1479-1491`)落到 `EvRunFailed`,完成事件严格晚于成功落盘。
- FileStore 侧 steering 持久化对称:`squad/runstate.go:100-103`(persist 写 steering.json)+ `loadRunState` 的 `st.loadSteering()`。
- 结论:覆盖全部三个触发面,无缺口。
### U9 — Claim 原子执行 agent + runtime 双重在途上限,无静默计数错误放行
- 触发(F12):仅按 agent 计数,同一 runtime 多 agent 可超 runtime 上限;计数错误被 `_=` 吞掉、静默放行。
- 挡住触发:`adapters/sqlite/queue.go:197-203` `claimSQL` 单条条件 UPDATE 同时内嵌两个守卫计数(agent 上限 + runtime 总量:`t.runtime_id=?` 或 agent 绑定该 runtime),SQLite 单语句原子性 + 写锁使并发 claim 无法越过任一上限;`:248-258` 预读失败显式 `return error`(拒绝而非放行);`:229-234` 旧的双 cap 取 min 预检保留为 only-skip 优化,UPDATE 内重数(RowsAffected==0 落空则尝试下一候选,`:266-270`);守卫计数读失败即语句失败(测试直接 DROP TABLE agent 验证)。计数口径无重复计数(OR 单行只计一次)、无遗漏(本 runtime 已租的 t.runtime_id 任务计入)。
- 结论:触发被原子守卫挡住,无静默放行路径。
### U11a — exec.ProcessEvent 携带 CallID/Status/ErrorReason(含 cancel/deny)
- 触发(F14 源侧):过程事件无身份与真实结局,消费方按工具名配对、cancel/error 一律显示成功。
- 挡住触发:
- 字段落地:`deps/agent-native/exec/backend.go:59-64`(`call_id/status/error_reason` 全 omitempty);`runtime/loop.go:46-51`(runtime.Event 同名字段)。
- 发射填充:`runtime/loop.go:715-719` `emitCancelledTool`(跳过的调用也发 start+end,Status=canceled);`:722-730` `emitToolEnd` 统一投影,error/denied/canceled 附 ErrorReason;`:838` deny→`denied`;`:844-847`、`:855-858` BeforeTool/commitToolIntent 失败→`error`;`:884-893` 执行后 `ctx.Err()` 优先于工具自报结局(取消不得报 ok)、`res.IsError`→`error`,否则 `ok`。
- 版本兼容:新字段 omitempty,legacy 事件字节不变(`exec/process_event_fidelity_test.go` TestProcessEventLegacyOmitempty 断言)。
- 结论:三类触发(配对、cancel 伪 ok、error 伪 ok)均在发射点挡住。
### U11b — squad port/bridge/taps 透传字段 + 帧到达序保持
- 触发(F14 squad 侧):事件端口丢 CallID/Status/ErrorReason;探针路径把并发工具帧按调用重排。
- 挡住触发:
- 端口:`squad/port.go:78-92`(ProcessEvent 三字段 + omitempty + ToolStatus* 常量域);`squad/progress.go:145-160` `processEventData` 三键非空才输出(legacy 投影字节不变,测试钉住);调用点 `squad/workflow.go:432`、`squad/leader.go:36`。
- 桥:`adapters/native/register.go:188-206` 一帧一回调同步转发;`:269-306` 反射按字段名探测(native 未跟进字段时零值透传、跟进后免改即生效,`optionalStringField` 带嵌套歧义防护 `:299-311`)。
- 帧序(repair `9edb6ba`):`register.go:314-337` eventTap 以 `mu` 串行扇出——「一帧→全部下游」为整体,杜绝「组合根侧 sink 已收帧、请求侧被后帧抢先」造成的两侧顺序分叉;fanoutWindow 测试把该窗口钉成确定性失败(`register_event_test.go:316-373`)。
- 结论:字段透传与到达序两个触发均被挡住,且有 legacy passthrough 用例。
### U11c — backend squad_runner/hostbridge 按 CallID 配对、真实 Status/ErrorReason 映射、共享工件态上锁
- 触发(F14 backend 侧):CallID 用工具名顶替、Status 硬编码 ok、并行回调共享工件表竞态。
- 挡住触发:
- 配对:`modules/backend/internal/runtime/squad_events.go:16-22` `toolEventID`(CallID 优先,legacy 回退工具名保持展示不变);`:96-105` start/end 以 `pending[id]` 配对。
- 状态映射:`:31-53` `toolEventOutcome`——非空 Status 原样透传(ok/error/denied/canceled 不新增不改写);空 Status 且无 ErrorReason → legacy "ok"+Detail(字节一致);空 Status 但有 ErrorReason → error(有失败信号不报 ok);非 ok 摘要取 ErrorReason 原文。
- 收尾一致性:`:133-137` 未恢复失败记录、`:163-176` finalReply 只在宿主兜底「已完成。」时替换为如实失败行,模型文本不代写。
- 工件表:`internal/runtime/hostbridge.go:29-48` artifactList 加 `mu` + `snapshot()` 拷贝,`squad_runner.go` 终局改用 `produced.snapshot()`。
- -race 修复(`7b8a34d`):`llm_direct.go:603-610` writeSlot 把工具 goroutine 对槽位的回写全部收进 toolMu;`:636-655` slotFor 空 ID 改为认领未认领槽位(claimed 标志,防并行直调撞槽);`:786-799` onEvent 在锁内快照槽位字段后再组装部件/发事件(解锁后读即竞态——原失败模式已消除)。
- 结论:配对、状态映射、并发三面均在触发点修复;legacy 空字段行为逐字节保留(`squad_events.go:36-39` + TestSquadEventsLegacyFramesUnchanged)。
## 回归透镜
- legacy 空字段行为:native(omitempty,`exec/backend.go:59-64`)、squad port(`port.go:78-92` + `progress.go:150-154` 三键全空输出与旧投影逐字节一致,测试 `squad/process_event_test.go:129-152`)、backend(`toolEventOutcome` 空 Status+空 ErrorReason → 旧 "ok"+Detail(160),`toolEventID` 空回退工具名)——三层 legacy 路径均有字节一致断言。
- 旧 schema 升级:v1 库(无新列、无版本表)→ 建表/补列/记版本,行数据不丢;`runstore_test.go:425-513` 用真实 legacy DDL+行数据验证(含升级后写入协作态、旧列不被 clobber)。
- 既有语义保留:U9 租约 5 分钟、reclaim、`RowsAffected==0` 换下一候选;U8 async/on_exit 出口语义保留(对照测试 `checkpoint_test.go:318-338`);U11c 的 usage 转发、text/reasoning delta、`textIdx` 行为不变;`eventTap` 仍为同步回调(不排队不缓存)。
- 取消语义:`cancelRun`(`engine.go:1001-1016`)保存失败仅补可见错误与 `out.Error`,仍返回 RunCancelled——不改变取消本身的结局。
## 范围透镜
- Dev 级:仅任务卡 + 5 gitlink,与声明一致。
- native `cff6935`:7 文件全部落在 U11a 声明面(exec/、runtime/loop.go、adapters/native 转换 + 测试);其余范围 diff 均属批次一恢复提交。
- squad `cf83d30/12a53b0/676a1ed/9edb6ba`:文件均在 U8/U9/U11b 声明面;`deps/agent-intent`/`deps/agent-native` gitlink 指向批次一恢复 tip(`cdd51c8`),无越界。
- backend `f8e9e9f..9b40595`:4 提交均为 U11c + repair + pin;大 diff 中的 intentgate/route/server/cmdbus 等改动全部来自 `f084d10..b614180` 的批次一恢复,与卡片「pin-restore 预期」一致。
- 未发现超出声明单元的代码变更。
## 测试透镜(是否断言触发/并发/故障注入而非 happy path)
- U9:`queue_test.go` 覆盖双上限交叉(runtime 跨 agent `:72`、agent 跨 runtime `:119`)、12 worker 真并发不越界 `:144`、释放后重取 `:207`、计数失败三态(库不可读/agent 表缺失/守卫计数直击 `:248-329`,后者直接执行 claimSQL 验证语句级失败且任务保持 queued)。
- U8:`runstore_test.go` 往返 `:64`、同文条目不坍缩 `:385`、legacy 升级 `:425`、跨重启协作态 `:514`、save 失败 3 mode × 2 fault 矩阵 `:686`(断言无 run_completed + "persistence failure" 可见);`checkpoint_test.go:248/279` 三档 flush/终态失败注入(faultStore),并断言事件序最后一枚终态事件必为 run_failed、交付物文件仍在(业务动作不回滚);`:318` 对照组防「压根没写」空过。
- U11a:`loop_event_fidelity_test.go` 同名工具异 CallID `:27`、error/denied/canceled 状态 `:95/:122/:164`、批量取消跳过帧必为 canceled 非 ok `:243`。
- U11b:`register_event_test.go` legacy 透传 `:27`、反射探测 `:55`、并发身份保持 `:236`、到达序(桥与 tap 双 sink 单序,fanoutWindow 确定性复现竞态窗口 `:306/:373`)。
- U11c:`squad_events_test.go` CallID 配对 `:74`、真实状态 `:108`、legacy 不变 `:167`、64 路并发回调零丢失/零重复 `:206`、并发共享工件表 `:267`、收尾文本与工具结局一致 `:300`。
- 测试质量总体:故障注入为真实注入(faultStore/faultingStore/DROP TABLE/关库),并发用例为真 goroutine,且普遍带 legacy 对照组——满足「断言触发而非 happy path」。
## 本地聚焦测试(GOWORK=off,逐条一行)
- `deps/agent-native`:`go test ./exec/ ./runtime/session/ ./runtime/tools/` → ok(3 包全绿,tools 11.4s)。
- `deps/agent-native`:`go test ./runtime/` 与 `./adapters/native/` → NOT_RUN(缺嵌套 deps/error-code-system 材料,本单元禁止 submodule 操作;见卡片组合验证)。
- `deps/agent-squad`:`go test ./squad/ ./adapters/sqlite/ ./adapters/native/` → NOT_RUN(同上,嵌套 deps 未材料化;见卡片组合验证)。
- `modules/backend`:`go build ./internal/runtime/` → NOT_RUN(backend 自身嵌套 deps 为空目录,无法解析 replace;执行证据取卡片记录的组合 `make test` @ 组合验证 PASS(exit=0))。
- 说明:组合验证收据(卡片:全量 make test @ 0b46569d)覆盖上述 NOT_RUN 包在精确 pin 上的执行;本评审的独立复核以静态逐行为主。
## 结论
五个声明单元(U8、U9、U11a、U11b、U11c)及两处修复(帧序、-race)均在触发点完成修复,legacy/升级兼容有测试钉住,范围与声明一致,无 blocker/major;5 条 minor 均为非阻塞的一致性/追溯性提示,可作为后续独立增量。
REVIEW VERDICT: APPROVE
+6 -5
View File
@@ -1,11 +1,12 @@
# RDM 制品钉扎。三行都是 40 位 hex。升级走 PR,不在 CI 里执行候选文件。
# sha:生命周期套件的目标版本(6-pin 布局)。
# prev_sha:来回部署身份稳定性测试的起点。选取受两条硬约束——与 sha 的 pins 布局一致,
# 且两者之间无跨 schema 迁移(scripts/svc.sh 的 schema 兼容闸会在停旧服务前拒绝不兼容切换)——
# 而非追求版本跨度。取 sha 在 RDM 主线上的第一父提交(交付合入前的 main);代价是 prev 与 sha
# 仅隔一次合并,版本跨度小,往返部署覆盖的版本距离有限。
# 且两者之间无跨 schema 迁移(scripts/svc.sh 的 schema 兼容闸会在停旧服务前拒绝不兼容切换)。
# 取上一个已钉住的 sha:同为 6-pin 布局,与 sha 之间无 schema/迁移变更,在 RDM 主线上与 sha
# 相距 59 个提交,往返部署覆盖的版本跨度大于仅隔一次合并的相邻提交。
# legacy_sha:承载「无身份」语义(没有 version --json),必然早于 6-pin 布局。
# 三者的 pins 布局可能不同;CI 按每个 pin 自身的 gitlink 清单物化并逐个断言,不要求布局统一。
sha=bc8db886606e88201e7f7210a1357d22dc84124b
prev_sha=59b3624325fe132ef92ccee83dd9ddc6c3fcc521
# 来回切换的 schema 兼容不由钉扎保证,由真实生命周期套件检验。
sha=ee8c2cdf4a0ed88cdc4037f4b43501e1eebc4c5b
prev_sha=bc8db886606e88201e7f7210a1357d22dc84124b
legacy_sha=72bb1fec79d64c2af5e49416640712320816c3b4
+18 -28
View File
@@ -184,12 +184,17 @@ esac
"""
def free_fixture_port():
with socket.socket() as reservation:
reservation.bind(("127.0.0.1", 0))
return reservation.getsockname()[1]
class SvcAutoRecoverTests(unittest.TestCase):
def setUp(self):
tmp = tempfile.mkdtemp(prefix="svc-autorecover-")
self.addCleanup(shutil.rmtree, tmp, True)
self.root = Path(tmp)
self._allocated_ports = set()
(self.root / "scripts").mkdir(parents=True)
shutil.copy2(SVC_SCRIPT, self.root / "scripts" / "svc.sh")
self.trace = self.root / "trace"
@@ -249,21 +254,6 @@ class SvcAutoRecoverTests(unittest.TestCase):
self.assertEqual(proc.returncode, 0, proc.stdout)
return proc
def available_port(self):
"""Allocate a distinct service port for this test, including address changes.
The socket closes before svc.sh binds it, leaving a small allocation-to-start
race with unrelated processes. Keep allocated numbers distinct within the
test so stopped/restarted services never share another instance's port.
"""
while True:
with socket.socket() as sock:
sock.bind(("0.0.0.0", 0))
port = sock.getsockname()[1]
if port not in self._allocated_ports:
self._allocated_ports.add(port)
return port
def runtime(self, name):
return self.root / "runtime" / name
@@ -346,14 +336,14 @@ class SvcAutoRecoverTests(unittest.TestCase):
# ---- 1. 期望态:start 成功置位 / 显式 stop 清除(含进程已死的 stop)----
def test_start_records_autostart_and_stop_clears(self):
self.seed_agent("dev", self.available_port())
self.seed_agent("dev", free_fixture_port())
self.start_ok("dev")
self.assertEqual(self.kv("dev", "autostart"), "1")
self.svc("dev", "stop")
self.assertIsNone(self.kv("dev", "autostart"))
def test_stop_on_dead_process_clears_autostart(self):
self.seed_agent("dev", self.available_port())
self.seed_agent("dev", free_fixture_port())
self.start_ok("dev")
self.kill9("dev")
# 进程已死但 autostart 保留(等待 recover);显式 stop 表示"保持停止"。
@@ -364,7 +354,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
# ---- 2. recover:崩溃拉回 / 运行中不动 / 显式停止不复活 / 未启动不碰 ----
def test_recover_restarts_sigkilled_service(self):
port = self.available_port()
port = free_fixture_port()
self.seed_agent("dev", port)
self.start_ok("dev")
old_pid = self.kill9("dev")
@@ -381,7 +371,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
self.assertIn("--addr 127.0.0.1:%d" % port, self.kv("dev", "exec"))
def test_recover_noop_while_running(self):
self.seed_agent("dev", self.available_port())
self.seed_agent("dev", free_fixture_port())
self.start_ok("dev")
pid = self.pid_of("dev")
result = self.svc("recover")
@@ -390,7 +380,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
self.assertEqual(self.history_events("dev", "recover"), [])
def test_recover_respects_explicit_stop(self):
self.seed_agent("dev", self.available_port())
self.seed_agent("dev", free_fixture_port())
self.start_ok("dev")
self.svc("dev", "stop")
result = self.svc("recover")
@@ -399,7 +389,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
self.assertEqual(self.history_events("dev", "recover"), [])
def test_recover_ignores_never_started_service(self):
self.seed_agent("dev", self.available_port()) # 从未 start:无 autostart 键
self.seed_agent("dev", free_fixture_port()) # 从未 start:无 autostart 键
result = self.svc("recover")
self.assertEqual(result.returncode, 0, result.stdout)
self.assertFalse(self.pid_alive(self.pid_of("dev")))
@@ -408,7 +398,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
# ---- 3. 并发防护:生命周期锁被持有时 recover 跳过 ----
def test_recover_skips_when_lock_held(self):
self.seed_agent("dev", self.available_port())
self.seed_agent("dev", free_fixture_port())
self.start_ok("dev")
self.kill9("dev")
lock = self.runtime("dev") / ".start.lock"
@@ -428,7 +418,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
# ---- 4. 恢复失败路径:端口被外部进程占用 → fail 事件 + 非零退出 ----
def test_recover_fails_when_port_stolen(self):
port = self.available_port()
port = free_fixture_port()
self.seed_agent("dev", port)
self.start_ok("dev")
self.kill9("dev")
@@ -453,7 +443,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
if bound:
break
time.sleep(0.05)
self.assertTrue(bound, f"thief 未能在 5s 内监听 {port}")
self.assertTrue(bound, "thief 未能在 5s 内监听 18808")
try:
result = self.svc("recover", check=False)
self.assertEqual(result.returncode, 1, result.stdout)
@@ -497,7 +487,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
"""模拟 update 误清 pidfile 后本 bin 仍占口:裸 start 应回收并拉起新进程。"""
if not self._ss_can_attribute_pid():
self.skipTest("ss -ltnp 无法归因 PID(reclaim_own_port 需此能力)")
port = self.available_port()
port = free_fixture_port()
self.seed_agent("dev", port)
self.start_ok("dev")
old = self.pid_of("dev")
@@ -518,7 +508,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
def test_start_rejects_foreign_port_occupant(self):
"""外部 python http.server 占口:start 必须失败并提示非本服务。"""
port = self.available_port()
port = free_fixture_port()
self.seed_agent("dev", port)
thief = subprocess.Popen(
["python3", "-m", "http.server", str(port), "--bind", "127.0.0.1"],
@@ -555,7 +545,7 @@ class SvcAutoRecoverTests(unittest.TestCase):
self.assertFalse((unit_dir / "agent-system-svc-recover.service").exists())
def test_recover_reserved_name_rejected(self):
self.seed_agent("recover", self.available_port()) # 保留字不可作服务名
self.seed_agent("recover", free_fixture_port()) # 保留字不可作服务名
result = self.svc("recover", "recover", check=False)
self.assertEqual(result.returncode, 2, result.stdout)