Repository navigation
feat(workboard): record optional claims, observations, and verification - #197471
Conversation
… evidence Cards can now carry result evidence in metadata.automation.evidence, kept apart by source: - claim: worker statements passed as `claims` to workboard_complete, stamped with the calling agent and the card's run. Gateway completion, which has no agent identity, rejects claims. - observation: a linked session's run outcome, written only by session lifecycle sync (one per run). - verification: a checker's verdict from the new workboard_verify tool, stamped with the caller as checker; checkedOwnWork marks a known match with the worker and never asserts independence. Evidence is strictly additive: completion never waits on it, proof statuses and dependency scheduling are unchanged, and stored boards need no migration (it lives in the existing automation JSON). Every card write restores the stored list in updateCard, so generic metadata writes cannot add, edit, or drop it. Retention is the newest 4 per kind within 6 KiB so it never crowds proof or attempts out of the 24 KiB card budget. Supersedes openclaw#161618 without its completion gates.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: ready, awaiting a maintainer decision. What this changesThis PR adds optional worker claims, lifecycle observations, and checker verifications to Workboard cards without gating completion. Example: Worker agent worker completes a card, and reviewer agent reviewer disputes its claim.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision Keep open for a Workboard owner decision on the additive persisted contract; the prior retention finding is resolved, and no new actionable code defect was identified. Priority: P3 Decision needed
Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Workboard plugin receives agent-tool mutations and session lifecycle events, then stores bounded card metadata through its existing database owner. flowchart LR
A[Worker completion] --> D[Workboard store]
B[Session lifecycle] --> D
C[Checker verification] --> D
D --> E[Metadata budget owner]
E --> F[Persisted card]
F --> G[Card readers]
Technical reviewBest possible solution: Have the Workboard owner settle the minimal optional evidence contract while retaining the existing store, lifecycle producers, and non-gating completion behavior. Do we have a high-confidence way to reproduce the issue? No upstream defect reproduction applies; current source confirms that structured checker records are a new capability. Is this the best way to solve the issue? The additive approach reuses existing owners and preserves completion semantics, but adopting its persisted contract remains a product decision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 17db2476982f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +453, Tests +44, Docs +37. Total +534 across 13 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed November 12, 2026, 7:40 PM ET / November 13, 2026, 00:40 UTC (Revision 4). |
…ds leave Evidence was attached and then run through the metadata trimmer, so a card near its 24 KiB budget lost attempts, proof, or artifacts to make room for a verification. Evidence now drops its own oldest entries until the card fits and never makes the trimmer evict anything; workboard_verify refuses with an error when its record cannot fit. Tests: the evidence tests shrink to one regression test, in its own file because store.test.ts is over its line cap, with an allocation for the 9 lines past the test-line ceiling. The reopen test with the two unawaited store closes (no-floating-promises) is gone with the trim.
|
Runtime and stored-data checks passed at Through the running Gateway:
For compatibility, npm stable The candidate runtime build and the existing Workboard retention regression passed in the VM. The model transport was a local scripted stand-in; no live external model or broad CI run is claimed. The sanitized artifact records the entry point, environment, producer identities, and observed states. This evidence does not supply the separate feature-owner contract decision. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…final Evidence was fitted before the attempt sync and the final trim, so a terminal lifecycle event on a nearly full card could add an attempt, push the card over budget, and have the trimmer evict that attempt while the optional evidence stayed. Evidence is now fitted last: the finished card metadata is trimmed first and evidence takes only the room left. A verification that cannot fit is refused with the same ToolInputError- named error as the claim refusals, so the Gateway reports a 400 instead of a 500. Drops the test-line allocation record: the PR's +26 net test lines are within the per-PR allowance.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…on (openclaw#197471) * feat(workboard): record optional claim, observation, and verification evidence Cards can now carry result evidence in metadata.automation.evidence, kept apart by source: - claim: worker statements passed as `claims` to workboard_complete, stamped with the calling agent and the card's run. Gateway completion, which has no agent identity, rejects claims. - observation: a linked session's run outcome, written only by session lifecycle sync (one per run). - verification: a checker's verdict from the new workboard_verify tool, stamped with the caller as checker; checkedOwnWork marks a known match with the worker and never asserts independence. Evidence is strictly additive: completion never waits on it, proof statuses and dependency scheduling are unchanged, and stored boards need no migration (it lives in the existing automation JSON). Every card write restores the stored list in updateCard, so generic metadata writes cannot add, edit, or drop it. Retention is the newest 4 per kind within 6 KiB so it never crowds proof or attempts out of the 24 KiB card budget. Supersedes openclaw#161618 without its completion gates. * fix(workboard): keep result evidence inside the room other card records leave Evidence was attached and then run through the metadata trimmer, so a card near its 24 KiB budget lost attempts, proof, or artifacts to make room for a verification. Evidence now drops its own oldest entries until the card fits and never makes the trimmer evict anything; workboard_verify refuses with an error when its record cannot fit. Tests: the evidence tests shrink to one regression test, in its own file because store.test.ts is over its line cap, with an allocation for the 9 lines past the test-line ceiling. The reopen test with the two unawaited store closes (no-floating-promises) is gone with the trim. * fix(workboard): fit result evidence after the card's own metadata is final Evidence was fitted before the attempt sync and the final trim, so a terminal lifecycle event on a nearly full card could add an attempt, push the card over budget, and have the trimmer evict that attempt while the optional evidence stayed. Evidence is now fitted last: the finished card metadata is trimmed first and evidence takes only the room left. A verification that cannot fit is refused with the same ToolInputError- named error as the claim refusals, so the Gateway reports a 400 instead of a 500. Drops the test-line allocation record: the PR's +26 net test lines are within the per-PR allowance. * fix(workboard): keep stored evidence out of ordinary metadata trimming A manual move to done or blocked sends no metadata patch, so normalizeMetadata trimmed the existing metadata with its evidence still inside, and settlement trimmed again after adding the attempt and notification. On a nearly full card that evicted the attempt and kept the optional evidence. updateCard now normalizes against the existing metadata with evidence removed, so no ordinary normalization, settlement, or trim counts it; withStoredEvidence restores what fits once the card's metadata is final. The regression test extends through a manual move on a nearly full card. * chore: retrigger CI
The constant is only used inside store-evidence.ts; the unused export fails the dead-export check on main (introduced by #197471).
Cards written on main since openclaw#197471 store claims, observations, and verifications under automation.evidence. Writes without a metadata patch sent that list through trimming, so a manual move to done on a nearly full card evicted an artifact to keep it, while a {} patch dropped it along with the checker verdicts. Split it off with the stored verifications before normalization: verdicts carry over into automation.verifications, claims and observations are dropped, and the evidence key never reaches the trimmer.
The constant is only used inside store-evidence.ts; the unused export fails the dead-export check on main (introduced by openclaw#197471).
* refactor(workboard): keep only checker verifications Claims on workboard_complete and lifecycle observations had no reader, and proof and run attempts already hold the worker's report and the card's run history. Drop both, keep workboard_verify, and store its records as metadata.automation.verifications without a kind tag. With one record type, retention is the newest 4 verifications; the 6 KiB evidence cap is gone because verifications already fit only into room the card's own records leave. The normalizeMetadata option rename is reverted: the verification module maps the update options itself. * fix(workboard): convert main's evidence list before trimming Cards written on main since #197471 store claims, observations, and verifications under automation.evidence. Writes without a metadata patch sent that list through trimming, so a manual move to done on a nearly full card evicted an artifact to keep it, while a {} patch dropped it along with the checker verdicts. Split it off with the stored verifications before normalization: verdicts carry over into automation.verifications, claims and observations are dropped, and the evidence key never reaches the trimmer. * fix(workboard): read main's verdicts without a type assertion * fix(workboard): share the card run-attempt lookup with verification Main's session identity ratchet gives new files no allowance, so the run-attempt check that moved from store-evidence.ts into store-verification.ts failed it. Both callers now use one helper in store-card-helpers.ts, and the stale store-evidence.ts allowlist entry is pruned.
* refactor(workboard): keep only checker verifications Claims on workboard_complete and lifecycle observations had no reader, and proof and run attempts already hold the worker's report and the card's run history. Drop both, keep workboard_verify, and store its records as metadata.automation.verifications without a kind tag. With one record type, retention is the newest 4 verifications; the 6 KiB evidence cap is gone because verifications already fit only into room the card's own records leave. The normalizeMetadata option rename is reverted: the verification module maps the update options itself. * fix(workboard): convert main's evidence list before trimming Cards written on main since openclaw#197471 store claims, observations, and verifications under automation.evidence. Writes without a metadata patch sent that list through trimming, so a manual move to done on a nearly full card evicted an artifact to keep it, while a {} patch dropped it along with the checker verdicts. Split it off with the stored verifications before normalization: verdicts carry over into automation.verifications, claims and observations are dropped, and the evidence key never reaches the trimmer. * fix(workboard): read main's verdicts without a type assertion * fix(workboard): share the card run-attempt lookup with verification Main's session identity ratchet gives new files no allowance, so the run-attempt check that moved from store-evidence.ts into store-verification.ts failed it. Both callers now use one helper in store-card-helpers.ts, and the stale store-evidence.ts allowlist entry is pruned.
Fixes #197450
Supersedes #161618
What Problem This Solves
Workboard needs to distinguish worker claims, observed run outcomes, and checker verdicts without making evidence a requirement for completing work.
User Impact
Workers can include optional claims when completing a card, and checkers can record what they checked and whether it was confirmed, disputed, or inconclusive. Completion and dependency scheduling keep their existing behavior, including for cards without evidence.
Why This Change Was Made
Store the three record types separately with their source identities. Session lifecycle sync owns observations, and generic metadata writes cannot forge or remove evidence. Records are bounded to the newest four per kind within 6 KiB, and evidence only uses room the card's other records leave: near the 24 KiB card budget it drops its own oldest entries and never evicts proof, attempts, comments, or artifacts.
workboard_verifyreturns an error when its record cannot fit; claims and observations that cannot fit are dropped without failing completion. No database migration is required; older versions may drop this optional evidence when writing a card.Evidence
store-evidence.test.ts: fails on63808cadb49(a verification on a card near its budget evicted existing artifacts) and passes on this head. It also covers forged evidence through raw metadata and evidence surviving a later metadata write.config/test-lines-allocations/197471-workboard-result-evidence.txtallocates the 9 lines past the ceiling; the regression test lives in its own file becausestore.test.tsis over its line cap.