A2 run diagnostics read API #704

Open
weichen wants to merge 0 commits from feature/exec-recovery-diagnostics-a2 into main
Owner

Land functional follow-up A2: a read-only diagnostics endpoint that answers, for one run, where it is stuck, who is responsible, why it waits, the last stable checkpoint, known side effects and the next action.

Why: recovery semantics from batches 1-2 (reconciliation holds, trusted terminal records, honest failures) are only visible by querying tables by hand; operators need one authorized read that aggregates them.

Evidence: one implementation unit (internal/rundiag aggregator + GET /api/runs/{id}/diagnostics; owner/project authorization identical to neighboring run-read routes), per-state responsibility tests (recovery hold, HITL, confirmation, failed, completed, running), the architecture baseline edges registered as the reviewed design, and a green full make test (verify-a2-combo2.json). Independent review lands in the task card before merge.

Impact: backend pin advances to 06b0c9f; strictly read-only; no execution or recovery behavior changes. No UI, no write endpoints. A3/A4 remain out of scope.

Refs: docs/superpowers/plans/2026-10-21-agent-stack-audit-remediation-plan.md (A2)

Land functional follow-up A2: a read-only diagnostics endpoint that answers, for one run, where it is stuck, who is responsible, why it waits, the last stable checkpoint, known side effects and the next action. Why: recovery semantics from batches 1-2 (reconciliation holds, trusted terminal records, honest failures) are only visible by querying tables by hand; operators need one authorized read that aggregates them. Evidence: one implementation unit (internal/rundiag aggregator + GET /api/runs/{id}/diagnostics; owner/project authorization identical to neighboring run-read routes), per-state responsibility tests (recovery hold, HITL, confirmation, failed, completed, running), the architecture baseline edges registered as the reviewed design, and a green full `make test` (verify-a2-combo2.json). Independent review lands in the task card before merge. Impact: backend pin advances to 06b0c9f; strictly read-only; no execution or recovery behavior changes. No UI, no write endpoints. A3/A4 remain out of scope. Refs: docs/superpowers/plans/2026-10-21-agent-stack-audit-remediation-plan.md (A2)
weichen added 5 commits 2026-10-22 13:40:34 +00:00
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-exec-recovery-diagnostics-a2.md; R0=c92443280ef8e9ed29bf5bf5250df650c01b4478.

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

Refs: .task/feature-exec-recovery-diagnostics-a2.md
Why: fix the read-only diagnostics contract (single GET endpoint,
aggregated responsibility/wait-reason/checkpoint/side-effects/next-step,
no write endpoints) before implementation.
Evidence: scoping over server routes, store recovery/HITL methods and
cmdbus audit records.
Impact: task metadata only.
Refs: docs/superpowers/plans/2026-10-21-agent-stack-audit-remediation-plan.md (A2)
Why: land the read-only run diagnostics endpoint (A2) per the approved
feature scope.
Evidence: integration transport (a2git2-run.json); unit tests green
(verify-a2b.json exit=0); combination re-run below.
Impact: one component gitlink.
Refs: feature/exec-recovery-diagnostics-a2
Why: the A2 diagnostics package reuses the cmdbus operation query and
store reads, mediated by the server; the three edges are the reviewed
design, recorded in the task card.
Evidence: lint-architecture passes (verify-a2arch.json); boundaries
and full combination re-run below.
Impact: three baseline edge lines.
Refs: feature/exec-recovery-diagnostics-a2
Record the A2 implementation and combination results
ci / svc-realcombo (pull_request) Successful in 3m50s
ci / test (pull_request) Successful in 9m42s
ci / test-pg (pull_request) Successful in 14m45s
d0b2bde9b0
Why: audit trail for the diagnostics endpoint unit, the baseline edge
registration and the green full combination run.
Evidence: verify-a2b.json and verify-a2-combo2.json exit=0.
Impact: task metadata only.
Refs: feature/exec-recovery-diagnostics-a2
weichen added 2 commits 2026-10-22 14:01:09 +00:00
Record the A2 review approval in the task card
ci / svc-realcombo (pull_request) Successful in 4m31s
ci / test (pull_request) Successful in 10m36s
ci / test-pg (pull_request) Successful in 19m1s
b0d481e91e
Why: independent review approved the diagnostics endpoint (0 blockers,
0 majors).
Evidence: review receipt /tmp/agent-stack-b2/reviewa2b-run.json.
Impact: task metadata + review report.
Refs: PR #704
weichen added 1 commit 2026-10-22 14:20:45 +00:00
Fold-close the task card before merge
ci / svc-realcombo (pull_request) Successful in 4m1s
ci / test-pg (pull_request) Failing after 6m48s
ci / test (pull_request) Successful in 12m15s
b58caf2d99
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/feature-exec-recovery-diagnostics-a2.md -> .task/archive/feature-exec-recovery-diagnostics-a2.md; status 已完成(合入前闭合); PR #704 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/704.
Impact: task metadata only; the card is archived within PR #704 and lands with its merge commit.
Refs: task.sh close --self
weichen added 1 commit 2026-10-22 15:05:39 +00:00
Repin modules/backend with the intent-test hardening
ci / svc-realcombo (pull_request) Successful in 3m43s
ci / test (pull_request) Successful in 10m49s
ci / test-pg (pull_request) Successful in 14m3s
9a6ae6c571
Why: the intent-session tests were load-sensitive in CI (409 races
against the prior run settling); the hardening rides the A2 pin.
Evidence: repair receipt (a1ff-run.json) and 3x race verification
(verify-a1ff.json exit=0) on the merged tip; full make test green
(verify-a2-combo3.json exit=0).
Impact: one component gitlink.
Refs: PR #704
All checks were successful
ci / svc-realcombo (pull_request) Successful in 3m43s
Required
Details
ci / test (pull_request) Successful in 10m49s
Required
Details
ci / test-pg (pull_request) Successful in 14m3s
Required
Details
This branch is already included in the target branch. There is nothing to merge.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/exec-recovery-diagnostics-a2:feature/exec-recovery-diagnostics-a2
git checkout feature/exec-recovery-diagnostics-a2
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#704