diff --git a/docs/upstream/mattpocock-sandcastle.md b/docs/upstream/mattpocock-sandcastle.md index c7fa845e52..5243b6bc7b 100644 --- a/docs/upstream/mattpocock-sandcastle.md +++ b/docs/upstream/mattpocock-sandcastle.md @@ -5,7 +5,7 @@ This page records what this repository takes from, adapts, already has, or rejec in our own words; read upstream at each row's link for what it says. The companion page for the author's skill collection is [`mattpocock-skills.md`](mattpocock-skills.md). -**Last audited upstream state:** `mattpocock/sandcastle@3b7aa7990dd0985139a6f667fcb62c35f2b38ba2` (package version 0.14.0, before the v1 the author has announced). +**Last audited upstream state:** `mattpocock/sandcastle@0ed674e5195b200d34bc4128eec33409f2952dcf` (package version 0.14.0, before the v1 the author has announced). **Recheck trigger:** a change, between the pinned commit and upstream HEAD, to a path a row we took or rejected something from links, a unit removed or added under the scope: re-audit the affected @@ -19,48 +19,51 @@ reason. | Idea (link at the pin) | What it does | Upstream problem, motivation, goal | Our problem | Disposition | |---|---|---|---|---| -| [`agent-explore` batch triage](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/explore/prompt.md) | One orchestrating model run reads every labeled issue at once, clusters them by shared root cause, confirms each cluster against the code, and returns one verdict per issue plus cross-cluster patterns. | Issues arrive one at a time, so duplicates and shared causes only show when they are read together. **Inference** | Intake judges one issue per run and only labels a duplicate it names (`.github/workflows/intake-triage.yml:389`). The repository held 237 open issues on 2026-11-02 against a goal of zero, and no recurring job reads them as a set. | **adapt:** run it by hand as a read-only one-off when the backlog has grown, over trusted-author issues with our trusted-text filter in place of the prompt's framing, and act on its duplicates and clusters by hand. No scheduled lane: a 2026-11-03 dry run over 267 open issues found 5 duplicates and 10 shared-cause groups, 1 of them high confidence, too few for a recurring job (owner decision, 2026-11-03). | -| [`explore/apply.ts`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/explore/apply.ts) and [`explore/batch.ts`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/explore/batch.ts) | A model-free job refuses the entire plan unless it covers each issue once, has no duplicate chains, and every issue still carries its label; only then does it write, and a dry-run input prints the writes instead. | A bad plan must not half-apply, and a person's mid-run change must win. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/explore/apply.ts#L21-L28), [source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/explore/apply.ts#L162-L163)) | Our model-free apply covers patches and thread replies (`docs/conventions/pr-pipeline/README.md`, `apply-patch`), and has no whole-batch form because no lane works a batch. | **reject:** the one-off run above writes nothing, so no batch writer exists to guard. Reconsider if a batch lane is built. | -| [`agent-explore` batch snapshot](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/agent-explore.yml#L58-L65) | The issue list is saved as an artifact before the model starts, and the later writer checks the plan against that copy. | The model must not be able to alter what its plan is checked against. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/agent-explore.yml#L58-L59)) | A batch lane would hold the same risk; single-item lanes bind artifacts by SHA-256 (`docs/conventions/pr-pipeline/pr-run-activity.md:73`). | **reject:** no batch lane checks a plan against a snapshot. Reconsider with the row above. | -| [`agent-explore` concurrency group](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/agent-explore.yml#L15-L21) | Workflow-level concurrency sends irrelevant label events to a one-off group, so they cannot replace a waiting real run; each real run lists its own batch. | A workflow-level group would let unrelated events evict a pending run. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/agent-explore.yml#L15-L18)) | Our groups are keyed per pull request, and the write group sits behind an `if:` for the same reason (`docs/conventions/pr-pipeline/README.md:947`). | **already have:** the Concurrency table. A new label-triggered batch lane follows the upstream expression. | -| [`envLeaks.ts`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/verify/envLeaks.ts) | A planted random value and the host's secret names are compared with the environment observed in the running sandbox; any match fails the verdict. | Proving that only declared keys reach the agent. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.agents/skills/verify/SKILL.md#L38), [source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.agents/skills/verify/SKILL.md#L83)) | ADR 0049 relies on `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`; our tests assert that the variable is set (`.github/scripts/post-merge-test-mutation/report.test.mjs:236`), and `plugins/harness-ops/skills/behavior-probes` holds no case for what a Bash child sees. | **adapt:** add a behavior probe that plants a canary credential, runs a real CLI turn, and fails if a Bash child can read it. A Claude Code release can change this behavior with no edit of ours, so the cases run once per new version from release intake (#12836). | -| [`verify` skill worlds and ledger](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.agents/skills/verify/SKILL.md) | Each proof drives a live CLI at its lowest-priced tier inside a disposable project, then a report lists what the run left behind; a fix needs a fail on main and a pass on the change. | Mocked suites prove nothing about the seams between tools. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.agents/skills/verify/SKILL.md#L8)) | Same need, met for plugins and behavior. | **already have:** `/harness-ops:behavior-probes`, `/evals:plugin-eval`, `/app-control:drive`; the fail-then-pass pair is `/corrections:codify`. | -| [`protectGitMounts.ts`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/src/protectGitMounts.ts) | Git's config, hooks and worktree pointers are bound read-only inside the sandbox, and every directory above them gets a self-bind mount, so renaming a parent cannot remove the overlay. | A sandboxed write to those files runs later on the host. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/src/protectGitMounts.ts#L4-L10)) | The isolation ladder names this hole without a mechanism (`plugins/autonomy/reference/guardrails/isolation-ladder.md:26`). No local-lane substrate has been chosen (`plugins/autonomy/reference/runner.md:43`). | **adapt:** make the overlay on those files and the parent binding acceptance tests for any `L2` substrate we pick, written for our own mounts. | -| [Native sandbox providers (ADR 0024)](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0024-native-sandbox-providers.md) | A process sandbox per OS, with a private home and the host's toolchain; a provider that cannot start fails and never drops to no sandbox. | A container route brings an image build, plus a virtual machine on non-Linux hosts. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0024-native-sandbox-providers.md#L5)) | Unattended local lanes need `L2`, which requires default-deny egress (`isolation-ladder.md:19`). | **reject:** the egress decision in that ADR's Decision section does not meet `L2` at this pin. Re-read it on the v1 re-audit. The refusal to fall back is already ours (`isolation-ladder.md:100`). | -| [Agent workflows on `noSandbox()`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/review/review.ts#L30) | The project's own CI agents run with no sandbox provider on a GitHub-hosted runner. | The runner is the boundary. **Inference** | Same choice, with more conditions around it. | **already have:** ADR 0049. Our trusted-actor gate, job-scoped App tokens and kill switch go further. | -| [Cloud sandbox providers](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/src/sandboxes) | Adapters for five hosted sandbox vendors. | A boundary firmer than a process sandbox gives. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0024-native-sandbox-providers.md#L30)) | CI lanes hold a fresh hosted runner under ADR 0049; any other surface keeps `L2` and adds a billing account and a third party holding lane tokens. | **reject:** no measured need. Reconsider when hardening returns, for egress control and credential brokering. | -| [`run-with-extraction.ts`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/shared/run-with-extraction.ts) and [ADR 0010](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0010-structured-output.md) | A second turn resumes the working session to emit tagged JSON, which is validated against a schema; failures are fed back for a limited number of repairs. | Agent CLIs vary, so output has to be scanned from a stream. **Inference** | One harness with native schema support (`.github/actions/collect-base-activity/action.yml:931`). | **already have:** `--json-schema`. Tag scanning would add a parser for a problem we do not have. | -| [`filterInlineComments` and `filterReplies`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/shared/review-output.ts#L97-L130) | A script drops comments on lines outside the diff and replies to threads the run did not fetch, rather than failing the review. | One bad anchor should not cost the whole review. **Inference** | Replies are bound to a scanned file of valid threads (`docs/conventions/pr-pipeline/pr-run-activity.md:73`). We found no record of a failed inline anchor; the search covered our issue tracker and pipeline docs only. | **already have:** for replies. Inline comments: `none` until a lane fails on one. | -| [`update-branch.ts`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/update-branch/update-branch.ts) | Tries a plain merge first and starts the model only on conflict, then checks for new commits and no unresolved paths. | A clean merge needs no model. **Inference** | Same. | **already have:** `resolve-conflicts` and its `clean-merge` outcome (`docs/conventions/pr-pipeline/pr-run-activity.md:916`). | -| [`agent-implement` preflight](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/agent-implement.yml#L27-L95) | Refuses an issue with sub-issues or a parent, and one a collaborator's open pull request already closes. | Avoid duplicate work and unsupported shapes. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/agent-implement.yml#L62), [source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/agent-implement.yml#L95)) | Same. | **already have:** Issue mode skips on a trusted closing pull request (`docs/conventions/pr-pipeline/pr-run-activity.md:2202`) and goes further by splitting large issues. | -| [`lint-shrink.yml`](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/lint-shrink.yml) | Every main push lowers count baselines and raises a coverage floor, through a single standing pull request. | Fix pull requests should not have to edit baselines. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows/lint-shrink.yml#L3-L9)) | Same. | **already have:** the lowering job in `plugins/toolchain/skills/ratchet/SKILL.md:245`. | -| [Completion timeout (ADR 0019)](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0019-completion-timeout-for-hanging-process.md) | Once the completion signal appears, a short silence window replaces the idle limit and the run counts as successful. | A child holding stdout open made finished work fail. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0019-completion-timeout-for-hanging-process.md#L3)) | The launcher has one timeout for the whole leg (`run-claude-cli/lane.cjs:781` in `melodic-software/ci-workflows`). One issue search found no such failure. | **reject:** recheck if a lane leg times out after its `result` message was written. | -| [Context window (ADR 0023)](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0023-context-window-is-the-last-model-call.md) | Context size comes from the final request's input, never a sum. | Summed totals overstate the context. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0023-context-window-is-the-last-model-call.md#L11)) | `none`: lane scripts, the brief and the pipeline doc report no context size. | **reject:** keep the rule in mind if a lane adds that metric. | -| [`.out-of-scope/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.out-of-scope) | One file per rejected concept, with prior requests. | Rejections should not be argued again. **Inference** | Same. | **already have:** `docs/out-of-scope/` and `plugins/work-items/skills/triage/SKILL.md:386`. | -| [Provider errors (`.out-of-scope`)](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.out-of-scope/provider-error-retry.md) | The library leaves retries to the caller and fails at once. | It does not own the provider's error interface. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.out-of-scope/provider-error-retry.md#L7-L8)) | We are that caller. | **already have:** the Funding handoffs and the `limits` block in `docs/conventions/pr-pipeline/README.md`. | -| [Worktree locks (ADR 0007)](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0007-worktree-locking.md) | An atomic lock file naming the process, with stale locks cleared by a liveness check. | Two runs could share one worktree. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr/0007-worktree-locking.md#L7)) | CI runners are fresh per job; local sessions use claim checks. | **already have:** `/source-control:worktree`. | -| [Door call in the triage comment](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle/agent-workflows/explore/prompt.md#L74) | Each verdict states whether the change is hard or cheap to undo. | Tells the reader how carefully to treat it. **Inference** | Work classes grade blast radius (`plugins/autonomy/reference/guardrails/work-classes.md`). | **already have:** work classes. A second scale would add no gate. | -| [`.factory/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.factory) | A per-task script, started by a daemon through environment variables, that implements then reviews on a possibly stacked base. | Connects the library to a task daemon. **Inference** | The daemon is outside this repository, so the design cannot be judged at this pin. | **reject:** re-read at the v1 re-audit, which is where the announced factory should appear. | +| [`agent-explore` batch triage](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/explore/prompt.md) | One orchestrating model run reads every labeled issue at once, clusters them by shared root cause, confirms each cluster against the code, and returns one verdict per issue plus cross-cluster patterns. | Issues arrive one at a time, so duplicates and shared causes only show when they are read together. **Inference** | Intake judges one issue per run and only labels a duplicate it names (`.github/workflows/intake-triage.yml:389`). The repository held 237 open issues on 2026-11-02 against a goal of zero, and no recurring job reads them as a set. | **adapt:** run it by hand as a read-only one-off when the backlog has grown, over trusted-author issues with our trusted-text filter in place of the prompt's framing, and act on its duplicates and clusters by hand. No scheduled lane: a 2026-11-03 dry run over 267 open issues found 5 duplicates and 10 shared-cause groups, 1 of them high confidence, too few for a recurring job (owner decision, 2026-11-03). | +| [`explore/apply.ts`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/explore/apply.ts) and [`explore/batch.ts`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/explore/batch.ts) | A model-free job refuses the entire plan unless it covers each issue once, has no duplicate chains, and every issue still carries its label; only then does it write, and a dry-run input prints the writes instead. | A bad plan must not half-apply, and a person's mid-run change must win. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/explore/apply.ts#L21-L28), [source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/explore/apply.ts#L162-L163)) | Our model-free apply covers patches and thread replies (`docs/conventions/pr-pipeline/README.md`, `apply-patch`), and has no whole-batch form because no lane works a batch. | **reject:** the one-off run above writes nothing, so no batch writer exists to guard. Reconsider if a batch lane is built. | +| [`agent-explore` batch snapshot](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/agent-explore.yml#L58-L65) | The issue list is saved as an artifact before the model starts, and the later writer checks the plan against that copy. | The model must not be able to alter what its plan is checked against. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/agent-explore.yml#L58-L59)) | A batch lane would hold the same risk; single-item lanes bind artifacts by SHA-256 (`docs/conventions/pr-pipeline/pr-run-activity.md:73`). | **reject:** no batch lane checks a plan against a snapshot. Reconsider with the row above. | +| [`agent-explore` concurrency group](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/agent-explore.yml#L15-L21) | Workflow-level concurrency sends irrelevant label events to a one-off group, so they cannot replace a waiting real run; each real run lists its own batch. | A workflow-level group would let unrelated events evict a pending run. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/agent-explore.yml#L15-L18)) | Our groups are keyed per pull request, and the write group sits behind an `if:` for the same reason (`docs/conventions/pr-pipeline/README.md:947`). | **already have:** the Concurrency table. A new label-triggered batch lane follows the upstream expression. | +| [`envLeaks.ts`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/verify/envLeaks.ts) | A planted random value and the host's secret names are compared with the environment observed in the running sandbox; any match fails the verdict. | Proving that only declared keys reach the agent. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.agents/skills/verify/SKILL.md#L38), [source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.agents/skills/verify/SKILL.md#L83)) | ADR 0049 relies on `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`; our tests assert that the variable is set (`.github/scripts/post-merge-test-mutation/report.test.mjs:236`), and `plugins/harness-ops/skills/behavior-probes` holds no case for what a Bash child sees. | **adapt:** add a behavior probe that plants a canary credential, runs a real CLI turn, and fails if a Bash child can read it. A Claude Code release can change this behavior with no edit of ours, so the cases run once per new version from release intake (#12836). | +| [`verify` skill worlds and ledger](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.agents/skills/verify/SKILL.md) | Each proof drives a live CLI at its lowest-priced tier inside a disposable project, then a report lists what the run left behind; a fix needs a fail on main and a pass on the change. | Mocked suites prove nothing about the seams between tools. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.agents/skills/verify/SKILL.md#L8)) | Same need, met for plugins and behavior. | **already have:** `/harness-ops:behavior-probes`, `/evals:plugin-eval`, `/app-control:drive`; the fail-then-pass pair is `/corrections:codify`. | +| [`protectGitMounts.ts`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/protectGitMounts.ts) | Git's config, hooks and worktree pointers are bound read-only inside the sandbox, and every directory above them gets a self-bind mount, so renaming a parent cannot remove the overlay. | A sandboxed write to those files runs later on the host. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/protectGitMounts.ts#L4-L10)) | The isolation ladder names this hole without a mechanism (`plugins/autonomy/reference/guardrails/isolation-ladder.md:26`). No local-lane substrate has been chosen (`plugins/autonomy/reference/runner.md:43`). | **adapt:** make the overlay on those files and the parent binding acceptance tests for any `L2` substrate we pick, written for our own mounts. | +| [Native sandbox providers (ADR 0024)](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0024-native-sandbox-providers.md) | A process sandbox per OS, with a private home and the host's toolchain; a provider that cannot start fails and never drops to no sandbox. | A container route brings an image build, plus a virtual machine on non-Linux hosts. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0024-native-sandbox-providers.md#L5)) | Unattended local lanes need `L2`, which requires default-deny egress (`isolation-ladder.md:19`). | **reject:** the egress decision in that ADR's Decision section does not meet `L2` at this pin. Re-read it on the v1 re-audit. The refusal to fall back is already ours (`isolation-ladder.md:100`). | +| [Agent workflows on `noSandbox()`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/review/review.ts#L30) | The project's own CI agents run with no sandbox provider on a GitHub-hosted runner. | The runner is the boundary. **Inference** | Same choice, with more conditions around it. | **already have:** ADR 0049. Our trusted-actor gate, job-scoped App tokens and kill switch go further. | +| [Cloud sandbox providers](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes) | Adapters for five hosted sandbox vendors. | A boundary firmer than a process sandbox gives. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0024-native-sandbox-providers.md#L30)) | CI lanes hold a fresh hosted runner under ADR 0049; any other surface keeps `L2` and adds a billing account and a third party holding lane tokens. | **reject:** no measured need. Reconsider when hardening returns, for egress control and credential brokering. The fixes in this tree since the last pin (a Vercel sandbox no longer kept as a stored snapshot after it stops, an already deleted Sprite treated as closed, Seatbelt removing its private dirs on interrupt, `noSandbox()` decoding output as UTF-8 across chunks, files split to meet line limits) give no reason to adopt a hosted vendor. The three rows below record the ideas that bear on us. | +| [Engine exit status](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes/engineExitStatus.ts) | A wrapper shell inside the container prints the command's status as a final stderr line, and the exec result takes its code from that line; with no such line, or with no code from the CLI, the result is a failure. | A killed engine CLI can report success for work still running. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes/engineExitStatus.ts#L5-L9)) | We exec nothing through `docker` or `podman`; the lane launcher is `run-claude-cli/lane.cjs` in `melodic-software/ci-workflows`. A search of the JavaScript under `.github/`, `plugins/` and `scripts/` for a null exit code read as 0 found only a test stub (`plugins/source-control/skills/babysit-loop/scripts/lane-snapshot.test.mjs:37`). | **reject:** no container exec here. Recheck with the `protectGitMounts.ts` row when an `L2` container substrate is picked, or if a lane counts a signal-killed child as a pass. | +| [Exec connection error](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes/spritesExec.ts#L70-L87) | Before a failed connection's error is rethrown, every URL in its message and stack loses its query string. | That query holds the run's environment, so the error could print it. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes/spritesExec.ts#L77-L80)) | A failed API call's error text must not print a lane token. | **already have:** `failedAnswer` strips the token and credential shapes (`.github/scripts/apply-patch/apply-patch.mjs:1444-1449`), and the dispatcher replaces the Authorization value in a thrown fetch error (`.github/scripts/pr-unblock/feedback-dispatch.mjs:1481-1482`). | +| [Container memory and process caps](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes/docker.ts#L138-L159) | `docker()` and `podman()` accept a memory limit that allows no swap beyond it, and a process-count limit, each passed through as a run flag. | A runaway or hostile workload must not exhaust the host. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/src/sandboxes/docker.ts#L156)) | `L2` names no resource limit (`plugins/autonomy/reference/guardrails/isolation-ladder.md:17-22`), and no local-lane substrate has been chosen (`plugins/autonomy/reference/runner.md:43`). | **reject:** with no substrate there is nothing to cap. Recheck with the `protectGitMounts.ts` row when an `L2` substrate is picked. | +| [`run-with-extraction.ts`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/shared/run-with-extraction.ts) and [ADR 0010](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0010-structured-output.md) | A second turn resumes the working session to emit tagged JSON, which is validated against a schema; failures are fed back for a limited number of repairs. | Agent CLIs vary, so output has to be scanned from a stream. **Inference** | One harness with native schema support (`.github/actions/collect-base-activity/action.yml:936`). | **already have:** `--json-schema`. Tag scanning would add a parser for a problem we do not have. | +| [`filterInlineComments` and `filterReplies`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/shared/review-output.ts#L97-L130) | A script drops comments on lines outside the diff and replies to threads the run did not fetch, rather than failing the review. | One bad anchor should not cost the whole review. **Inference** | Replies are bound to a scanned file of valid threads (`docs/conventions/pr-pipeline/pr-run-activity.md:73`). We found no record of a failed inline anchor; the search covered our issue tracker and pipeline docs only. | **already have:** for replies. Inline comments: `none` until a lane fails on one. | +| [`update-branch.ts`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/update-branch/update-branch.ts) | Tries a plain merge first and starts the model only on conflict, then checks for new commits and no unresolved paths. | A clean merge needs no model. **Inference** | Same. | **already have:** `resolve-conflicts` and its `clean-merge` outcome (`docs/conventions/pr-pipeline/pr-run-activity.md:916`). | +| [`agent-implement` preflight](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/agent-implement.yml#L27-L95) | Refuses an issue with sub-issues or a parent, and one a collaborator's open pull request already closes. | Avoid duplicate work and unsupported shapes. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/agent-implement.yml#L62), [source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/agent-implement.yml#L95)) | Same. | **already have:** Issue mode skips on a trusted closing pull request (`docs/conventions/pr-pipeline/pr-run-activity.md:2202`) and goes further by splitting large issues. | +| [`lint-shrink.yml`](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/lint-shrink.yml) | Every main push lowers count baselines and raises a coverage floor, through a single standing pull request. | Fix pull requests should not have to edit baselines. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows/lint-shrink.yml#L3-L9)) | Same. | **already have:** the lowering job in `plugins/toolchain/skills/ratchet/SKILL.md:245`. | +| [Completion timeout (ADR 0019)](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0019-completion-timeout-for-hanging-process.md) | Once the completion signal appears, a short silence window replaces the idle limit and the run counts as successful. | A child holding stdout open made finished work fail. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0019-completion-timeout-for-hanging-process.md#L3)) | The launcher has one timeout for the whole leg (`run-claude-cli/lane.cjs:781` in `melodic-software/ci-workflows`). One issue search found no such failure. | **reject:** recheck if a lane leg times out after its `result` message was written. | +| [Context window (ADR 0023)](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0023-context-window-is-the-last-model-call.md) | Context size comes from the final request's input, never a sum. | Summed totals overstate the context. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0023-context-window-is-the-last-model-call.md#L11)) | `none`: lane scripts, the brief and the pipeline doc report no context size. | **reject:** keep the rule in mind if a lane adds that metric. | +| [`.out-of-scope/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/.out-of-scope) | One file per rejected concept, with prior requests. | Rejections should not be argued again. **Inference** | Same. | **already have:** `docs/out-of-scope/` and `plugins/work-items/skills/triage/SKILL.md:415`. | +| [Provider errors (`.out-of-scope`)](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.out-of-scope/provider-error-retry.md) | The library leaves retries to the caller and fails at once. | It does not own the provider's error interface. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.out-of-scope/provider-error-retry.md#L7-L8)) | We are that caller. | **already have:** the Funding handoffs and the `limits` block in `docs/conventions/pr-pipeline/README.md`. | +| [Worktree locks (ADR 0007)](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0007-worktree-locking.md) | An atomic lock file naming the process, with stale locks cleared by a liveness check. | Two runs could share one worktree. **Stated** ([source](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr/0007-worktree-locking.md#L7)) | CI runners are fresh per job; local sessions use claim checks. | **already have:** `/source-control:worktree`. | +| [Door call in the triage comment](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle/agent-workflows/explore/prompt.md#L74) | Each verdict states whether the change is hard or cheap to undo. | Tells the reader how carefully to treat it. **Inference** | Work classes grade blast radius (`plugins/autonomy/reference/guardrails/work-classes.md`). | **already have:** work classes. A second scale would add no gate. | +| [`.factory/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/.factory) | A per-task script, started by a daemon through environment variables, that implements then reviews on a possibly stacked base. | Connects the library to a task daemon. **Inference** | The daemon is outside this repository, so the design cannot be judged at this pin. | **reject:** re-read at the v1 re-audit, which is where the announced factory should appear. | ## Map Read at the file-list level only; nothing taken. -- [`src/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/src): the library, past the units named above. -- [`src/templates/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/src/templates): starter orchestration shapes; ours are `/work-items:ship` and `/implementation:implement-dispatch`. -- [`tests/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/tests) -- [`docs/guide/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/guide) and [`docs/agents/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/agents) -- [`docs/adr/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/adr): the ADRs not named above. -- [`docs/research/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/docs/research), [`research/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/research), [`ideas/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/ideas) and [`plans/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/plans) -- [`scripts/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/scripts), [`api-report/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/api-report) and [`.changeset/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.changeset) -- [`.sandcastle/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.sandcastle) and [`.agents/skills/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.agents/skills): the files not named above. -- [`.github/workflows/`](https://github.com/mattpocock/sandcastle/tree/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/.github/workflows): the workflows not named above. +- [`src/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/src): the library, past the units named above. +- [`src/templates/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/src/templates): starter orchestration shapes; ours are `/work-items:ship` and `/implementation:implement-dispatch`. +- [`tests/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/tests) +- [`docs/guide/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/guide) and [`docs/agents/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/agents) +- [`docs/adr/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/adr): the ADRs not named above. +- [`docs/research/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/docs/research), [`research/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/research), [`ideas/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/ideas) and [`plans/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/plans) +- [`scripts/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/scripts), [`api-report/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/api-report) and [`.changeset/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/.changeset) +- [`.sandcastle/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/.sandcastle) and [`.agents/skills/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/.agents/skills): the files not named above. +- [`.github/workflows/`](https://github.com/mattpocock/sandcastle/tree/0ed674e5195b200d34bc4128eec33409f2952dcf/.github/workflows): the workflows not named above. ## License notice The license file and the manifest's `license` field both say MIT, and GitHub reports MIT; they agree. No upstream text or code is copied here. -- **Pointer**: [`LICENSE` at the pin](https://github.com/mattpocock/sandcastle/blob/3b7aa7990dd0985139a6f667fcb62c35f2b38ba2/LICENSE) -- **As of**: 2026-11-02 +- **Pointer**: [`LICENSE` at the pin](https://github.com/mattpocock/sandcastle/blob/0ed674e5195b200d34bc4128eec33409f2952dcf/LICENSE) +- **As of**: 2026-11-16 - **Recheck trigger**: the license file or manifest field changes.