Repository navigation
v7.204.9
First-turn bundled-skill ordering, full-auto resume mode/CAS, and git-init spawn diagnostics
What changed
- First-turn bundled-skill ordering (#3364): the deferred bundled-skill
materialization now pre-registers a completion handle at post-resolution-task
enqueue time, and a gate composed FIRST in the chat messages transform awaits
it (single 15 s budget) before the first turn proceeds. A fresh project's
first architect MODE self-load can no longer race the copy — measured in
19/19 live observations (ADR-0003 measurement of record, windows
~0.4–4.2 s) with the first turn arriving before the copy finished. Known
bound (disclosed; owner confirmation pending — the plan-approval question
went unanswered 2026-11-14, adopted under the session's standing work
authorization): three escapes keep today's
fail-open behavior for that turn (command-path sync backstop intact): a copy
slower than the 15 s budget, a genuinely failed sync, and registration refusal
at the internal 8-root cap (practically unreachable — one project root per
plugin process). The first turn of ANY agent in the project pays the single
wait; later turns are immediate. - Full-Auto resume mode + CAS (#3106):
/swarm full-auto resumenow
re-derives the armed mode from live config (full_auto.mode, defaulting to
supervised) instead of re-arming the paused-time mode — a post-pause config
tightening is in force for the resumed run. BEHAVIOR CHANGE (disclosed,
owner decision at the PR): the parsed config ALWAYS materializes
full_auto.mode(schema defaultsupervised), so the config value —
explicit or defaulted — always wins on resume: a per-runon strict
override pauses and resumes assupervisedunder a default config (the
pre-fix behavior kept the paused-time mode). A post-pause config LOOSENING
also applies. The raw-config hybrid (override survives unless the config
explicitly sets a mode) is the recorded owner follow-up option. Resume also arms through an expected-pauseGeneration CAS under the state
lock: a second process aborting, disarming, or re-pausing the run inside the
check-then-arm window is refused with state- and reason-conditional
guidance instead of being silently resurrected (an infrastructure re-pause
is directed toretry-oversight; a non-infrastructure re-pause names the
reason and directs tooffthenon; an abort or disarm directs to
re-enable withon). - git-init harness diagnostics (#3691): the delegation-gate test harness's
initProjectmoved totests/helpers/git-init-project.tsand now throws with
result.error/status=/signal=plus a bounded stderr tail — the empty
Error:CI failure class (run 43380165115) is diagnosable from the log line.
Why
Issue #3364 measured the first-turn window on a real host (16/16 runs in the
issue's own probe; the ADR-0003 measurement of record cited above is 19/19,
windows ~0.4–4.2 s); nothing
ordered the architect's MODE self-load read after the deferred copy, so
SKILL_LOAD_FAILED was reachable by timing luck. Issue #3106 carried two
verified findings from the PR #3091 review (paused-time mode re-arm asymmetry
with on, and the non-atomic check-then-arm window that resurrects terminal
state). Issue #3691 recorded the second episode of the delegation-gate
git-init flake with an undiagnosable empty error.
Boundaries
- The gate adds NO awaited I/O on the plugin-init path (repro-704 stays green);
the wait happens at first-turn time only. - The CAS is opt-in: only the resume command passes the expected generation;
onand the intercept hooks keep the unconditional arm. - v2 hosts share the fix through the same v1 messages-transform chain — no
separate v2 wiring. On v2 the gate's 15 s budget runs inside the 30 s
guidance-chain budget (V2_GUIDANCE_CHAIN_TIMEOUT_MS): only the disclosed15 s copy escape can consume it, and chain exhaustion restores the
pre-transform messages (guidance dropped for that turn — fail-open).
What changed
Closed ten fail-open verification-surface defects across the CI evidence
pipeline (collated #3700 + #3664 + #3661):
- pre_check_batch changed-line map (#3700): the diff-base resolver memo is
now scoped to onerun_pre_check_batchinvocation and passed explicitly to
both consumers, so a direct consumer call always resolves fresh state and a
fresh batch re-walks (a same-HEAD candidate-ref move can no longer serve a
stale merge-base ACROSS invocations that misclassifies genuinely-new SAST
findings as PRE-EXISTING; within ONE batch the two consumers deliberately
share the batch's single resolved base — consistency by design, corrected
by the next batch). The
phantom-destination guard now covers two-different-unquoted-path
diff --githeaders (an exact two-token split), the diff parser adopts a
stateful production-mode grammar (structural lines +GIT binary patch
fragments + blank terminators enumerated; junk before/between/after sections
fails closed instead of yielding an authoritative map), and all diff/status
legs emit project-directory coordinates (--relativefor diffs;
rev-parse --show-prefixrebasing for porcelain records, drop-outside with
paired rename sources) so a nested independent project root (.opencode/
boundary, #2127) classifies its genuine edits NEW. - Per-file CI validation harness (#3664): the child terminal-status
derivation now consults bounded-reader COMPLETENESS. A child whose run
completed with no timeout and no crash (cleanup succeeded, no signal, known
exit code) but whose stdout/stderr reader missed its deadline records the
new self-naming
output_truncatedterminal with a reason naming the truncated channel(s)
(the reason is reserved for that terminal — timeout and crash rows keep the
undefined reason, since the kill is their cause; PR #3718 review round),
counts as started+completed+failed, and fails the run — it can no longer
record a cleanpassedon partially observed output. Output that merely
EXCEEDS the saved-log byte cap is NOT incomplete (the reader drains to EOF
and the exit code is known), so fully-read capped output stayspassed
(final-critic round 1, executed against real CI reports). The report
verifier accepts and reconciles the new terminal in lockstep. - Required-check evidence capture + sandbox probe (#3661): the capture CLI
parses argv strictly (unknown flags,--output=PATH, case variants, and
stray positionals exit 2 before any capture work — no more silent
fall-through to overwriting the committed evidence artifact); the
spawnSyncgh call no longer signals its already-reaped pid (routed through
a testable_internals.spawnSyncseam); a required context matching
multiple same-named check runs now requires every run completed+successful
and an unambiguous single producing app slug; merge-group run collection is
scoped to contract workflows (matching the validator by construction); a
non-qualifying duplicate-named run disqualifies its head (skip to the next
candidate) rather than aborting the whole capture; and a sandbox-probe
setup-failure result is never memoized (the nextdetect()re-probes
instead of serving a degraded capability for the process lifetime), while
the enabled binary-stage observation of that transient result stays visible
to the synchronous executor-availability checks through a second
accessor-only slot — so a transient probe-environment failure can no longer
memoize a null executor and silently run advisory-mode shell commands
unsandboxed (PR #3718 review round, F-001).
Why
Each defect let a verification surface record a pass (or trust a map) from
stale, partial, or spoofed evidence — the same class as #3131/#2738. All ten
were reproduced by execution at the base commit before the fix and are pinned
by a frozen 15-check battery plus a re-pinned FB-003 suite.
Redaction-family hardening: widened bare-token corpus, persistence-boundary sanitization, and mock-target normalizer wedge fix
Widened credential corpus at BOTH redaction sites (#3712)
sanitizeFailureEvidenceDisplay (display sweep, src/failures/invocation-failure.ts)
and redactShellCommand (shell mirror, src/hooks/guardrails/helpers.ts) now redact
these additional bare well-known credential families, each with its own
[REDACTED:<family>] placeholder (the rotation signal the parity suites pin):
anthropic—sk-ant-…shapes (previously mislabeled[REDACTED:openai])openrouter—sk-or-…shapes (previously mislabeled[REDACTED:openai])google—GOCSPX-…(OAuth client secrets) andya29.…(GCP access tokens)groq—gsk_…service keysjwt— whole three-segment JWTs. The HEADER segment is base64url of{"…
(so it starts witheyJ) and is length-bounded to 10–1024 chars; the
PAYLOAD segment is any base64url run (≥1 char) and the signature is
≥10 chars. The payload is deliberately NOT required to be a JSON object:
an empty claims object encodes ase30, noteyJ(and anull/string
payload encodes asbnVsbA/Ingi), so requiringeyJthere would miss
those tokens. Disclosed bound (verified): an unbounded header segment
made the regex quadratic on a denseeyJ-run at the shell site, which
has no input-length bound and redacts BEFORE the audit truncation (measured:
256 KB took 30.7–33.3 s at the unbounded arm; 150–229 ms at the bound), so
a JWT whose header segment EXCEEDS 1024 chars is NOT matched by this arm
at either site, and the base64 fallback arm's class excludes base64url's
-/_, so such a token is not eliminated by a fallback either. A JWS
that carries anx5ccertificate chain (RFC 7515 §4.1.6 — e.g. an Apple
App Store Server or Android attestation signed payload) routinely has a
header of 1.2–5 KB, so this shape IS produced in practice: the header is
TYPICALLY caught by the base64 arm (that arm's class excludes base64url's
-/_, so a header whose long run carries those characters is not), but
the PAYLOAD and the SIGNATURE survive in clear text at both sites in a bare
placement (e.g.echo <jwt> | jq); a key/value placement (token=<jwt>)
is still caught by the generic credential arm at the shell site. Thejwt
family is NEW in this change — at the PR's base neither site patterned a
JWT at all, so no JWT (long header or not) was covered there — but the
coverage gap is real and is tracked in issue #3723 (the bound stays; the
gap needs a single-pass tokenizer that does not scan per start position).azure— CONTEXTUAL only: connection-stringAccountKey=<base64>spans
collapse to the bare[REDACTED:azure]placeholder. The arm is
case-INSENSITIVE (accountKey=,ACCOUNTKEY=), matching Azure's
case-insensitive connection-string key parsingbase64— the ≥80-char mixed-class base64 arm now also runs at the DISPLAY site
(previously shell-only); hex-only runs (SHA digests), uppercase-hex runs, and
sub-80 payloads stay visible at both sites
Family resolution is order-correct: the anthropic/openrouter shapes evaluate
BEFORE the openai shape in the mirror's sequential chain and win the display
sweep's identical-span selection, so sk-ant-api03-… and sk-or-v1-… tokens now
carry their correct provider labels. The widened corpus is pinned at both sites by
a new sibling parity suite (prose elimination, family placeholder, and
mirror-parity loops) alongside the existing #3165 suite, which is unchanged.
Disclosed bound (header placements): which placeholder a credential gets
depends on the placement AND on the site — the two sites do NOT apply the same
context arms. The executed behaviour (a gsk_… token; synthetic material):
| placement | display sweep | shell mirror |
|---|---|---|
Bearer <token> / Basic <token> |
Bearer [REDACTED:groq] (FAMILY) |
Bearer [REDACTED] (generic) |
-H "Authorization: Bearer <token>" |
-H "Authorization=<redacted> (generic) |
-H "Authorization: [REDACTED]" (generic) |
Authorization: Bearer <token> |
Authorization=<redacted> (generic) |
Authorization: Bearer [REDACTED] (generic) |
Authorization: <token> (bare) |
Authorization=<redacted> (generic) |
Authorization: [REDACTED:groq] (FAMILY) |
The display site has a generic credential-KV arm (a key followed by : or
=) but NO standalone Bearer/Basic arm, so a bare Bearer <token> is owned
by the FAMILY sweep there; the shell mirror has both a standalone Bearer/Basic
arm and an -H arm, so it owns those with the generic placeholder. A BARE
Authorization: <token> placement is the mirror image: the display KV arm
takes it, the shell site has no key-value arm for it and applies the family
label. At base the shell site left that token in CLEAR TEXT, so the family
label there is new, not byte-identical to base. The TOKEN is eliminated at
both sites in every shape; only the placeholder label differs by site and
placement. The per-family placeholder contract covers prose/bare placements
(the placement class with no adjacent key/scheme context the context arms can
match); pinned as intended by
tests/unit/failures/redaction-bounds-pins-3710.test.ts.
Disclosed bound (path-like base64 false positives): an >=80-character
mixed-class run without ./-/_ separators — e.g. a flattened long
mixed-case filesystem path in an ENOENT message — is redacted as
[REDACTED:base64] at BOTH sites (the shell site has behaved this way since
the arm shipped; the display site now matches it). Hex-only digests stay
visible at both sites.
Disclosed split (sync tool output): on the blocking dispatch path the
saved terminal record is sanitized, while the tool-result error returned to
the model still carries syncClassifiedReason ?? formatError(error) verbatim
(display surface, not a .swarm artifact). The lane-rejection artifact's
inline detail is additionally flattened to the sanitizer's 512-byte
single-line bound.
Disclosed bound: bare 32-hex Azure OpenAI keys are deliberately NOT patterned
— they are indistinguishable from MD5/hex digests that must stay visible
(#3712 AC3); only contextual AccountKey= forms are redacted.
Redacted provider-error text at every persistence boundary (#3710)
Across the dispatch family (full-auto oversight + legacy intercept, lean
turbo runner/critic/reviewer, dispatch-lanes, and the evaluation model
dispatcher), raw provider/SDK error JSON (JSON.stringify(<result>.error)) and
raw .message text no longer reach durable .swarm state unredacted.
sanitizeFailureEvidenceDisplay is applied at the persistence seams of the
dispatch family — AFTER every transient/quota classifier read, so model failover
behavior is unchanged:
src/full-auto/oversight.ts— infraReason (oversight events, phase evidence,
run-state records, pause reasons), health-probe reasons
(lastRecoveryProbe.reason), and the dispatch-failure logger argumentsrc/hooks/full-auto-intercept.ts— legacy critic infraReason (pause reason)
and logger argumentssrc/turbo/lean/runner.ts—dispatchResult.error(lane evidence,
phase evidence, recovery records)src/turbo/lean/integration.ts— critic evidence (lean-turbo-critic.json)
and the returned REJECTED reasonsrc/turbo/lean/reviewer.ts— reviewer evidence (lean-turbo-reviewer.json)
and the returned REJECTED reasonsrc/tools/dispatch-lanes.ts— lane-rejection artifacts, async launch-error
terminal records, and sync terminal records. The terminal triple
(error/chars/truncated/digest) derives from ONE sanitized message with the
established #2045/#2349 semantics (error= slice to MAX_ERROR_CHARS,
chars= sanitized full length,truncated= the bound flag,digest=
SHA-256 of the sanitized value), replacing the hardcodedtruncated: false
on the async pathsrc/review/engine.ts— the auto-review / final-review dispatch failure
detail (evidence.review.error->.swarm/evidence/<phase>/auto-review.json
and the core events log). Sanitized AFTER theisQuotaErrorclassifier has
read the raw value, so quota/failover classification is unchangedsrc/epic/phase-readiness.ts— the Epic phase-review dispatch-failure
reason (.swarm/evidence/<phase>/epic-phase-review.json). Sanitized AFTER
the transient/permanentclassifycallback has read the raw message, so
the retry classification is unchanged
Disclosed bound (evaluation failureCode): the evaluation dispatcher's
sanitized error is persisted as failureCode, a schema-capped 160-char field.
Redaction can LENGTHEN a message (a URL becomes <url:hash>, a credential
value becomes <redacted>), so the persisted value is sliced to the schema cap
at the consumer seam — the run's schema parse no longer fails and the whole
evaluation run is no longer discarded over an over-long failure string. The
pre-existing 160-char cap itself is unchanged; changing it is a schema
decision and is proposed as a follow-up (not yet filed).
The oversight infrastructure failure after N attempt(s): prefix and the
deadline / opencodeClient unavailable words survive redaction, so the
pause-reason matchers in full-auto/recovery.ts and full-auto-permission.ts
keep working. Long raw messages can be truncated by the sanitizer's internal
512-byte bound; the terminal-triple fields always describe the sanitized value.
Mock-target normalizer wedge fix (#3710)
normalize_mock_target (bash lib) and normalizeMockTarget (TS sibling) no
longer loop forever on //-form paths like foo//../bar: duplicate separators
are collapsed before the dotdot rewrite, and a rewrite that makes no progress is
a diagnosed BOUNDED REJECTION (TS throws; bash prints a stderr diagnostic and
returns 1) — never a traversal-bearing success value.
Declared behavior changes: duplicate separators now canonicalize
(foo//bar.ts → src/foo/bar.ts); foo//../bar normalizes to src/bar;
post-collapse unrewritable forms (e.g. /../bar) AND any residual parent
segment reject loudly instead of hanging or emitting a traversal-bearing path.
The residual check is SEGMENT-aware and identical in both siblings: a sole
.. segment, a leading ../, an interior /../, and a terminal /.. are
all rejected (a/../../b, foo/.., ..), while a .. INSIDE a segment
(a..b.ts) is not a parent segment and still normalizes. Benign inputs
(src/utils/logger.ts, a/b/c.ts, ../x/y.ts) are unchanged.
Structured provider-failure classification and phase-fresh fallback selection for Lean Turbo lanes; all-or-nothing coder scope-claim activation
#3177 — lean lane provider-error follow-ups
- Classification now consumes the structured snapshot (#3177-A / #1896 invariant 9). The provider error a lane dispatch surfaces now carries the canonical classification computed at read time (category, retry class, risk, status) instead of only the 512-byte-bounded display string. Consequences: a deterministic HTTP 403 whose provider-controlled message text mentions "429"/"rate limit" no longer burns the
fallback_modelschain (it used to advance through every fallback on a failure that can never succeed on any model), and a status-less rate limit whose keyword was truncated past the display bound now still fails over (it used to be classified permanent and never reach the chain). - Scoped fallback selection is keyed per phase (#3177-B). Lane ids restart their numbering every phase, so phase N+1's
lane-1used to resume phase N's advanced (or exhausted) chain state — either starting on the wrong model or failing instantly with "no dispatch attempted" and zerosession.promptcalls. The scoped selection is now keyed by phase ordinal AND per-runner run, so every phase — and every re-run of the same phase — starts fresh from the primary model. classifyProviderFailurehonors a pre-classified snapshot only on the verified provider-message carrier (provenance-gated by the nestedproviderErrormarker, all enum fields known, abort-like errors still classified cancelled first, unknown enums fall through fail-closed). Existing carrier consumers (full-auto oversight/intercept) keep status-bearing behavior identical and gain the read-time verdict for status-less text. The provider errornameis sanitized like the message (control and ANSI sequences no longer reach lane evidence).- For lane errors WITHOUT a provider-message carrier, the lane classify step now uses the canonical classifier instead of the transient-text matcher. Failover outcomes match for the messages probed, but a few text-only verdicts change direction in the canonical direction (for example "request aborted: upstream 503" is now permanent, and "rate limit, check credentials" is now operator-action).
#3403 — coder child scope-claim atomicity and trust model
- A failed coder scope-claim no longer leaves a half-applied activation (#3403 PRR-006). The dispatch lineage write that precedes the durable claim is now generation-stamped; when the claim fails with anything other than
SCOPE_NOT_DECLARED(e.g.SCOPE_BINDING_ALREADY_CLAIMEDfor a second claimant, persistence failure, ambiguity), exactly this write is rolled back — restoring any pre-existing adopted lineage rather than deleting it, and never clobbering a newer interleaved write (the rollback is conditional on the write generation, so a stale failure no-ops even when both attempts wrote the same parent). Previously the losing child's lineage stayed committed while its session identity/route bindings were permanently skipped, and every subsequent progress event re-threw. Overlapping progress events for one child are serialized, so two failing attempts leave no lineage behind, and a claim that throws rolls the write back before the exception propagates. - The child-identity trust model is documented and pinned (#3403 PRR-009). Both load-bearing sites (the delegation gate's
taskMetadataandclaimScopeBindingForChildDurably) now state which fields are host-typed vs tool-emitted and what a tool-emitted child id can cause, with a test pinning the documented claims, and a test pinning the successful claim's overwrite side effects by named field (agentNameoverwrite tocoder, PRM ladder reset,currentTaskId,declaredCoderScope,delegationActive, and the non-transient circuit). The v1 host contract itself is unchanged.