Skip to content

C-series closeout: substrate gateway-env scrub, worker-host upgrade note, review-bench round 2, roadmap retrospective (v7.63.0) - #84

Merged
SSFSKIM merged 8 commits into
mainfrom
c-series-closeout
Aug 23, 2026
Merged

SSFSKIM merged 8 commits into
mainfrom
c-series-closeout

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Aug 23, 2026

Copy link
Copy Markdown
Owner

C-series closeout (v7.63.0). The umbrella #27 and its remaining children/follow-ons are terminal: #30 (wontfix per roadmap v1.5), #32/#37 (closed satisfied — already landed through the qa-loops rebuild), #27 (recomposition check passed, retrospective in this PR), and the three items with real work, which this branch carries:

dp#38 — plain-route daemons no longer inherit the gateway transport env

A dispatcher can itself run inside a gateway-routed daemon: the clodex settings file's env block (ANTHROPIC_BASE_URL, auth token, model aliases) is live in that session's environment and claude --bg inherits it — so a plain-route daemon rode the gateway for its first turn while its meta recorded nothing, and its first resume silently changed its model provider mid-life.

The substrate now enforces the route below the argv: when the settings value is empty (the plain route's existing declaration at every call site), daemon-spawn.sh and daemon-resume.sh launch the turn with env -u for exactly the keys the gateway settings file declares (_gateway_env_keys in _lib.sh). Names come from the file, never a hardcoded list; values — the auth token among them — are never read into argv or logs. No file, or an unparseable one, scrubs nothing: ambient transport vars on a host with no gateway config are the operator's own. The gateway route is untouched on spawn and resume alike.

Tests: 12 new asserts in tests/orchestrating-daemons/test-daemon-scripts.sh (TDD — the leak reproduced RED in the harness first: ambient-secret reached a "plain" child). The nested codex engine needs no equivalent: codex-rs has zero ANTHROPIC_* reads, confirmed against the source checkout.

dp#39 — worker-host upgrade note for bodies seeded with WORKER_ENGINE=codex

env.example dropped the key when the lanes moved to claude defaults, but layer-3 state is volume-persistent by design. The rebuild drill (README §4) now tells an upgrader exactly what to remove from ~/.env AND ~/runner/.env (a copy, not a symlink) and that the runner must be restarted; env.example's stale lane description ("review + land → codex") is corrected. The on-host half waits on the worker host — ida-worker-1 is offline (tailnet, last seen 7d).

dp#40 — review-bench fixture maintenance round 2

Seven adjudicated decisions, all fixes, no promotions (denominator stays 20): the six C2-run genuine-unseeded candidates across cases 1/3/4, plus a seventh this round's own verification caught (the symlink-parity fix admitted dangling links; the glob-era dereferencing guard is restored, discriminated by a drill where a dead link rotated a valid archive out of retention). The case4-u2 cross-engine disagreement resolves as a scoring mapping error — the refuted candidate was the local umask-hoist claim (now a documented bait), not u2, which codex re-found in both verification runs and stands as truth.

Every seeded bug re-triggered, every fix drill discriminates against the pre-edit tree, patches round-trip byte-identically. Verification runs (results/2026-08-23-r2-verify/): case1 3/3 exact, case3 3/3 exact, case4 6/6 + one adjudicated engine FP, re-run after the guard 6/6 exact FP 0 — the #40 acceptance holds with no exclusion list.

dp#27 — roadmap unit closed

## Outcomes & Retrospective written into the claude-review-stack roadmap spec after the recomposition check (acceptance re-scoped by v1.5/v1.6 — all three clauses verified against pinned tests); Revision Note v1.7 records the close.

Fixes #38. Fixes #39.

…ort env (dp#38)

A dispatcher can itself run inside a gateway-routed daemon: the clodex
settings file's env block (ANTHROPIC_BASE_URL, auth token, model aliases)
is live in that session's environment, and claude --bg inherits it — so a
plain-route daemon rode the gateway for its first turn while its meta
recorded nothing, and the first resume silently changed its model
provider mid-life.

The substrate now enforces the route below the argv: when the settings
value is empty (the plain route's existing declaration), daemon-spawn and
daemon-resume launch the turn with env -u for exactly the keys the
gateway settings file declares. Names come from the file, never a
hardcoded list (the file is user-local and changes without repo changes);
values — the auth token among them — are never read into argv or logs.
No file, or an unparseable one, scrubs nothing: ambient transport vars on
a host with no gateway config are the operator's own.

The gateway route is untouched on spawn and resume alike, pinned by new
tests either way; the nested codex engine needs no equivalent (codex-rs
has zero ANTHROPIC_* reads — confirmed against the source checkout).
…codex (dp#39)

env.example dropped the key when the lanes moved to claude defaults, but
layer-3 state is volume-persistent by design: an already-seeded body keeps
routing label-less workers through the clodex gateway until an operator
removes the key from both ~/.env and ~/runner/.env (a copy, not a symlink)
and restarts the runner. The rebuild drill now carries that note where an
upgrader actually looks, and env.example's lane description is unstaled
(review+land no longer default to codex; the land lane no longer exists).
…ations, u2 stands (dp#40)

Six adjudicated genuine-unseeded candidates from the C2 scored runs folded
into cases 1/3/4, all patch-side, all fixed locally (no promotions; the
denominator stays 20 = 17 seeded + 3 promoted): the source-dir symlink
probe and du sizing (trailing slash), a staging-filesystem headroom check
beside the archive-dir one, symlinked archive files restored to rotation
parity with the glob, explicit-null expected_revision rejected with 400,
non-dict tenant-config entries coerced to no-limits instead of aborting
ingest, and explicit-null tenant routed to the default tenant instead of
the phantom "None".

The case4-u2 cross-engine disagreement resolves as a scoring mapping
error: the candidate the argus high r2 verifier refuted was the LOCAL
umask-hoist claim (archive dir created 0700 — a non-defect, now a
documented bait in case.md), not the remote-replica umask exposure u2
describes. u2 remains truth untouched.

Every seeded bug of an edited case re-triggered after the edits; every fix
drill discriminates against the pre-edit tree; patches apply cleanly and
round-trip byte-identical. Full record in
tests/review-bench/results/2026-08-23-fixture-maintenance-r2.md.
…ist_archives (dp#40 follow-up)

The round-2 symlink-parity fix admitted dangling links: the glob-era
reader's [ -f "$file" ] dereferences, so a symlink to a real archive
counted while a dead link never occupied a retention slot — and without
the guard a dead link could rotate a valid archive out of BACKUP_KEEP
(discriminated: pre-guard tree deletes nightly-20200102 at keep=2). The
guard now rides the patch as an unchanged context line, since the base
always had it. Engine-verification record added to the r2 report: case1
3/3 exact, case3 3/3 exact, case4 6/6 truth-matched + 1 adjudicated
engine FP (the -mindepth portability claim, false against the BSD man
page and the never-flagged -maxdepth).
…nes ambient transport env

Two verified codex findings on the dp#38 scrub: a gateway settings file
declaring env.PATH would have made env -u PATH unresolve the claude
binary itself (exit 127 on every plain spawn and resume) — the scrub
blocks transport redirection and PATH is not transport, so it is excluded
at the source; and the test stub's transport-env snapshot could have
written a REAL ambient auth token into a log that assertion-failure paths
print — the suite now unsets the transport names at setup, pinned by a
setup-time assert. Three PATH regression asserts discriminate against the
reverted filter; 150/150 green, shellcheck clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant