Skip to content

feat(workboard): record optional claims, observations, and verification - #197471

Merged
hannesrudolph merged 6 commits into
openclaw:mainfrom
daniel-lxs:move-dan-s-workflow-from-y8dlai
Nov 14, 2026
Merged

hannesrudolph merged 6 commits into
openclaw:mainfrom
daniel-lxs:move-dan-s-workflow-from-y8dlai

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

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_verify returns 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

  • Regression test store-evidence.test.ts: fails on 63808cadb49 (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.
  • Workboard suites: 192 tests passed across seven files (store, tools, lifecycle sync, plugin registration, Gateway, attempts, evidence). Extension and extension-test typechecks, type-aware lint, formatting, the line-cap ratchet, and the test-line ratchet passed locally.
  • Test lines: the PR adds 27 net test lines. config/test-lines-allocations/197471-workboard-result-evidence.txt allocates the 9 lines past the ceiling; the regression test lives in its own file because store.test.ts is over its line cap.
  • Isolated Gateway scenario with a stand-in model: completion with and without records, lifecycle observation from a real session run, checker verification, and rejection of forged observations through generic metadata. Not run against a live external model; the budget-fitting behavior is covered by the regression test, not this scenario.

… 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.
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation plugin: workboard size: L labels Nov 12, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: ready, awaiting a maintainer decision.

What this changes

This 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.

  • Before: The card can store worker-reported proof but has no structured checker verdict.
  • After: A verification records checkerId reviewer and outcome disputed while the card remains done.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused implementation and meaningful Gateway/upgrade evidence support the patch, while owner direction and the uncleared CI gate prevent merge readiness.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The inspected artifact exercises the built Gateway with a scripted model transport, demonstrating distinct producers, non-gating verification, metadata ownership, restart persistence, and stable-to-candidate preservation; the latest retention adjustment is supported by source and its added regression rather than fresh runtime output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Reviewers must manually distinguish worker statements, execution outcomes, and checker conclusions.
Reason: The implementation matches the linked additive proposal, but the new persisted and model-facing contract has no recorded feature-owner approval.

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
Reviewed head: 48b4ee88ee648baefeb26a2d8fef2532c9baa05c
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should Workboard adopt this optional persisted evidence collection and workboard_verify tool, including its producer identities, retention limits, and documented older-version data loss?
  • Recommendation: Approve the bounded additive contract: Accept separate claims, lifecycle observations, and checker verdicts while preserving existing completion and scheduling semantics.
  • Why: The earlier proof contract explicitly deferred this decision, and neither this PR nor its linked issue records human owner approval.

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied runtime artifact predates the latest manual-move retention repair, and a red-on-base/green-on-head run of that newly added regression is not shown.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Dallin Romney: Raw commit 1339827 adds extensions/workboard/src/lifecycle-sync.ts:226 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 133982706f49; files: extensions/workboard/src/lifecycle-sync.ts)

PR surface

Source +453, Tests +44, Docs +37. Total +534 across 13 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 11 465 12 +453
Tests 1 44 0 +44
Docs 1 37 0 +37
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 546 12 +534

Preflight source

Source 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

Metric Value Why it matters
Contract expansion 1 optional tool, 1 completion input, 1 persisted collection workboard_verify, completion claims, and automation.evidence create a lasting feature contract requiring owner direction.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #197450
Summary: This PR implements the paired additive feature request; the older draft overlaps but also introduces completion gates that this proposal excludes.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 session-state: Current PR review merge-risk labels are merge-risk: 🚨 compatibility.
  • remove status: ⏳ waiting on author: Current PR status label is status: ⏳ waiting on maintainer.

Label justifications:

  • P3: This is an optional evidence-recording feature without an established broken core workflow.
  • merge-risk: 🚨 compatibility: The PR expands the Workboard tool and stored metadata contracts; older versions may discard the new optional records on write.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-12T02:44:45.325Z sha 63808ca :: needs real behavior proof before merge. :: [P2] Trim optional evidence before displacing existing card records | [P2] Allocate the retained regression-test growth
  • reviewed 2026-11-12T21:54:00.796Z sha f679401 :: blocked before merge. :: [P2] Fit evidence after execution-attempt metadata is finalized | [P2] Expose verification capacity refusals as input errors
  • reviewed 2026-11-12T23:23:35.066Z sha 2f72c43 :: blocked before merge. :: [P2] Exclude stored evidence before earlier metadata trimming

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.
@daniel-lxs

Copy link
Copy Markdown
Member Author

Runtime and stored-data checks passed at f679401edcea8357660acf200e60abed29b0a906 in an isolated macOS 26.6.2 VM, using the built Gateway runtime and Node 24.21.0.

Through the running Gateway:

  • Worker completion stored an optional claim. A real agent turn produced a session-lifecycle observation. A separate reviewer agent recorded a disputed verification with its own identity; the card remained done.
  • Generic metadata could not forge or replace the evidence. Completion without evidence still worked.
  • A large verification on a nearly full card was refused with the owner’s “no room” error. A short verification and a later ordinary write preserved all twelve artifacts. The HTTP envelope returned a generic tool_error; the Gateway log recorded the specific reason.
  • All three evidence records survived another Gateway restart.

For compatibility, npm stable 2026.11.3 (847611d) created a stored card with notes, a comment, proof, and an artifact, plus a stored conversation. After stopping stable, selecting this candidate with the same state/config, and running its native Doctor, the candidate returned the identical card and retained the conversation. This was a manual candidate cutover; the automatic updater was not exercised.

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.

workboard-evidence.json

@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 12, 2026
…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.
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
@hannesrudolph
hannesrudolph merged commit c1ca2d7 into openclaw:main Nov 14, 2026
113 of 120 checks passed
@daniel-lxs daniel-lxs changed the title feat(workboard): record optional claims, observations, and verification feat(workboard): record checker verifications on cards Nov 14, 2026
@daniel-lxs daniel-lxs changed the title feat(workboard): record checker verifications on cards feat(workboard): record optional claims, observations, and verification Nov 14, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 14, 2026
…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
steipete added a commit that referenced this pull request Nov 14, 2026
The constant is only used inside store-evidence.ts; the unused export
fails the dead-export check on main (introduced by #197471).
daniel-lxs added a commit to daniel-lxs/openclaw that referenced this pull request Nov 14, 2026
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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
The constant is only used inside store-evidence.ts; the unused export
fails the dead-export check on main (introduced by openclaw#197471).
hannesrudolph pushed a commit that referenced this pull request Nov 18, 2026
* 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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: workboard proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add optional claim, execution-observation, and verification records to Workboard results

2 participants