Skip to content

fix: stop misclassifying stored-data compatibility proof - #1633

Merged
steipete merged 1 commit into
mainfrom
fix/compatibility-negation-scope-20260921
Sep 22, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/compatibility-negation-scope-20260921

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: stored-data review readiness changes when compatibility evidence contains historical or affirmative wording that the renderer's English rules misclassify.

User Impact

Codex now records one explicit stored-data compatibility assessment in its existing review response. The renderer validates that assessment and enforces the existing hold. A detected data-model change clears that hold only with an explicit sufficient assessment.

Historical stored-data reports remain readable but require a fresh review before their compatibility hold can clear. Existing general proof exemptions, findings, security checks, source freshness, opt-in and merge authorization keep their separate roles.

Why This Change Was Made

The renderer was making a second compatibility judgment by combining prose from the proof summary, solution assessment and evidence. This replaces that inference with realBehaviorProof.dataModelCompatibility: sufficient, insufficient, or not_applicable, with reasoning in the existing summary and evidence. New generated output requires the field; historical decision/report readers allow its absence conservatively.

Only a unique valid value from canonical report frontmatter is accepted. General sufficient proof, proof overrides, docs-only treatment and maintainer/bot authorship cannot manufacture compatibility approval. A contradictory not_applicable assessment does not clear an independently detected stored-data change. A verified no-migration case can be assessed sufficient by Codex.

This deletes the 88-line English classifier and its grammar-specific fixture/driver. Net change against main: 60 fewer TypeScript production lines, 40 fewer lines including prompt/schema, and 151 fewer lines overall. The existing prompt/schema policy hash handles cached-assessment invalidation. Thanks @fuller-stack-dev / Jason Sy for the original investigation and fixes; human co-author credit is preserved.

OpenClaw Bay Impact

No implementation change. Readiness retains its existing observer meaning; public fields, routes, navigation and mutation boundaries are unchanged.

Documentation Impact

Updated the active review-comment contract and Unreleased changelog. The old negation proof page is historical and points to the preserved implementation in Git history and the current typed proof. The existing stored-data detector and merge gates retain ownership; the new field carries Codex's judgment through the existing pipeline.

Evidence

All 284 focused compatibility, surface-policy, proof-automation and readiness tests passed. The full pnpm run check passed 6,466 tests with 19 skips and zero failures; the separate changed-coverage gate passed 13/13. Independent pre-commit reviews found no actionable P0–P2 findings. Current-head branch review and hosted checks must pass before merge.

Real Behavior Proof

Claim and exercised surface: The actual compiled decision parser, report writer, canonical report reader, checklist renderer and automation-marker renderer propagate the dedicated compatibility assessment and enforce its independent hold. This establishes runtime propagation and gating, not the reliability of model judgment on unseen evidence.

Fixture and before/after: The same three serialized input reports were run against baseline main and candidate compiled renderers. Their input bytes were compared and are identical across runs. Additional candidate cases cover the real decision-parser → report-writer → reader/rendering round trip and generic proof exemptions.

Identical serialized input Baseline main Candidate
Explicit sufficient compatibility, neutral summary without keyword evidence Blocked Compatibility recorded; pass
Explicit insufficient compatibility, affirmative-looking prose Pass Compatibility hold
Legacy report with affirmative-looking prose and no typed assessment Pass Compatibility hold pending a fresh review

Candidate also passes three producer round trips (sufficient, insufficient, not_applicable) and nine override/maintainer/docs-only combinations. In each exemption group, generic proof is explicitly missing; only the dedicated sufficient assessment clears compatibility. All 15 runtime scenarios pass. Focused regressions additionally cover invalid/duplicate/body-only metadata, no detected data-model surface, independent findings/general-proof blockers and preservation through screenshot-proof normalization.

Environment and revisions: Crabbox provider aws, lease cbx_a07faedef990 (pearl-barnacle-59dd), image ami-0461d919be7deb53c, Linux c7a.8xlarge, Node 24.18.1 and pinned pnpm 12.4.1. Base 0ecd31af54ad8cc735ac7ed71b4b863db7bd78ab; candidate 3b7bd1534b8881ddbc480d9e887ae92c9c0f62eb.

Commands and receipts: Baseline compiled owners: node scripts/e2e/data-model-proof.ts --baseline, run run_fe59a11029d616915358a0535687d6c5; base source hashes were verified against the pinned Git files. Candidate focused proof: node --test test/compatibility-proof.test.ts test/pr-surface-policy.test.ts test/pr-proof-automation.test.ts test/review-state-contract.test.ts && node scripts/e2e/data-model-proof.ts, run run_c57e3dddd4738147c240016f8dd5b6c7. Final candidate: pnpm run check && node scripts/e2e/data-model-proof.ts, run run_e7b244cf2c4826c16dc921a91dabd5e0.

The driver retains actual report/comment Markdown and receipt.json under .artifacts/typed-compatibility-proof/{baseline,candidate}/. Shared input SHA-256 values are 5c73d5981ed2964cc24770e3b81b539f4561a101e8e24e6362ebadcbed7e473a (sufficient/neutral), 4dbdaa3dc9a4a6f9b2d19194b47e7ceb1f8a015a2573a6218f21e5390dc139b7 (insufficient/affirmative), and e693125cd682e2c35d25059a33fa4fce48d76a1d825d24271f858e73f7b99780 (legacy/affirmative).

Final executed source hashes match the candidate: report parser 599d608233f38a0b2d1076527d9744c1ace7229d7287750f275f43c0c5020e89; gate fd4efabcf22c777b120ed49999311ad75e84a7ab69212d5381dce3dcb91228e9; decision parser 4e85f7bfd5ab9f0375acadc96ad72eb7bea5c1ad0dce85e1c05bac763642a381; report writer e5f1f74dd21cd2c2ace753734bd74701579b2e93d147677291e94c4f1d22475a; schema 9020b3b32de50c91ce15299b80a9028434fc38722986bcbfd58d8fe739c4cd34.

Limits and finding disposition: Synthetic assessments and reports, real compiled production boundaries. No live GitHub publication, canonical record migration, model invocation or actual database upgrade is claimed. The former negation/prose findings are resolved by removing that classifier; equivalent old prose alone cannot turn an old report ready. A new Codex assessment is required for affected historical records.

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 12:35 AM ET / 04:35 UTC (Revision 5).

ClawSweeper review

What this changes

Replaces English compatibility-proof matching with an explicit reviewer assessment preserved through stored reports and merge-readiness checks.

Merge readiness

✅ Ready for maintainer review

The PR remains useful: fetched main still infers compatibility from prose. The typed assessment resolves the earlier classifier findings, and no introduced correctness or security defect was found.

Priority: P2
Reviewed head: 3b7bd1534b8881ddbc480d9e887ae92c9c0f62eb

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused simplification with explicit compatibility semantics, meaningful production-boundary proof, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Recorded Crabbox runtime results exercise the actual compiled decision parser, report writer, reader, checklist, and marker renderer across 15 scenarios, including legacy upgrade behavior. The source hashes match the pinned head; model judgment and live GitHub publication are explicitly outside the claim.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Recorded Crabbox runtime results exercise the actual compiled decision parser, report writer, reader, checklist, and marker renderer across 15 scenarios, including legacy upgrade behavior. The source hashes match the pinned head; model judgment and live GitHub publication are explicitly outside the claim.
Evidence reviewed 9 items Applicable repository policy: Read the complete root policy; no nested AGENTS.md or maintainer-notes directory was found. Applied the read-only, historical-report, proof, and Bay-impact guidance.
Introduced implementation: The pinned delta removes the prose classifier and carries a validated compatibility enum through decision parsing, report writing, canonical metadata reading, and the existing compatibility gate.
Canonical metadata and independent blockers: Only a unique valid canonical compatibility value is accepted. Regression coverage includes absent, invalid, duplicate, body-only, and contradictory assessments, general proof exemptions, unrelated findings, and screenshot normalization.
Findings None None.
Security None None.

How this fits together

ClawSweeper turns reviewer decisions into stored reports, public checklists, and automation readiness markers. This change controls whether evidence clears the hold on a PR that changes persisted data.

flowchart LR
 A[Reviewer assessment] --> B[Decision validation]
 B --> C[Stored report]
 C --> D[Compatibility check]
 E[Detected stored-data change] --> D
 D --> F[Hold or clear compatibility]
 F --> G[Independent readiness gates]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Code footprint Production TypeScript −60 lines; tests and fixtures −25 lines The typed contract replaces the grammar classifier and its specialized fixtures without production growth.
Runtime coverage 15 recorded candidate scenarios The proof covers new report propagation, legacy holds, and independent general-proof exemptions.

Technical review

Best possible solution:

Keep compatibility judgment explicit, preserve independent merge gates, and require fresh assessments for historical stored-data reports.

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

Yes—the serialized report cases expose false rejection and false acceptance in the classifier still present on fetched main. The submitted baseline/candidate results demonstrate that path; this review did not execute target code.

Is this the best way to solve the issue?

Yes—one validated reviewer assessment removes competing prose interpretation while retaining conservative legacy handling and independent readiness checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6e59a7126d55.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: Corrects bounded but consequential compatibility-proof classification in review automation.
  • merge-risk: 🚨 automation: Changes readiness gating; the intentional hold on unassessed historical reports is explicitly documented and accepted in the re-review context.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Recorded Crabbox runtime results exercise the actual compiled decision parser, report writer, reader, checklist, and marker renderer across 15 scenarios, including legacy upgrade behavior. The source hashes match the pinned head; model judgment and live GitHub publication are explicitly outside the claim.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded Crabbox runtime results exercise the actual compiled decision parser, report writer, reader, checklist, and marker renderer across 15 scenarios, including legacy upgrade behavior. The source hashes match the pinned head; model judgment and live GitHub publication are explicitly outside the claim.

Evidence

What I checked:

  • Applicable repository policy: Read the complete root policy; no nested AGENTS.md or maintainer-notes directory was found. Applied the read-only, historical-report, proof, and Bay-impact guidance. (AGENTS.md:1, 3b7bd1534b88)
  • Introduced implementation: The pinned delta removes the prose classifier and carries a validated compatibility enum through decision parsing, report writing, canonical metadata reading, and the existing compatibility gate. (src/clawsweeper-orchestration-foundation.ts:266, 3b7bd1534b88)
  • Canonical metadata and independent blockers: Only a unique valid canonical compatibility value is accepted. Regression coverage includes absent, invalid, duplicate, body-only, and contradictory assessments, general proof exemptions, unrelated findings, and screenshot normalization. (test/compatibility-proof.test.ts:26, 3b7bd1534b88)
  • Current-main necessity: Fetched main still calls the English classifier using proof-summary, solution-assessment, and evidence prose; it does not contain this typed gate. No merged replacement was established. (src/clawsweeper-orchestration-foundation.ts:267, 6e59a7126d55)
  • Recorded production-runtime proof: The captured PR body records 15 successful compiled-runtime scenarios on Crabbox provider aws, lease cbx_a07faedef990, image ami-0461d919be7deb53c, Node 24.18.1. Identical serialized inputs demonstrate baseline/candidate changes for sufficient-neutral, insufficient-affirmative, and legacy-affirmative reports; additional scenarios exercise producer round trips and generic exemptions. The driver uses the actual parser, writer, reader, checklist, and marker owners. Synthetic assessments do not prove model judgment or live GitHub publication. (scripts/e2e/data-model-proof.ts:25, 3b7bd1534b88)
  • Proof source identity: All five source hashes recorded in the captured proof match the checkout: report parser, compatibility gate, decision parser, report writer, and decision schema. This verifies source identity independently of the reported execution results. (3b7bd1534b88)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Goutam Adwant: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-21T14:03:46.722Z sha 35f4628 :: blocked before merge. :: [P2] Preserve negation for every positive-proof token
  • reviewed 2026-09-21T16:08:20.045Z sha fdea349 :: blocked before merge. :: [P2] Exclude historical request text from affirmative proof matching | [P2] Retain rejection for explicitly unproven compatibility evidence
  • reviewed 2026-09-21T16:21:52.275Z sha fdea349 :: blocked before merge. :: [P2] Exclude historical request text from affirmative proof matching | [P2] Retain rejection for explicitly unproven compatibility evidence
  • reviewed 2026-09-22T04:32:12.268Z sha 3b7bd15 :: needs maintainer review before merge. :: none

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Current head: fdea3499329e830fcf7217378518adcf443e9ec2. The main PR body now contains the completed production proof, disposition of the negated-proof finding and subsequent independent review findings, clean precommit and committed-range API reviews, passing full local check, and current-head CI/CodeQL results.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Replace English proof inference with one Codex assessment carried through the existing decision, report and readiness path. Only explicit sufficient compatibility clears a detected stored-data hold. General proof exemptions remain independent, and historical reports without an assessment require a fresh review.

Remove the grammar classifier and its historical fixtures/driver; retain source and merge authority gates and use the existing prompt/schema policy hash for cache invalidation.

Co-authored-by: Jason Sy <[email protected]>
@steipete
steipete force-pushed the fix/compatibility-negation-scope-20260921 branch from fdea349 to 3b7bd15 Compare September 22, 2026 04:27
@steipete steipete changed the title fix(review): scope historical compatibility proof negation fix: stop misclassifying stored-data compatibility proof Sep 22, 2026
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

The main PR body now documents the typed Codex compatibility assessment replacing the English classifier, the conservative historical-report behavior, and executed compiled-runtime proof. All 15 runtime scenarios, 284 focused tests, and the full repository check passed. Fresh pre-commit and committed-branch reviews are clean. The earlier prose-classification findings are resolved by deleting that classifier, with contributor credit retained.

@clawsweeper

clawsweeper Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 22, 2026
@steipete
steipete merged commit 00c29ac into main Sep 22, 2026
32 of 36 checks passed
@steipete
steipete deleted the fix/compatibility-negation-scope-20260921 branch September 22, 2026 04:45
@steipete

Copy link
Copy Markdown
Contributor

Landed as 00c29ac. Thanks @fuller-stack-dev / Jason Sy; contributor credit is preserved.

The renderer now enforces Codex's explicit compatibility assessment instead of reclassifying English prose. The change removes 60 TypeScript production lines, 40 lines including prompt/schema, and 151 lines overall. Historical stored-data reports remain readable and need a fresh review before their compatibility hold clears; general proof exemptions, findings, security and source/merge guards remain independent.

Proof ran on AWS Crabbox (provider=aws, lease cbx_a07faedef990, image ami-0461d919be7deb53c, Linux, Node 24.18.1, pinned pnpm 12.4.1):

  • node scripts/e2e/data-model-proof.ts --baseline, run run_fe59a11029d616915358a0535687d6c5: three baseline observations with source hashes verified against main.
  • node --test test/compatibility-proof.test.ts test/pr-surface-policy.test.ts test/pr-proof-automation.test.ts test/review-state-contract.test.ts && node scripts/e2e/data-model-proof.ts, run run_c57e3dddd4738147c240016f8dd5b6c7: 284 tests and 15 compiled-runtime scenarios passed, including three parser→writer→reader/rendering round trips. The shared baseline/candidate report inputs are byte-identical.
  • pnpm run check && node scripts/e2e/data-model-proof.ts, run run_e7b244cf2c4826c16dc921a91dabd5e0: 6,466 tests passed, 19 skipped, zero failures; changed-coverage gate 13/13; all 15 runtime scenarios passed again.

Fresh independent pre-commit and committed-branch reviews were clean. The final ClawSweeper review is current for both head and source revision, accepts the proof, and reports no findings. Hosted CI passed: https://github.com/openclaw/clawsweeper/actions/runs/35686984264. Production automerge integration passed: https://github.com/openclaw/clawsweeper/actions/runs/35686984241. CodeQL passed.

The PR body retains complete provenance, hashes, observed results and limits. This proves the compiled decision/report/readiness boundary with synthetic assessments; it does not claim a model-judgment benchmark, live GitHub publication, canonical-record migration or actual database upgrade. Bay's observer contract is unchanged.

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

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants