Skip to content

fix: publish fresh Sol/xhigh OpenClaw root-cause repairs safely - #974

Merged
steipete merged 2 commits into
mainfrom
codex/clawsweeper-validation-artifacts
Jul 31, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/clawsweeper-validation-artifacts

Conversation

@steipete

@steipete steipete commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • Restore the actual OpenClaw root-cause-fix publishing path: retain a freshly produced runtime build through its archive smoke check without accepting stale, poisoned, or tampered build output.
  • Keep autonomous PR-writing on the explicitly configured openai/gpt-5.6-sol with xhigh reasoning; tell the writer to place generated archive output in its disposable validation directory.
  • Recognize both pnpm build:ci-artifacts and pnpm run build:ci-artifacts, duplicate fresh builds, and safe intervening checks; bind the fresh dist/, dist-runtime/, and packages/*/dist/ output to the exact subsequent smoke check.
  • Save and restore pre-existing .artifacts/build-all-cache byte-for-byte while using a disposable clean cache; reject replaced .artifacts symlinks, dependency/vendor poisoning, modified build output, stale artifacts, and exhausted runtime budgets.
  • Permanently run exact-item read-only review on the existing configurable trusted review runner; the live Blacksmith runner supports Codex's read-only sandbox while the default hosted runner failed its bwrap loopback setup.

Real runtime proof

Directly reviewable, redacted output from the actual current-head subprocess regression run (no external artifact access required):

✔ OpenClaw archive smoke preserves its required fresh runtime build (3ms)
✔ OpenClaw build validation remains required when archive smoke is absent (1ms)
✔ archive smoke writes generated runtime artifacts only to its disposable validation profile (6713ms)
✔ OpenClaw fresh build outputs survive aliases and intervening checks before archive smoke (32891ms)
✔ intermediate validation cannot tamper with fresh runtime outputs before archive smoke (2909ms)
✔ changed-gate fallback preserves and protects pending fresh runtime output (11719ms)
✔ OpenClaw archive smoke cannot pass by reusing a pre-existing stale build (2271ms)
✔ OpenClaw fresh builds still reject ignored dependency poisoning before archive smoke (2442ms)
✔ runtime build cache cleanup never follows a replaced artifacts-root symlink (1958ms)
tests 9 | pass 9 | fail 0 | duration 61292ms

Directly reviewable output from the actual failing production root-cause writer, https://github.com/openclaw/clawsweeper/actions/runs/30638412449:

Execute credited fix artifact  CLAWSWEEPER_OPENCLAW_MODEL: openai/gpt-5.6-sol
Execute credited fix artifact  CLAWSWEEPER_CODEX_REASONING_EFFORT: xhigh
Error: unsafe validation command mutated checkout identity

Current-head hosted Linux production-check output, https://github.com/openclaw/clawsweeper/actions/runs/30644393800:

pnpm check                 SUCCESS
sparse repair build smoke  SUCCESS
Windows Codex launcher     SUCCESS
overall workflow           SUCCESS

The independent executable symlink-attack fixture also reported EXTERNAL_VICTIM_EXISTS=true; the malicious external cache target was untouched. The fresh source/security committed-range Codex review concluded: No actionable regressions were identified. Focused validation confirmed disposable archive handling, preservation of freshly generated runtime artifacts, and safe build-cache cleanup.

  • Repository static checks, repair lint, prompt tests, workflow runner regression, changed coverage, build, and build:repair passed. The local full suite includes unrelated existing macOS-incompatible Linux containment tests; hosted Linux pnpm check is the full authoritative gate.
  • Fresh independent precommit Codex source/security review reported no actionable defects, including runtime artifact preservation, existing build-cache restoration, duplicate build aliases, symlink-safety, and workflow configuration.
  • Accepted bot-review [P2] Preserve pending outputs in changed-gate fallback is resolved: fallback cleanup preserves the pending fresh output roots, verifies the protected checkout identity, and rebinds fresh output after each fallback command. The executable regression proves both the successful stalled-gate → changed-test fallback → archive-smoke sequence and explicit rejection when fallback modifies fresh dist/runtime.js.

After merge I will dispatch the same production issue through the trusted worker again and verify that the actual gpt-5.6-sol/xhigh root-cause-fix PR is created. The repository owner explicitly requested automatic service-PR landing, live mutation, and production monitoring in this session.

@steipete
steipete requested a review from a team as a code owner July 31, 2026 15:47
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 31, 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 repository_dispatch).
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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 Urgent regression or broken agent/channel workflow affecting real users now. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. labels Jul 31, 2026
@clawsweeper

clawsweeper Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Close: the current main SHA is the PR head, and the accepted changed-gate fallback defect is resolved in that commit with focused executable regression coverage. The correction is present on current main but is not contained in the latest tagged release.

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Review details

Best possible solution:

Keep the current-main validation and trusted-runner implementation, and include it in the next release so production repair publishing receives the corrected path.

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

Yes. The focused current-head regression establishes both relevant paths: fallback checks preserve a pending fresh runtime output, while tampering with that output is rejected before archive smoke.

Is this the best way to solve the issue?

Yes. Binding the fresh output to the subsequent smoke check while excluding only those generated roots from checkout-identity comparison fixes the false refusal without weakening tamper detection.

Security review:

Security review cleared: The patch hardens artifact, cache, and symlink handling without broadening workflow permissions or adding a new untrusted execution source.

AGENTS.md: found and applied where relevant.

What I checked:

  • Current-main implementation: The supplied current-main SHA is f105b97e4d2749976dccdc812cd446ab4ea1f667, matching this PR head. The validation loop records a pending OpenClaw runtime build, preserves its output roots, and uses its protected checkout identity through later commands and fallback cleanup. (src/repair/target-validation.ts:1192, f105b97e4d27)
  • Accepted fallback finding resolved: Fallback handling now passes preservedRuntimeRoots to cleanup, rechecks pendingRuntimeBuild output binding after every fallback command, and verifies against the pending build’s protected identity before proceeding. (src/repair/target-validation.ts:1359, f105b97e4d27)
  • Focused regression coverage: The two-scenario regression test covers a changed-gate fallback that preserves a fresh runtime build and a fallback that tampers with it, which must fail before archive smoke. (test/repair/target-validation.test.ts:3903, f105b97e4d27)
  • Fix provenance: The behavior appears to date to the follow-up commit that specifically preserves fresh builds through changed-gate fallback; it is the direct child of the earlier secure archive-validation change. (src/repair/target-validation.ts:1195, f105b97e4d27)
  • Release check: No local release tag contains the fix commit. The latest release tag v0.3.0 resolves to dc824915bb6cad05d921cd0947b2f3ac301bd4c3, which predates the July 31 fix, so this is current-main-only provenance. (f105b97e4d27)
  • Runner configuration is covered: The exact-event review job now uses the same configurable trusted-runner expression already used by the shard review job, and the workflow test asserts both locations. (.github/workflows/sweep.yml:412, f105b97e4d27)

Likely related people:

  • Peter Steinberger: Authored both commits that added secure runtime-artifact binding and then corrected the changed-gate fallback path; current source and focused tests are attributable to that sequence. (role: introduced the repair validation change and its fallback follow-up; confidence: high; commits: a9a84aeb1a1f, f105b97e4d27; files: src/repair/target-validation.ts, test/repair/target-validation.test.ts, .github/workflows/sweep.yml)

Codex review notes: model internal, reasoning high; reviewed against f105b97e4d27; fix evidence: commit f105b97e4d27, main fix timestamp 2026-07-31T16:12:48Z.

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 31, 2026
@clawsweeper clawsweeper Bot added 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. and removed 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. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 31, 2026
@steipete
steipete merged commit c319ba7 into main Jul 31, 2026
52 of 54 checks passed
@steipete
steipete deleted the codex/clawsweeper-validation-artifacts branch July 31, 2026 16:21
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
…claw#974)

* fix: preserve fresh root-cause repair builds through secure archive validation

* fix: preserve fresh builds through changed-gate fallback

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Urgent regression or broken agent/channel workflow affecting real users now. 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.

1 participant