Skip to content

fix(workboard): enforce fail-closed completion gates - #113641

Closed
fr-meyer wants to merge 2 commits into
openclaw:mainfrom
fr-meyer:feat/workboard-fail-closed-completion-gates
Closed

fr-meyer wants to merge 2 commits into
openclaw:mainfrom
fr-meyer:feat/workboard-fail-closed-completion-gates

Conversation

@fr-meyer

@fr-meyer fr-meyer commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #113582

What Problem This Solves

Automated Workboard completion could mark cards done without complete, structured proof, while the original implementation also blocked the documented direct operator-acceptance path. This change keeps manual operator acceptance compatible and makes automated/agent completion fail closed.

Summary

  • preserve direct operator moves to done
  • record operator completion source and audit reason metadata
  • keep workboard_complete, scoped agent moves, and automated paths behind structured proof and lifecycle gates
  • retain dependency, child, blocker, and exact-head PR checks for automated completion
  • add regression coverage for both manual acceptance and automated rejection

Evidence

  • focused Workboard tests: 122 passed
  • extension source typecheck passed
  • extension test typecheck passed
  • extension lint completed without reported findings
  • git diff --check passed
  • exact published head: b8224c6774

Compatibility Decision

Manual operator acceptance is intentionally preserved. Automated and agent-driven completion remains proof-gated and fail-closed, with operator completion recorded explicitly for auditability.

@openclaw-barnacle openclaw-barnacle Bot added plugin: workboard size: L triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 25, 2026
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 25, 2026, 8:43 AM ET / 12:43 UTC.

ClawSweeper review

What this changes

This PR makes the Workboard plugin require structured passed proof before a card can become done, adds completion checks for decomposed or unfinished work, and records new workflow and waiver metadata.

Merge readiness

⛔ Blocked until real behavior proof is added - 10 items remain

Keep this PR open for maintainer direction and a targeted repair. The unchanged head still contains the prior P1 blocker: it makes the new completion gate reject linked pull-request work without preserving the documented operator acceptance path. It also changes persisted Workboard completion semantics for existing cards, while the linked canonical proposal remains open for the compatibility and ownership decisions. Real after-fix behavior proof is still absent.

Priority: P2
Reviewed head: a81a64402ac2a07c99a01c9998acddc59fa7000c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The branch has focused test changes, but the unresolved P1 completion-path regression and missing real behavior evidence make it unready to merge.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: The PR reports tests but supplies no inspectable after-fix Workboard run showing both rejection of an invalid completion and acceptance of a valid or explicitly accepted completion. Add redacted gateway or tool output; redact private URLs, keys, IP addresses, and non-public endpoints. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR reports tests but supplies no inspectable after-fix Workboard run showing both rejection of an invalid completion and acceptance of a valid or explicitly accepted completion. Add redacted gateway or tool output; redact private URLs, keys, IP addresses, and non-public endpoints. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Unchanged prior blocker: The latest completed ClawSweeper cycle reviewed the same head SHA and raised the P1 finding “Preserve operator acceptance when gating completion”; the provided PR context shows no newer commit after that review.
New completion policy: The branch adds a central done-transition guard that requires structured proof and evaluates decomposition, child/dependency, and linked-pull-request state before persisting done.
Persistent compatibility surface: The branch adds persisted workflowState and completionWaiver metadata to the Workboard contract and normalizer, so stored card behavior changes rather than remaining a tool-only validation change.
Findings 1 actionable finding [P1] Preserve operator acceptance when gating completion
Security None None.

How this fits together

Workboard is OpenClaw’s bundled task-card plugin: gateway and tool calls create, decompose, prove, and complete cards. Its store persists card metadata and emits lifecycle notifications, so completion rules affect existing operators, automation, and downstream status reporting.

flowchart LR
  A[Gateway and tool requests] --> B[Input normalization]
  B --> C[Workboard card store]
  C --> D[Completion gate]
  D --> E[Persisted card metadata]
  E --> F[Lifecycle notifications]
  G[Linked pull requests and child cards] --> D
Loading

Decision needed

Question Recommendation
Should Workboard itself enforce fail-closed proof and linked-pull-request completion rules for all existing cards, and what explicit accepted/legacy path should remain available to operators? Define a plugin-level compatibility contract: Keep the policy in Workboard but specify a typed operator acceptance or waiver path and legacy-card upgrade behavior before merging.

Why: The implementation changes persistent completion semantics and the linked proposal leaves the enforcement owner, legacy behavior, and pull-request acceptance contract intentionally undecided.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR reports tests but supplies no inspectable after-fix Workboard run showing both rejection of an invalid completion and acceptance of a valid or explicitly accepted completion. Add redacted gateway or tool output; redact private URLs, keys, IP addresses, and non-public endpoints. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Preserve operator acceptance when gating completion (P1) - The new done gate still treats linked pull-request state as an unconditional blocker, while the branch only provides a completion waiver for unfinished child work. That removes the proposed explicit operator acceptance/recovery path and can block cards whose work has been accepted outside GitHub merge state; make acceptance a typed, auditable completion condition and cover it with a regression test.
  • Resolve merge risk (P1) - Existing Workboard cards without newly required proof may fail to complete after upgrade, with no migration or documented operator recovery path in this PR.
  • Resolve merge risk (P1) - The linked-pull-request gate can override an operator’s documented acceptance decision, leaving valid work blocked even when Workboard is not the authority for GitHub review or integration.
  • Resolve merge risk (P1) - The new persisted metadata fields alter an exported Workboard contract without maintainer-confirmed semantics for legacy/imported cards.
  • Complete next step (P2) - A concrete P1 repair exists, but the permanent completion-policy and upgrade contract require maintainer direction first.
  • Improve patch quality - Preserve and test an auditable operator-acceptance path for linked pull-request cards.
  • Improve patch quality - Add explicit upgrade or recovery behavior for existing cards that lack structured proof.
  • Improve patch quality - Post redacted real Workboard output for rejected invalid and accepted valid completion; updating the PR body should trigger review, or a maintainer can comment @clawsweeper re-review.

Findings

  • [P1] Preserve operator acceptance when gating completion — extensions/workboard/src/store-core.ts:665-725
Agent review details

Security

None.

PR surface

Source +165, Tests +287. Total +452 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 7 172 7 +165
Tests 3 320 33 +287
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 492 40 +452

Review metrics

Metric Value Why it matters
Persisted completion metadata 2 added fields workflowState and completionWaiver become stored card metadata, so this is an upgrade-sensitive behavior change rather than a transient validation tweak.

Stored data model

Persistent data-model change detected: vector/embedding metadata: extensions/workboard/src/store-card-helpers.ts, vector/embedding metadata: extensions/workboard/src/store-core.ts, vector/embedding metadata: extensions/workboard/src/store.test.ts, vector/embedding metadata: extensions/workboard/src/tools.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #113582
Summary: This PR is the implementation candidate for the open canonical proposal, but it does not yet resolve that proposal’s compatibility and product-direction questions.

Members:

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

Merge-risk options

Maintainer options:

  1. Preserve accepted completion (recommended)
    Repair the linked-pull-request gate so a documented, auditable operator acceptance can complete a card without weakening unresolved-work checks.
  2. Approve a strict breaking policy
    Maintainers may intentionally require merge or repository acceptance for every linked pull request, but should explicitly document the upgrade and operator impact.
  3. Pause for the canonical decision
    Pause this branch if the permanent Workboard ownership and legacy-card policy are not yet agreed in the linked proposal.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Preserve a typed and audited operator-acceptance path for linked pull-request cards, add focused regression coverage, and retain the existing unresolved-work checks.

Technical review

Best possible solution:

Use the open proposal at #113582 to confirm the plugin-level completion policy, then preserve a typed, auditable operator acceptance path and provide explicit upgrade handling for existing cards before enforcing the new default.

Do we have a high-confidence way to reproduce the issue?

Yes from source: the unchanged done-transition guard rejects completion whenever its new proof and linked-work conditions are unmet. No submitted real setup output confirms the intended accepted-completion path works after the change.

Is this the best way to solve the issue?

No. The branch’s strict gate is plausible, but it is not the best solution until it preserves the documented operator-acceptance path and the canonical proposal resolves legacy-card and ownership semantics.

Full review comments:

  • [P1] Preserve operator acceptance when gating completion — extensions/workboard/src/store-core.ts:665-725
    The new done gate still treats linked pull-request state as an unconditional blocker, while the branch only provides a completion waiver for unfinished child work. That removes the proposed explicit operator acceptance/recovery path and can block cards whose work has been accepted outside GitHub merge state; make acceptance a typed, auditable completion condition and cover it with a regression test.
    Confidence: 0.93

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7f70fb3521aa.

Labels

Label justifications:

  • P2: This is a bounded but user-visible Workboard lifecycle-policy change with no established urgent production regression.
  • merge-risk: 🚨 compatibility: Existing card completion and stored metadata semantics change, and legacy cards without structured proof may be blocked.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports tests but supplies no inspectable after-fix Workboard run showing both rejection of an invalid completion and acceptance of a valid or explicitly accepted completion. Add redacted gateway or tool output; redact private URLs, keys, IP addresses, and non-public endpoints. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Unchanged prior blocker: The latest completed ClawSweeper cycle reviewed the same head SHA and raised the P1 finding “Preserve operator acceptance when gating completion”; the provided PR context shows no newer commit after that review. (extensions/workboard/src/store-core.ts:665, a81a64402ac2)
  • New completion policy: The branch adds a central done-transition guard that requires structured proof and evaluates decomposition, child/dependency, and linked-pull-request state before persisting done. (extensions/workboard/src/store-core.ts:665, a81a64402ac2)
  • Persistent compatibility surface: The branch adds persisted workflowState and completionWaiver metadata to the Workboard contract and normalizer, so stored card behavior changes rather than remaining a tool-only validation change. (packages/workboard-contract/src/index.ts:336, a81a64402ac2)
  • Canonical product discussion remains open: The linked proposal explicitly asks whether enforcement belongs in Workboard, how legacy cards should work, and what pull-request evidence is acceptable; it remains open and is the canonical direction discussion.
  • No inspectable real behavior proof: The PR body lists focused tests and extension validation, but it does not include redacted gateway/tool output demonstrating an invalid completion rejection and a valid accepted completion in a real Workboard setup.

Likely related people:

  • fr-meyer: Authored both the linked completion-gates proposal and this implementation branch, making them the available routing contact for the intended behavior; this is not evidence of current-main ownership. (role: proposal author; confidence: medium; commits: a81a64402ac2; files: extensions/workboard/src/store-core.ts, extensions/workboard/src/store-workflow.ts, packages/workboard-contract/src/index.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-25T12:01:18.833Z sha a81a644 :: needs real behavior proof before merge. :: [P1] Preserve operator acceptance when gating completion

@fr-meyer

Copy link
Copy Markdown
Contributor Author

Option A is now implemented at exact head b8224c6774.

Manual operator moves preserve the documented acceptance path and record completionSource: operator plus an audit reason. Scoped agent moves, workboard_complete, and automated completion remain proof-gated and fail-closed.

Focused tests (122), extension typechecks, lint, and diff checks pass. Please re-review this exact head, especially the manual-vs-automated completion boundary.

@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(workboard): enforce fail-closed completion gates This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@fr-meyer

Copy link
Copy Markdown
Contributor Author

Superseded by draft PR #113673, which carries the selected manual-operator-acceptance contract with proof provenance and diagnostic semantics. No merge is being performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: workboard rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: fail-closed Workboard completion gates

1 participant