Skip to content

feat(test-update): add a terminal sandbox for update scenarios - #22

Open
sandwichlegend wants to merge 20 commits into
feat/keep-user-editsfrom
feat/update-sandbox
Open

sandwichlegend wants to merge 20 commits into
feat/keep-user-editsfrom
feat/update-sandbox

Conversation

@sandwichlegend

@sandwichlegend sandwichlegend commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Why

Try edit-preserving updates in a browser terminal without letting a failed fixture setup reuse the operator's home.

What changed

  • Give every fixture a new home under /tmp inside Bubblewrap. Validate HOME and every config directory before any tool or installer runs.
  • Refuse reused fixture targets and missing env files. Check each shell, fake agent, merge helper, server, and verifier entry point.
  • Preserve synchronous session reservations while preparing fresh scratch folders. Keep the existing loopback, tailnet authentication, limits, and expiry checks.
  • Include feat(install): keep edits to installed skills across updates #21 through ordinary merges, with real CLI listing and replacement contracts and late-edit preservation before Codex marketplace upgrade.

Scope

Known remaining failure: a late edit injected inside the Codex command wrapper after the final installer recheck is still lost during marketplace upgrade. The new check protects edits present before it runs. This race remains unresolved.

Linux, disposable fixtures, fake agents, and private tailnet use. Reflect making a backup before editing a skill, class_policy, and splitting install.sh remain separate follow-ups.

Blast Radius

Sandbox bootstrap paths, generated shell startup, and fixture helpers. Host homes remain absent from the namespace; the checkout and system mounts stay read only.

Verification

  • npm test passes all 21 terminal scenarios, fake merges, file and backup assertions, isolation, unsafe-home rejection, missing-env rejection, and HTTP checks.
  • Installer fixtures pass under GNU tools, Bash 3.2, and BusyBox. Folder replacement contracts match saved real CLI captures.
  • Repository and docs checks and all 82 poteto-mode Bun tests pass.
  • Real Claude, Codex, and OpenCode pass the guarded install, edit, update, remove, and reinstall lifecycle. Codex remove deletes its cache; update backups remain available.

Lines not from upstream

🤖 Generated with Claude Code

sandwichlegend and others added 20 commits October 24, 2026 12:47
Validate SANDBOX_URL, bootstrap a private access cookie, route by pathname, and verify authentication, session caps, idle expiry, and rate limits over HTTP. Add the five recovery and preservation fixtures.

Co-Authored-By: GPT-6.1-Sol <[email protected]>
…ting

Reuse the audited continuation patch, document loopback authentication, and expose the three round-2 fixtures. Invalid JSON returns 400 and unknown scenarios consume no session quota.

Co-Authored-By: GPT-6.1-Sol <[email protected]>
Create fresh homes under /tmp inside Bubblewrap, validate config paths before tools run, and refuse a missing fixture env file. Cover unsafe values at each sandbox helper and preserve session reservations before asynchronous preparation.

Co-Authored-By: GPT-6.1-Sol <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant