diff --git a/docs/architecture/decisions/execution-and-concurrency.md b/docs/architecture/decisions/execution-and-concurrency.md index 88d161de..11d49be0 100644 --- a/docs/architecture/decisions/execution-and-concurrency.md +++ b/docs/architecture/decisions/execution-and-concurrency.md @@ -64,3 +64,4 @@ never rewritten or deleted. The detail doc describes the current design. - 2026-11-20: Antigravity eligible structured turns use agy `--output-format json --json-schema` behind a cached capability probe and an `auto|off` operator switch. A renderable `SUCCESS` `structured_output` outranks the response file and stdout marker. The schema is loose and admits `agent_unavailable`, and the protocol validators stay authoritative. Turns whose contract needs content outside the JSON object, footer and signature keep the response-file channel. Repeated no-payload reviewer format failures fall back to the next chain model before the seat becomes unavailable; capacity, quota and provider-definitive behaviour is unchanged (#2029). - 2026-11-20: A non-`SUCCESS` agy envelope's decoded error is a typed provider diagnostic on `AgentResult` and is classified as the terminal frame in every failure phase. A fallback response that fails validation after such an envelope is classified as a provider failure, with no repair and no format-failure fallback (#2029). - 2026-11-20: The agy structured-output schema avoids non-string enums, which Gemini rejects with INVALID_ARGUMENT; `schema_version` is a plain integer validated by the protocol parsers. A structured attempt whose provider diagnostics (non-`SUCCESS` envelope, stdout outside the envelope, or the silent attempt's own agy log) show a schema-naming INVALID_ARGUMENT is replayed once per turn without schema flags, with a warning, a dedicated attempt slot, no retry, no format-failure count and no repair. Model prose is never evidence (#2039). +- 2026-11-20: `run-tests` refuses a request before reservation or launch when a registered worktree link or private environment of the broker checkout is no longer intact, naming it in a no-test `cancelled` frame; the pre-check is fail-open and never poisons the checkout. Coder prompts name the coder checkout's registered links as shared operator infrastructure. An uncitable receipt for a citable launcher family names the rejected argument through a static explainer that shares the recognizer's argument walk; the allow-list and persisted reasons are unchanged (#2036). diff --git a/docs/architecture/execution-and-concurrency.md b/docs/architecture/execution-and-concurrency.md index c483e244..8a276143 100644 --- a/docs/architecture/execution-and-concurrency.md +++ b/docs/architecture/execution-and-concurrency.md @@ -12,7 +12,7 @@ Concurrent default-dir invocations on one repository are supported. Each run with an omitted `---dir` gets its own detached `git worktree` under `/OWNER-REPO//runs/`, backed by one shared clone per repo/agent (the *store*, `/OWNER-REPO//repo`) that -owns the object store. Explicit `---dir` paths are untouched. Optional `--worktree-link PATH` (repeatable, off by default) symlinks (never copies) an untracked repository-relative path such as `.venv` from the shared store into each per-run worktree. The path must exist in the store (otherwise the run fails, naming the shared clone and suggesting `--worktree-setup` or creating the path there) and its parent directories must be tracked. Explicit `---dir` checkouts ignore it. The link is exempted from checkout verification, sync cleaning and test-evidence attribution by agent-loop's in-process registry only (no git ignore state is written); a removed, retargeted, staged or committed link is refused. Linked state is shared and mutable across concurrent runs. Keep every link ignored with a root-anchored pattern without a trailing slash (`/.venv`, `/node_modules`) in `.gitignore` or the store's `.git/info/exclude` (shared by every worktree); a dir-only `.venv/` or `node_modules/` rule does not match a symlink. agent-loop warns, and never writes ignore state, when a created link is not ignored. `.venv/bin/python` works through the link; bare `python` reaches the linked venv only if the agent environment activates it. Parallel +owns the object store. Explicit `---dir` paths are untouched. Optional `--worktree-link PATH` (repeatable, off by default) symlinks (never copies) an untracked repository-relative path such as `.venv` from the shared store into each per-run worktree. The path must exist in the store and its parent directories must be tracked. Explicit `---dir` checkouts ignore it. The link is exempted from checkout verification, sync cleaning and test-evidence attribution by agent-loop's in-process registry only (no git ignore state is written); a removed, retargeted, staged or committed link is refused. Linked state is shared and mutable across concurrent runs. Keep every link ignored with a root-anchored pattern without a trailing slash (`/.venv`, `/node_modules`) in `.gitignore` or the store's `.git/info/exclude` (shared by every worktree); a dir-only `.venv/` or `node_modules/` rule does not match a symlink. agent-loop warns, and never writes ignore state, when a created link is not ignored. Parallel reviewers within one invocation are supported; the orchestrator verifies distinct reviewer workdirs. Coder and reviewer turns are separate lifecycle stages even when they use the same CLI. @@ -208,7 +208,9 @@ client (including `--fixture` runs) prints that advisory, or the remedy selected after a launch failure or a pre-collection failure. The variable is excluded from evidence environment identity, and nothing reads it for classification, outcome, evidence or exit code. A replaced-link refusal names the link source -in the shared clone. When an issue run stops (a checkout refusal or a terminal +in the shared clone. Before reservation or launch the broker refuses, naming +it, a registered link or private environment that is not intact (fail-open, +never poisons). Coder prompts name the checkout's own links as off limits (#2036). When an issue run stops (a checkout refusal or a terminal no-PR result) while the implementing coder's per-run worktree is poisoned and its branch has a remote-tracking ref, the stop's message gains a `managed-pr --head` resume and the manual worktree-removal command; the exception type, exit code diff --git a/docs/local_agent_loop.md b/docs/local_agent_loop.md index aeb0fd75..e3afa04e 100644 --- a/docs/local_agent_loop.md +++ b/docs/local_agent_loop.md @@ -1998,6 +1998,16 @@ fallback. Every no-test refusal (`overlap-rejected`, `worker-budget-busy`, again after the receipt line as `agent-loop: no test ran (): `; a lock held by another request of the same broker is named with its command, phase and age. +In a per-run worktree with `--worktree-link` paths, the broker checks every +registered link (and every private environment rebuilt under +`--worktree-setup-pr-local`) before it reserves or launches anything (#2036). +A replaced, moved, retargeted or removed link is refused with +`` agent-loop: no test ran (cancelled): agent-loop: worktree link `` was replaced, moved or retargeted; it is shared operator infrastructure. Restore it or report the problem; nothing was run (not evidence) ``. +The pre-check never poisons the checkout and does not change the checkout +guard; a lookup error falls through to the existing snapshot and guard. +Coder prompts for such a checkout name its registered links as shared +operator infrastructure that must not be replaced, moved, copied over or +deleted. A receipt whose inner command started but whose suite start was never verified (`suite_start=unknown`) can never be cited, so `run-tests` says so right after the receipt line (#1659). The broker persists why the suite start stayed @@ -2007,6 +2017,24 @@ It never changes admission, citability or a disqualifier. For a launcher the inner-probe recognizer does not accept (for example `python scripts/x.py`, reason `unrecognized-launcher`) it prints `agent-loop: this receipt is not citable evidence: unrecognized test launcher, so suite start was not verified (suite_start=unknown). Citable runners: . Wrap the check in a pytest test to make it citable; you may still report it in tests_run.` +When the launcher family is citable but one of its arguments or its context is +rejected (#2036), the notice names the cause instead of calling the launcher +unrecognized, for example +`` agent-loop: this receipt is not citable evidence: `playwright test` is a citable runner, but `-g` is a short alias, which the citable allow-list does not accept; spell it `--grep=pat` (value options are citable only in `--name=value` form). Suite start was not verified (suite_start=unknown); you may still report it in tests_run. `` +The static explainer covers `playwright test` (including `npx` and a local +`node_modules/.bin/playwright`), `node --test` and package scripts that +resolve to them. It names short aliases and detached values (`-g pat`, +`--grep pat`, `-j 4`, `-x`) with their citable `--name=value` spelling, +code-loading options (`--config`/`-c`, including a scratch config outside the +checkout, `--tsconfig`, custom reporters: never citable), zero-test and +interactive options, the `--` separator, unknown options, a non-empty +`NODE_OPTIONS`/`PW_TEST_REPORTER`, a missing local Playwright binary for +`npx playwright`, and a package script with a `pre`/`post` hook or shell +syntax. A rejected argument appended with `npm run