Repository navigation
test(config): authorize intentional warning reset write - #166284
Conversation
|
🦞👀 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. |
|
@clawsweeper automerge |
|
Codex review: passed. What this changesThis PR authorizes an intentional size reduction in the warning regression and moves that regression into a test-support module. Example: The warning regression attempts an empty-config write whose preflight throws "blocked".
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open under the maintainer-author guard. The test-only patch preserves warning coverage and adds a file-preservation assertion; no introduced defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherConfig IO validates candidate settings, applies write-safety checks, runs preflight, and publishes the file; the regression exercises warning deduplication across successful and rejected writes. flowchart TD
A[Warning regression] --> B[Config IO]
B --> C[Size safety checks]
C --> D[Runtime preflight]
D --> E[File publication]
E --> F[Warning fingerprint update]
Technical reviewBest possible solution: Retain the existing warning-state regression with its narrow intentional-write exemption and file-preservation assertion. Do we have a high-confidence way to reproduce the issue? No tests were executed during this read-only review; the reported historical fixture failure has an alternative repair on current main. Is this the best way to solve the issue? The existing size-drop option is appropriately scoped to the rejected test write, and the added assertion checks persisted output without weakening production protection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0bff78b03b47. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests +22. Total +22 across 2 files. Added test files: 1. View PR surface stats
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 HistoryReviewed October 9, 2026, 10:12 PM ET / October 10, 2026, 02:12 UTC (Revision 3). |
583ae64 to
964660d
Compare
) Summary: - This PR authorizes an intentional size reduction in the warning regression and moves that regression into a test-support module. - **Example:** The warning regression attempts an empty-config write whose preflight throws "blocked". - **Before:** The write does not explicitly permit a size reduction or assert that persisted bytes remain unchanged. - **After:** The write permits the intentional reduction and verifies that preflight rejection preserves the original file bytes. Automerge notes: - PR branch already contained follow-up commit before automerge: test(config): authorize intentional warning reset write - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-1662… Validation: - ClawSweeper review passed for head 964660d. - Required merge gates passed before the squash merge. Prepared head SHA: 964660d Review: openclaw#166284 (comment) Co-authored-by: Dallin Romney <[email protected]> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: romneyda
Problem
Full Release Validation deterministically fails
src/config/io.write-config.test.tsbefore the warning-deduplication test reaches its intendedpreCommitRuntimePreflightrejection. The test writes an intentionally smaller empty config, so the production size-drop guard correctly rejects it first.Solution
Authorize that one intentional test write with the existing
allowConfigSizeDropoption. Production behavior and the dedicated size-drop guard coverage remain unchanged.Impact
The test again exercises warning deduplication and failed-preflight behavior rather than accidentally testing the earlier size-drop boundary.
Evidence
pnpm test src/config/io.write-config.test.ts --maxWorkers=1— 1 failed / 112 passed; exact failuresize-drop:514->256in the warning-deduplication case.pnpm test src/config/io.write-config.test.ts -t 'dedupes validation warnings across writes and reloads until config becomes clean' --maxWorkers=1— 1/1 passed; test 1.713s, command 35.17s including compilation.