fix(preflight): consume exact bot comment states - #311
Conversation
Punchcard-Session: amber-timber-river-t1
|
Codex review: needs changes before merge. Reviewed August 7, 2026, 12:15 PM ET / 16:15 UTC. ClawSweeper reviewWhat this changesThis PR updates external-merge preflight to consume exact Dependency Guard and ClawSweeper review states while rejecting contradictory bot comments. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked by patch quality or review findings - 6 items remain Keep open: the new transitional v1 path can accept a review that omits Findings and Security evidence, contradicting the stated fail-closed contract. Likely related person: github-actions[bot] (current-main parser provenance; low confidence). Priority: P1 Review scores
Verification
How this fits togetherClownfish preflight reads pull-request comments before an external pull request reaches checkout and validation. It classifies trusted automation and human objections into benign or blocking evidence for the merge gate. flowchart LR
A[Pull request comments] --> B[Preflight classifier]
B --> C[Dependency Guard state]
B --> D[ClawSweeper review state]
B --> E[Human objections]
C --> F[Merge gate]
D --> F
E --> F
Before merge
Findings
Agent review detailsSecurityNeeds attention: The transitional parser can fail open on missing review-security evidence in a pre-merge authorization boundary. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Require exactly one clean Findings result and one clean Security result before accepting a transitional v1 review, then add omission regressions alongside the existing malformed-state cases. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: a current-head v1 marker with no state fields, ready prose, and an empty Before merge section is accepted even if the Findings and Security evidence is omitted. Is this the best way to solve the issue? No. The proposed full-comment validation must require the clean Findings and Security evidence it claims to consume, rather than treating their absence as clean. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 67e43efa9094. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
Root cause
OpenClaw PR openclaw/openclaw#120232 was blocked before checkout and validation:
The dependency classifier understood authorization and clearance states, but not the producer's exact-head trusted informational state.
The ClawSweeper classifier depended on legacy prose and ignored everything after
<details>. Current output is structured differently, and the observed comment is internally contradictory: it says there are no findings and Before Merge is empty, then asks maintainers to confirm migration or upgrade compatibility before merge inside the details section.State contract
Clownfish now accepts the existing
clawsweeper-review-versionmarker as the versioned producer/consumer boundary. The producer-ready v1 shape is:Rules:
item,sha, andv=1must match the current pull request and exact headreadinessisreadyorblockedfindings,security, andbefore_mergearenoneoractionableThe current openclaw/openclaw#120232 (comment) therefore remains blocking until the producer removes the contradictory pre-merge instruction and emits a consistent state tuple.
Proof
node --test test/preflight-external-pr-merge.test.mjs: 172 passednpm run validate: 6,707 jobs validatednode --check scripts/preflight-external-pr-merge.mjsgit diff --checkThe focused regressions cover the two observed comments plus stale, blocked, unknown-role, duplicate-marker, appended-objection, unknown-version, missing-version, partial-state, findings, security, nonempty Before Merge, and human-request variants.
LOC
The production increase implements the requested versioned comment-state contract and fail-closed security boundary; it does not add a second merge path or compatibility fallback.