Repository navigation
fix: restore generated outputs after changed-gate validation - #997
Conversation
|
/review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 5:49 AM ET / 09:49 UTC. ClawSweeper reviewWhat this changesThe PR makes OpenClaw changed-gate validation temporarily rebuild canonical ignored output directories, restore or remove them afterward, and preserve the existing immutable-checkout safeguards. Merge readiness✅ Ready for maintainer review This PR remains necessary: current Priority: P2 Review scores
Verification
How this fits togetherClawSweeper’s repair lane runs approved validation commands inside a candidate target checkout before it creates a repair PR. The validation layer must permit trusted generated build output while rejecting any mutation to protected checkout inputs or unrelated ignored runtime paths. flowchart LR
A[Repair candidate checkout] --> B[Changed-gate validation]
B --> C[Temporary generated output roots]
C --> D[Restore trusted output state]
D --> E[Checkout identity verification]
E --> F[Create-only repair PR]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Merge the narrow restoration path after the current required checks complete, keeping output-root allowlisting and immutable identity verification strict so changed-gate builds cannot mask unrelated checkout mutations. Do we have a high-confidence way to reproduce the issue? Yes. The added fixture executes the current changed-gate command shape, confirms regenerated Is this the best way to solve the issue? Yes. Restoring only verified canonical ignored output roots before the existing immutable-checkout verification is safer than weakening the general mutation detector. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 30d0321d9c9c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…w#997) Co-authored-by: Peter Steinberger <[email protected]>
Root cause
The live repair of openclaw/openclaw#117144 reached a successful Codex edit, then failed because OpenClaw's trusted
pnpm check:changedregenerates ignoreddistandpackages/plugin-sdk/distoutputs. ClawSweeper compared those legitimate build outputs against its immutable runtime snapshot and aborted before publishing the fixed branch.Fix
node_modules/artifact poisoning, unsafe output roots, swapped parents, and symlink targets.Real behavior proof
Production failure reproduced from https://github.com/openclaw/clawsweeper/actions/runs/30692961470:
The actual contained changed-gate runtime now rebuilds both ignored output roots and returns successfully; existing trusted outputs are restored and newly created outputs are removed. Unrelated ignored-input poisoning and output symlink replacement still fail closed; the symlink target and original trusted output both remain intact. Existing fresh build/smoke tamper guards and compiler-cache isolation continue passing.
Additional proof:
pnpm run build:all, repair-file lint, focused offline/create-only/exact-item runtime proof (GitHub calls: 0; generated autofix merge allowed: false; replacement PR auto-merge allowed: false).Review disposition
The fresh independent precommit review originally identified three issues: canonicalize backup roots, prepare outputs before moving the compiler cache, and preserve/restore original outputs on restoration failures. All three were fixed with new regression coverage. Fresh re-review: No actionable findings. All 11 focused validation tests passed.