Repository navigation
Add the task audit projection and count a rework chain once - #1735
Conversation
rt.taskAudit(id) renders the handoff, evidence, reworkOf chain and current lease from the typed rows already on the card; the Project board carries the same text as one audit field and the client shows it in the existing card detail. rt.taskCounters folds an accepted rework child into its accepted parent, so a rejection -> rework -> accept cycle is two records and one delivery. The strict release DAG test pins build -> test -> publish order, the refusal of an unproduced required input, and a restart that adds no second downstream task. Docs updated (core-host.md, workflow.md); client.js and patches regenerated from source.
The audit test is standalone: it does not need the project-board and room-context installs or the restart/byActor helpers copied from the typed-contract test.
arch-docs owns core/client.js and src/client/project-board.js through core-client.md, so the audit line is recorded there beside the row mapping it belongs to.
|
Verdict: PASS at 9c29b9c Ran at this tip: Red first: with the base blobs (38d70fe) of the three changed sources restored — Review points at this tip:
Not run: the full Tier is T3 (size: 314 changed lines / 9 files beyond the T2 cap), so this PASS at the tip is required; green CI alone would not merge it. |
Written-by: Dev
Part of #1550
Fixes #1730
Owner: Chief
Reviewer: Reviewer
Tip SHA: 9c29b9c
Base: 38d70fe
Docs: updated
docs/subsystems/core-host.md(audit projection, delivery counting) anddocs/subsystems/workflow.md(strict release DAG + restart regression) in this branch.What changed
The typed rows from 3.1/3.2 are now readable as one audit block, and a rework cycle no longer doubles a delivery count.
rt.taskAudit(id)incore/src/host/tasks.jsrenders one text block from the fields already on the card:handofffrom→to/reason/at, eachevidencesha/pr/check/at, thereworkOfchain oldest→newest, and the current lease holder with its takenAt→expiresAt window. It writes nothing and stores nothing; the same rows render the same text twice, and a pre-slice record answers the empty string instead of throwing.rt.taskCountersfolds an acceptedreworkchild whosereworkOfparent is also accepted into the parent's delivery: a rejection→rework→accept cycle is two records and one delivery, a replay writes no rows so the count cannot double, and a child whose parent never landed stays a delivery of its own.core/src/host/project-board.jsputs the same text on the row as oneauditfield when non-empty;core/src/client/project-board.jsshows it inside the existing card detail (no new endpoint, no new page), withcore/client.jsrebuilt from source.plugins/workflow/test/strict-release-dag.test.jspins the release-shaped strict graph: build→test→publish in declared order, a node with an unproduced required input refused, and a second start after a crash between claim and result starting no second downstream task.Verification at the tip
Tip SHA: 9c29b9c
Ran:
TZ=UTC DSH_HARNESS=/opt/flybot node --import ./test/harness-resolve.mjs --test "test/*.test.js"incore/(full core suite, green);node --test "test/*.test.js"inplugins/workflow(full plugin suite, green, 245+ cases);node scripts/build-client.mjs --check;node scripts/ds-bot-patches.mjs check(11 patches apply, core equals ds-bot/ + patches). Targeted evidence at this tip:test/task-audit.test.js4 pass, andtest/strict-release-dag.test.js3 pass.Tip moved to 9c29b9c for the lint and arch-docs fixes (unused test helpers, client doc); no product behavior changed. Red first: reverting
rt.taskAuditand the rework fold made all 4core/test/task-audit.test.jscases fail; restored, all 4 pass.Not run (and why):
npm run verify(the wrapper: oxlint +arch-docsneedgit, which this instance lacks) and the smoke test (core/index.jsis untouched). Fulltests-okruns in CI at this tip.Checkpoint
{ "pr": 1735, "claim": "Chief", "issue": 1730, "summary": "The task store renders one audit block per card from the typed fields already there: handoff, evidence, rework chain and the current lease, with nothing written. The Project board carries it as one audit field and the client shows it in the existing card detail. An accepted rework child folds into its accepted parent, so a rejection to rework to accept cycle counts two records and one delivery, and a replay cannot double it. The strict release DAG test pins build to test to publish order, refuses an unproduced required input, and proves a restart after a crash adds no second downstream task.", "files": [ "core/src/host/tasks.js", "core/src/host/project-board.js", "core/src/client/project-board.js", "core/client.js", "core/test/task-audit.test.js", "plugins/workflow/test/strict-release-dag.test.js", "patches/ds-bot/0017-task-pool-role-queues.patch", "docs/subsystems/core-host.md", "changelog.d/1730-task-audit.added.md" ], "checks": { "ran": "TZ=UTC node --test test/task-audit.test.js (4 pass), 56 related core tests, plugins/workflow/test/strict-release-dag.test.js (3 pass), build-client --check, ds-bot-patches check", "result": "green", "at": "9c29b9cc6699709bac1108387a57410ecf910056" }, "next": "none — ready for review" }