Skip to content

fix(sandbox): publish remote skills atomically via staged rotation - #162445

Open
kvnloo wants to merge 4 commits into
openclaw:mainfrom
kvnloo:muse/atomic-remote-skills-publish
Open

kvnloo wants to merge 4 commits into
openclaw:mainfrom
kvnloo:muse/atomic-remote-skills-publish

Conversation

@kvnloo

@kvnloo kvnloo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Remote skills refresh currently clears the live skills directory before uploading its replacement. If the transfer is interrupted, the sandbox is left with a partial skills tree.

This change uploads into a same-parent staging directory, then rotates the completed tree over the live destination. If publication fails, the previous live tree is restored; failed staging cleanup cannot mask the original error.

Validation

  • Rebased onto current upstream main.
  • Added cancellation coverage for stage/upload/publish phases.
  • Added regressions proving failed upload leaves the live tree untouched.
  • Added direct execution tests for the shipped Python rotation helper, including missing staging and parent-escape cases.
  • Downstream CodeQL/OpenGrep/security lanes passed on the original leaf; fresh CI on the rebased head is running.

Opened as draft until the fresh rebased checks complete.

@clawsweeper

clawsweeper Bot commented Oct 1, 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.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. triage: refactor-only Candidate: refactor/cleanup-only PR without maintainer context. labels Oct 1, 2026
@kvnloo
kvnloo marked this pull request as ready for review October 1, 2026 05:54
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Maintainer security review required

This external contributor PR changes sensitive security components. A maintainer must review these changes before merging.

Current SHA: 107f8e21dd368598ef82f5a0b39e8854a846bab0

These sensitive security changes were made:

  • src/agents/sandbox/remote-shell-backend.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.
  • src/agents/sandbox/remote-shell-bootstrap-python.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

After reviewing the changes, post a new PR comment containing only approval commands, each on its own line:

/allow-security-sensitive-change

A later push requires a fresh approval comment.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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 Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 9dd7b81be4051d896653e1e97fa256a6c2de55c5, but the PR head is now 107f8e21dd368598ef82f5a0b39e8854a846bab0. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

Review history (3 earlier review cycles)
  • reviewed 2026-10-01T06:01:46.313Z sha f13f459 :: needs real behavior proof before merge. :: [P2] Validate the staging path before creating it | [P2] Keep the live skills path present during interrupted publication | [P2] Update the SSH workdir fixtures for the publish command | [P2] Restrict the Python rotation tests to supported host platforms
  • reviewed 2026-10-01T06:19:43.880Z sha cf68478 :: needs real behavior proof before merge. :: [P2] Validate the staging path before creating it | [P2] Keep the live skills path present during interrupted publication | [P2] Update the SSH workdir fixtures for the publish command | [P2] Restrict the Python rotation tests to supported host platforms
  • reviewed 2026-10-01T07:31:20.655Z sha 9dd7b81 :: needs real behavior proof before merge. :: [P2] Validate the staging path before creating it | [P2] Keep the live skills path present during interrupted publication | [P2] Update the SSH workdir fixtures for the publish command | [P2] Restrict the Python rotation tests to supported host platforms

@kvnloo
kvnloo force-pushed the muse/atomic-remote-skills-publish branch 2 times, most recently from cf68478 to 9dd7b81 Compare October 1, 2026 07:23
@kvnloo
kvnloo force-pushed the muse/atomic-remote-skills-publish branch from 9dd7b81 to 107f8e2 Compare October 1, 2026 14:55
@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 7, 2026

This branch has not been deployed

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

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. security-review-required security-sensitive-changed size: M triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. triage: refactor-only Candidate: refactor/cleanup-only PR without maintainer context.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant