Skip to content

docs(autonomy): study a container as the L2 substrate for local lanes - #17567

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-16971-44650388500-1
Nov 20, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-16971-44650388500-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #16971

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Adds a study of a container as the L2 isolation substrate for local lanes, using the sandcastle upstream record's rows. It measures the reference Claude Code dev container against each L2 clause and finds four gaps: egress open past the allowlist on TCP 22, UDP 53 and the host /24; a read-write workspace bind that fails the containment probe; lane tokens readable inside; and a container definition in the lane-writable checkout. It then lists eight acceptance tests any container picked must pass. Placement follows windows-surfaces.md: instance records naming products as marked examples live in the setup skill's context, because the ladder and runner leaves name classes only. Two decisions are left to the owner, since picking the substrate is the primary design: which instance to adopt, and whether the probe may accept protected git overlays (the sandcastle protectGitMounts design) or a lane's own scoped token. Until then local lanes stay under the owner exemption.

The run went past its turn budget (turns=77 max-turns=75): the work may be too big for one run.

Not verified

  • check-affected skipped typos (not installed), comment-hygiene (its ci-workflows fetch was blocked), size-check (script missing in the lane) and the validate-plugins and changed-skills legs that run code from the checked tree. The PR's CI runs them.
  • Online link check (lychee-online-changed) is CI-only. The external links were read in this run but not run through lychee.
  • Tidy: the ai-slop detector script could not run because lane Bash allows only the named wrappers, so pass 5 was a rubric read only. Pass 4 used write-for-agents on the reference file. The changelog fragment was reviewed inline, not through write-for-humans.
  • Review notes not acted on: per-claim Verified dates in the windows-surfaces.md style (the file carries one As of line and a recheck trigger instead), and that the reference firewall sets no ip6tables rules. I did not read the IPv6 point in this run, so the file leaves it out.
  • No container was launched and no isolation probe was run; the study rests on the sources read. A probe run is part of binding a picked instance, not of this study.

Fix

  • plugins/autonomy/skills/setup/context/container-surfaces.md: new study. The reference dev container against the L2 clauses (sourced claims plus a gap table), eight acceptance tests drawn from the sandcastle rows (protectGitMounts overlays, engine exit status, memory and process caps) and from the…
  • plugins/autonomy/skills/setup/context/guardrail-slice.md: step 1 (detect) points to container-surfaces.md for a container candidate on a local surface.
  • .changes/autonomy/work-resolve-issue-issue-16971-44650388500-1-101b390c.md: patch changelog fragment for the autonomy plugin.

Verification

The runner ran each check from the base copy against 1f33a30:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //code.claude.com/docs/en/devcontainer: the reference container's init-firewall.sh limits outbound traffic and needs NET_ADMIN and NET_RAW. With permissions skipped, the container does not stop exfiltration of anything reachable inside it, ~/.claude credentials included. The workspace…
  • read https: //code.claude.com/docs/en/sandbox-environments: a dev container with a default-deny iptables firewall supports unattended runs. A custom container's checklist is writable mounts, reachable credentials and egress policy.
  • read https: //github.com/anthropics/claude-code/blob/main/.devcontainer/init-firewall.sh: INPUT, OUTPUT and FORWARD default DROP. Allows seven domains, GitHub's web/api/git ranges, UDP 53 and TCP 22 to any destination, and the default route's /24. Its self-check requires example.com to fail and…
  • read https: //github.com/anthropics/claude-code/blob/main/.devcontainer/devcontainer.json: runArgs add NET_ADMIN and NET_RAW, workspaceMount is a bind of the local workspace folder, remoteUser is node, and postStartCommand runs init-firewall.sh through sudo.
  • read https: //github.com/anthropics/claude-code/blob/main/.devcontainer/Dockerfile: node may run only init-firewall.sh through sudo, and CLAUDE_CODE_VERSION defaults to latest.
  • read https: //github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/protectGitMounts.ts: mounts config, hooks and info, a worktree's .git pointer and commondir read-only, and self-binds each parent directory so renaming one cannot move them aside.
  • read https: //github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes/docker.ts: uses Docker's default bridge network when no network is set. The memory option maps to --memory with --memory-swap equal, and pidsLimit maps to --pids-limit.
  • read https: //docs.docker.com/engine/network/drivers/none/: the none driver creates only a loopback device.
  • read https: //docs.docker.com/engine/containers/resource_constraints/: with --memory-swap equal to --memory, the container has no access to swap.
  • read https: //docs.docker.com/reference/cli/docker/container/run/: option rows for --memory, --memory-swap, --pids-limit, --network, --cap-drop and --read-only.
  • check-changelog-fragments: all 5 fragments valid.
  • check-changed-skills: autonomy setup skill PASS, 0 errors. Its 4 warnings are pre-existing SKILL.md size and description warnings; this change does not touch SKILL.md.
  • check-affected: the first run failed as-of-recheck (an As of date with no recheck trigger). Added a 'Recheck when' line; the reruns show 14 passed, 9 skipped, 0 failed.
  • Fresh-context review subagent: confirmed every relative link resolves and the firewall facts match the script. Its medium findings were fixed: the sandcastle rows' recheck triggers, the claim about reaching a host proxy on the none network, the scope of the probe's credential check, and the…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44650388500

Left out: the items under Not verified.

Related

#16971

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 1f33a30ca036cf33dc85f3d3bcfa2801172b5f4e: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17567

No security issues found. I read every hunk of all three changed files.

What the PR changes. It is documentation only, made of three parts:

  • a changelog fragment;
  • a new study file, plugins/autonomy/skills/setup/context/container-surfaces.md;
  • a one-line pointer to that study, added at step 1 (detect) of guardrail-slice.md.

None of the changed files matches a trusted-path glob. The change touches no workflow, action, token request, trusted-actor list, kill switch, merge hold, hook or plugin manifest.

Instruction-surface check. The guardrail-slice.md hunk only adds a sentence; no existing rule is removed, narrowed or softened. The new study keeps controls strict rather than loosening them:

  • It treats the reference dev container as failing L2 on four clauses.
  • It requires a picked container to pass the isolation probe plus eight more acceptance tests.
  • It leaves two questions to the owner: whether protected git overlays may stand in for a copied workspace, and whether a lane's own scoped token gets an allowance in the probe.
  • It keeps unattended local lanes under the existing owner exemption until an instance is picked.

None of this guidance makes a lane less isolated than it is at base.

PR context. The description and the closing issue contain no embedded instructions aimed at this review lane.

Spend. None beyond this review run.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 1f33a30ca036cf33dc85f3d3bcfa2801172b5f4e: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR adds documentation only: a new study, plugins/autonomy/skills/setup/context/container-surfaces.md, a one-sentence pointer to it in step 1 (detect) of guardrail-slice.md, and a bump: patch changelog fragment. I read every hunk of all three files.

Closing issue #16971. The criterion says: "Study a local L2 substrate (container sandbox) for local lanes, using the sandcastle record's rows (docs/upstream/mattpocock-sandcastle.md)." The change meets it:

  • The study measures the reference dev container against each of the four L2 clauses in isolation-ladder.md:17-18.
  • Its acceptance list draws on the protectGitMounts.ts, engine-exit-status and memory-and-process-cap rows of the sandcastle record (docs/upstream/mattpocock-sandcastle.md:28,32,34).
  • It leaves the native-provider and cloud-provider reject rows unchanged, which matches the record.
  • It picks no instance, consistent with the record's "recheck when an L2 substrate is picked" triggers.
  • If the new file were removed, the relative link from guardrail-slice.md would break, and the repository's link checks would catch that.

Cross-checks against the repository (each one passed):

  • All relative links resolve:
    • ../../../reference/guardrails/isolation-ladder.md and its #local-lanes anchor
    • ../templates/isolation-probe.md
    • ../../../../../docs/upstream/mattpocock-sandcastle.md
    • windows-surfaces.md
  • The study's statements about the probe match isolation-probe.md:
    • the egress check is a TLS fetch of two well-known hosts (line 21);
    • the credential check covers host paths, the metadata route and well-known env token names (lines 51-52);
    • the canary set includes an ordinary file (line 196).
  • base_egress_allowlist is an existing field in the schema and in check-security-binding.mjs:614-624.
  • The quoted loop-lane gap matches docs/contracts/loop-lane/README.md:1627.

Not verified: I checked none of the claims about the external sources (the upstream init-firewall.sh, devcontainer.json, Dockerfile and the Docker docs). They rest on the author's reading.

No inline findings. The PR context contains no embedded directives aimed at this lane. The change adds no new spend.

Loosened-check verdict: fail (default; the wrapper supplied no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. The change loosens no check. There was no loosened_check_decision_record: line, so I did not check the citation requirement.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head 1f33a30ca036cf33dc85f3d3bcfa2801172b5f4e, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=LOW demote=false head=1f33a30ca036cf33dc85f3d3bcfa2801172b5f4e rubric=10.4.1 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 50cdbcd Nov 20, 2026
49 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-16971-44650388500-1 branch November 20, 2026 01:40
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.

Lane follow-ups: the automation-shape pass and six behaviour-preserving items - part 4 of 4

0 participants