Skip to content

Gap ledger isolation: background sessions isolate before editing, lanes park work as WIP commits, the strict sandbox names its allowlist - #1160

Open
seathatflowsinourveins wants to merge 1 commit into
mainfrom
claude/cc-native-practice-close-isolation-20261015
Open

seathatflowsinourveins wants to merge 1 commit into
mainfrom
claude/cc-native-practice-close-isolation-20261015

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes, in one or two sentences: This PR closes the three ADOPT rows of the Claude Code practice gap ledger on the isolation layer page: B2-0003 and B4-0003 (slot worktrees) and C1-0022 (slot sandbox). The command center dispatched the ledger on 2026-10-15, and each row was confirmed by a second-family gpt-6-astra re-check.
  • Base commit: 420452059
  • Lane: lane:foundation
  • Owned paths touched:
    • the practice skill's slots.json and isolation.md;
    • the slot manifest: sha256_when_labeled, plus sandbox and worktrees added to its existing route difference list, since the routes changed;
    • tests/test_native_practice_ledger_isolation.py (new);
    • manifests/evidence.json.

Rows:

  • B2-0003, worktrees. A lane parks unfinished work as a WIP commit on its own branch, never with git stash, because every worktree of a repository shares one refs/stash.
    • Reproduced 2026-10-15 on the host's git 2.53.0 in a scratch repository: a stash pushed in one worktree showed in a sibling, and git stash pop there applied it and emptied the stack.
    • git/git@67ad4214 (v2.53.0) Documentation/git-worktree.adoc:298-302 documents the shared refs.
    • This sets a default, not a ban.
  • B4-0003, worktrees. Background sessions (claude --bg, agent view) isolate before editing. worktree.bgIsolation defaults to "worktree", which blocks Edit and Write in the main checkout until the session calls EnterWorktree; a shell cp or redirect is not blocked.
    • Version correction: the subagent block dates from 2.1.154 (CHANGELOG:5037). 2.1.288 added the reminder that tells a blocked subagent how to proceed.
    • d4 trial context: d4's background copy made five Edit/Write calls, all outside its working directory (one of the documented skip cases), and no worktree was created. So the block in the main checkout was not exercised; no settings file changes the default.
  • C1-0022, sandbox. network.strictAllowlist comes with an explicit network.allowedDomains (sandboxing.md:575).
    • The list is the in-repository M1 network arm: api.github.com, github.com, 127.0.0.1 and localhost. It is frozen through an M1 re-run at 2.1.300 before rollout.
    • No template on main carries sandbox settings. The host part is proposed to the command center as a host diff and is not applied; nothing on the host carries sandbox settings today.

SOTA sources

Evidence-class table

Claim Evidence class Command / receipt
Worktrees share one stash native_proven scratch repository on git 2.53.0, 2026-10-15T11:47:43Z
Background sessions isolate by default source_review the docs and CHANGELOG lines above
The strict sandbox's allowlist source_review + synthetic sandboxing.md:575; the M1 probe record; the new tests

Local commands run

$ python3 -m unittest tests.test_native_practice_ledger_isolation   # base 420452059 (git archive export)
FAILED (6 of 10), e.g. AssertionError: '`claude --bg`' not found
$ python3 -m unittest tests.test_native_practice_ledger_isolation tests.test_native_practice_*
OK
$ python3 scripts/validate.py
rc 0

Follow-ups

Checklist

  • No GitHub Actions changed.
  • No workflows changed.
  • No secrets are printed, logged or committed.
  • No new paid hosting, subscription or billing surface.
  • Peer-owned untracked files and worktrees were preserved.

🤖 Generated with Claude Code

…lanes park work as WIP commits, the strict sandbox names its allowlist

From the practice gap ledger of 2026-10-15. Each row was ruled ADOPT, and the
co-op's gpt-6-astra lane re-checked each one and agreed:

- worktrees route (B4-0003): background sessions (claude --bg, agent view)
  are now in scope. worktree.bgIsolation defaults to "worktree" and blocks
  Edit and Write in the main checkout until the session calls EnterWorktree
  (agent-view.md:551, settings-reference.md:5275-5281, fetched
  2026-10-15T11:41:33Z). The notes record:
  - the documented exceptions (agent-view.md:553-559);
  - that the key blocks only Edit and Write (worktrees.md:95);
  - when the subagent guard arrived. The block itself dates from 2.1.154
    (anthropics/claude-code@94506ff0 CHANGELOG.md:5037). 2.1.288 added the
    reminder that tells a blocked subagent how to proceed
    (Piebald-AI/claude-code-system-prompts@0b7ce11f CHANGELOG.md:216);
  - d4's measured context. Its --bg copy 33888fe1 never entered a worktree
    and wrote only outside the working directory, so the block itself was
    not measured.
- worktrees route (B2-0003): a lane parks unfinished work as a WIP commit
  on its own branch, not with git stash, because every worktree shares
  refs/stash (git/git v2.53.0 Documentation/git-worktree.adoc:298-302).
  Measured on the host's git 2.53.0 in a scratch repository, and the new
  test repeats the measurement.
- sandbox route (C1-0022): network.strictAllowlist now comes with an
  explicit network.allowedDomains. Under strictAllowlist the allowlist is
  allowedDomains plus WebFetch(domain:...) allow rules (sandboxing.md:575),
  so a strict arm with no list denies every sandboxed network call. The
  list comes from M1's network arm (probes-20261009.json:382-383) and is
  frozen through M1 before rollout. The host change is a proposal for the
  command center (/var/tmp/ccnp-floor/hostdiff-C1-0022.md) and was not
  applied. This commit leaves the sandbox notes line, which #1129 edits,
  alone.

tests/test_native_practice_ledger_isolation.py: 6 of its 10 tests failed on
a scratch export of 4204520. The other four pin the stash measurement,
the bgIsolation default, the cited M1 lines and the page render. The
native-practice modules ran 110 tests OK (3 opt-in skips). validate rc 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 15, 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

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant