F1 fixed in da1f0ceda, with the federation acceptance red and green runs and
the script suite results. F2: the invalid-proxy-context BundleError is raised
at launcher.mjs:569, outside the try at :655, so :686 never sees it;
fromSession maps it at :1199 and launchPm rethrows it at :1215.
670 lines
79 KiB
Markdown
670 lines
79 KiB
Markdown
# Row 332 — P3 harness config from the model proxy
|
||
|
||
## Assignment and boundaries
|
||
|
||
2026-10-24: Fethry, thread 65673bd9-3bfa-412b-85d5-9b364187d8b6, branch fethry/row332, baseline c8a9bcf94. Sage assignment sage-4292; accepted brief plus full pi-routes amendment c8a9bcf94 (mos-1616). Gladstone first review, Dewey landing review; landing waits for P1/329 and P2/331, rebase on both and Sage's gate. No tests before Sage's CLEAR. No live proxy, host credential directories, real proxy data, management key, cutover, policy edits, or Codex harness changes.
|
||
|
||
Queue next in canonical checkout returned `nothing` during assignment. Starting row with op fethry-332-start met Sage's queue update lock; retry through the queue only. Root npm ci --ignore-scripts --no-audit --no-fund completed in this worktree (128 packages); no canonical node_modules use.
|
||
|
||
## Design note (line numbers at c8a9bcf94)
|
||
|
||
- packages/seat/src/session.mjs:242-247 defines ENV_ALLOW; keep it unchanged. sessionEnv:256-262 gains optional proxy context and drops CLAUDE_CODE_OAUTH_TOKEN, every passed ANTHROPIC_* variable, OPENAI_API_KEY, OPENROUTER_API_KEY and ZAI_API_KEY before adding harness env. Non-proxy results retain current behavior exactly.
|
||
- packages/plugins/harness/claude-code/index.mjs:56-67 preflight accepts the session proxy credential; env:119-126 sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN from that context.
|
||
- packages/plugins/harness/pi/index.mjs:33-36 preflight requires its own provider credential or proxy key, never a Claude OAuth token. env:63-70 sets only the session's proxy key as ANTHROPIC_API_KEY and selects the generated provider. Fresh run-local home/.pi/agent/models.json is private (0600; parent directories 0700). Every apiKey is the literal reference $ANTHROPIC_API_KEY; recursively forbid values beginning with !. Nothing stores the key in models.json or a manifest.
|
||
- packages/harness/src/bundle.mjs:313 buildBundle accepts transient proxy context; :379 harness.env call needs it plus run location and launch.models. Context must never be added to session metadata, source digests, or manifest. The run-local file regenerates on each launch.
|
||
- packages/cli/src/launcher.mjs:391,400 preflight, :412 account checks, :529 bundle creation and :592 child env must agree on the same session credential. Coordinate its acquisition with P2; build/test now against the specified { baseUrl, key } stand-in, not a management client or a key-store implementation.
|
||
|
||
Exact business setting keys remain launch.models.<selection>.provider, launch.models.<selection>.model, launch.account.name and launch.account.credential (launch.mjs:12-24,81-89). Provider already accepts proxy. Proposed account credential sentinel is the literal proxy (add alongside existing uppercase environment-set syntax), with launch.account.name a human-readable id such as proxy. No new fields. Existing provider anthropic selects the Anthropic route, zai selects GLM, and proxy selects the stack-owned GPT route; send this interpretation to Sage before implementation because the brief doesn't specify route encoding for provider proxy.
|
||
|
||
## Build-time API choice and pinned binary
|
||
|
||
P1's committed magica/row329 has CLIProxyAPI 8.0.42 in packages/model-proxy/PIN. Use that commit's fetchPinned({dataRoot:<fresh temporary root>}) implementation, copied from Git objects to this seat's temp tooling directory with its relative dependencies and PIN, until P1 lands. Never inspect another seat's worktree/scratch. It fetches only pinned GitHub release assets and checks archive, executable and panel hashes. No production instance config is needed and nothing under a real dataRoot/proxy is read.
|
||
|
||
After CLEAR, try actual pinned pi requests with both openai-responses and openai-completions through that binary under unshare -rn, against stand-in upstreams with made-up credentials under 24 characters. Record version, API path, safe request fields, response status and turn result. Choose one shape once from those results and hard-code it; no runtime fallback. Real Codex OAuth cannot be simulated as a real authenticated turn: first real Codex turn remains row209 phase A step7. Distinguish the offline compatibility evidence from that deferred real-auth proof.
|
||
|
||
The separate offline GLM acceptance script (outside scripts/test-*.sh) uses pinned pi and proxy, checks the upstream sees the model id from /v1/models, and records whether thinkingFormat/zaiToolStream-derived fields survive translation. All configs/auth placeholders belong to its fresh temp root.
|
||
|
||
## Implementation and test sequence
|
||
|
||
1. Add tests first for env isolation, Claude proxy env and preflight, pi credential refusal and each generated route/file invariant, and business account acceptance. Do not run until CLEAR; first new-test red is reported afterward, old-test red or second red is reported before changing anything.
|
||
2. Implement harness/bundle/env handling against P2's transient interface. Add launcher boundary integration once its exact P2 acquisition seam is agreed. Keep secrets out of session.json and bundle manifests.
|
||
3. With CLEAR, run the offline API-shape probe and GLM turn, then whole touched test files. Before each whole-file run report the list derived by parsing imports and traversing local dependencies; include harness plug-in dynamic loading explicitly. packages/cli/tests/case1-accept.test.mjs remains excluded without Mos approval.
|
||
4. Kill named mutants; restore production source and verify. Record exact output and nice. Use a fresh shell mktemp -d /mnt/storage/scratch/tmp/XXXXXX TMPDIR for each run, absolute nice 19, and timeout -k 10 for each scripts/test-*.sh. No hidden skips; Sage owns the package/script landing gate.
|
||
5. After dependency landings, rebase, complete review and gate stages, update queue only through its CLI, and append session/build receipts. Push only fethry/* when ready for authorized review; no force-push or attribution trailers.
|
||
|
||
Planned tests:
|
||
- Each forbidden environment variable is absent in proxy mode; all existing allowed env is identical without a proxy; two launches receive distinct own keys and no other agent's key.
|
||
- Claude env has exactly the supplied proxy base URL/auth token; proxy credential satisfies preflight without host upstream credentials.
|
||
- pi refuses no-session-credential for no key or Claude OAuth alone, accepts an own provider key and a proxy key.
|
||
- models.json covers Anthropic anthropic-messages at root URL, GLM openai-completions at /v1, and a stack-owned GPT provider at /v1 with the chosen API; routes use configured model ids.
|
||
- Every apiKey is $ANTHROPIC_API_KEY; no key value occurs in file; recursively no value starts with !; mode 0600 and private parents; next launch uses changed port/models/key reference with no stale content.
|
||
- Business accepts provider proxy and account credential proxy while preserving existing valid and invalid account behavior.
|
||
- Launcher/bundle integration keeps context transient and passes only the launch's own key.
|
||
- Every new refusal code gets a separate test.
|
||
- Offline GLM pinned-pi turn and z.ai compat observation; both GPT API-shape requests recorded with limitations.
|
||
|
||
Named gate mutants:
|
||
1. Proxy mode still passes CLAUDE_CODE_OAUTH_TOKEN (original brief).
|
||
2. models.json receives the key value instead of $ANTHROPIC_API_KEY (amendment).
|
||
|
||
No tests have run. API-shape choice is pending evidence, not claimed.
|
||
|
||
## Progress 22:27Z
|
||
|
||
Placed initial RED tests (not executed): packages/seat/tests/proxy-session-env.test.mjs and packages/plugins/tests/proxy-harness.test.mjs. These exercise real sessionEnv and loader-loaded harness exports. Production source remains untouched pending the first authorized RED run. Removed no assertions and ran no tests. Correct baseline bundle harness.env line is 376 (not 379 in the initial design note).
|
||
|
||
Sage reporting attempts fethry-0001 (including same-key retry) and fethry-0002 all returned `T3 GET /api/orchestration/threads/<sage> timed out after 30s`. Delivery is unconfirmed. Queue move retry also met a Sage queue update lock (sage-333-reviewers-1024a); no bypass.
|
||
|
||
Additional test-first placement: packages/business/tests/proxy-launch.test.mjs covers existing proxy model acceptance, proposed proxy account credential literal, preserved environment account forms, and rejection of mixed/literal credential strings. Pending Sage's route/account interpretation and CLEAR; no production edits or tests run.
|
||
|
||
## Import audit and queue status
|
||
|
||
The non-evaluating import audit uses Node vm.SourceTextModule.dependencySpecifiers, not a text-path grep, plus explicit computed-import edges from the plug-in loader to both harness modules. Source: import-run-list.mjs; output: IMPORT-RUN-LIST.txt (211 entries, including the explicitly EXCLUDED case1-accept file). This is a candidate impact list for the planned source changes, not an executed test list. Before a whole-file run, report the actual authorized subset to Sage. Parsing executes no repository modules and runs no tests. The first audit invocation had a path-depth setup error (ENOENT); corrected the audit's own repository root and regenerated successfully.
|
||
|
||
At 22:28:19Z the canonical start operation returned `queue: only the owner (sage) may start row 332`. Per assignment, wait at least two minutes before repeating this same op. No queue state was edited manually.
|
||
|
||
## Design correction after D9 re-read
|
||
|
||
The initial route-encoding proposal (provider proxy for GPT only) is not sufficient: design D9 explicitly defines provider proxy as any model through the instance proxy. Do not implement the earlier proposal. Two viable encodings need resolving before route-dependent tests/production: exact model-id lookup in pinned pi's provider catalogs (no new business fields, but refuses proxy-only aliases/unknown models), or explicit route metadata in launch.models (additive schema, needs Sage to confirm it is within the approved brief). Recommend exact catalog membership if all intended configured model ids are in pinned pi; otherwise ask Sage to define/approve an explicit route field. Never guess by model prefix or silently choose a wire API. Independent env/preflight tests already placed remain valid.
|
||
|
||
Reporting recovered: fethry-0004 was accepted by t3_send_message at approximately 22:29:51Z. It delivered the D9 route correction, route-encoding/P2-seam question, import-manifest location and no-tests status to Sage. Earlier failed-message deliveries remain unconfirmed.
|
||
|
||
22:32:18Z: The start retry issued at 22:30:40Z (over two minutes after first owner refusal) also exited 2: `queue: only the owner (sage) may start row 332`. This is an ownership boundary; row was not started and no code/test execution proceeds through it. Sage's assignment must take effect before the same op can succeed. The full design report fethry-0005 again timed out; fethry-0004 is the confirmed delivered report. git diff --check passed; no test, probe, commit or push has run.
|
||
|
||
## Route ruling accepted — sage-4293, 22:37Z
|
||
|
||
Sage settled explicit metadata, superseding both initial encoding proposals and the catalog proposal. Exact new setting: launch.models.<selection>.route; permitted values anthropic, glm, codex, required only when provider is proxy. Nonproxy entries still allow provider/model only. Missing route refuses proxy-route-missing; present unknown/nonstring route refuses proxy-route-unknown. Both get independent code assertions; each valid value gets a test using a proxy-only model id absent from any catalog. The GPT route's generated pi provider will be mosaic-proxy-codex, never openai-codex. Its wire API remains a build-time choice after the pinned-binary probe. P2 passes only {baseUrl,key}; no route belongs to that seam.
|
||
|
||
A key persistence hazard found during source inspection: launcher.mjs:571 writes bundle.env as session.harnessEnv. Adding the key to harness.env must not retain this behavior for credentials. P3 will keep generated key env transient for spawnSession and omit those credential values from serialized harnessEnv. runner.mjs:390 already inherits the spawn environment before applying nonsecret harnessEnv. Test the on-disk session/bundle boundary, not only models.json.
|
||
|
||
The old launch-settings.test.mjs already uses provider proxy fixtures without route. Update those fixtures to explicit anthropic routes before any full-file run; preserve their existing authorization assertions. This is the new approved validation shape, not permission to loosen tests. No tests have run and no production edits exist.
|
||
|
||
Additional test-first placement after route ruling: packages/harness/tests/proxy-bundle.test.mjs exercises real buildBundle with explicit provider proxy entries and proxy-only model ids, three generated providers, run-local file mode, environment references, recursive no-! values, no key in bundle files/manifest, fresh model/port/key on next launch. The exact GPT API assertion must be added from the authorized pinned-binary probe before this test file's first run; it deliberately makes no unverified wire-shape claim now. No skip is introduced.
|
||
|
||
Canonical queue show returned owner sage and after=331 at 22:40Z; it also warned `view unknown` for the rendered table. No repair or queue bypass attempted; wait for Sage's announced batch. Queue metadata identifies shared proxy Gitea issue #1830.
|
||
|
||
## STOPPED — mos-1630, 2026-10-24T22:48Z
|
||
|
||
Jason's relayed crash instruction supersedes active work: no long-job restart, commit/push safe documentation only, handoff in this worktree, no other thread messages, then stop. See HANDOFF.md for complete state, next steps, uncommitted tests/audit script, and reruns needed. No tests or probes ever ran; no production implementation exists. Latest design is explicit launch.models route metadata per sage-4293; earlier catalog/GPT-only proposals are superseded. The original 211-entry import manifest predates the fourth new test file and is historical, not run authorization. Full inline resends still hit T3 timeouts. Crash commit will exclude every unrun test and the audit script.
|
||
|
||
## Resumed — sage-4298, 2026-10-24T23:12Z
|
||
|
||
Resume authorized; crash-stop state above is historical. Sage accepts route spellings, refusal codes, mosaic-proxy-codex and launch.account.credential=proxy. Added third named mutant: **proxy key serialized into session.json**. Added an unrun real-launcher integration test in packages/cli/tests/launcher.test.mjs: a stand-in `{baseUrl,key}` enters via proposed createLauncher proxy option; real harness generation, session writer and runner must pass the key transiently while disk session/bundle files omit it. Adapter alone is fake. This catches restoring harnessEnv:bundle.env without credential separation. Existing test assertions are unchanged.
|
||
|
||
Regenerated IMPORT-RUN-LIST.txt with the non-evaluating import audit (static module dependencies plus explicit computed harness-loader edges). It now includes proxy-bundle.test.mjs; case1-accept remains explicitly EXCLUDED (mos-1612). Full manifest, touched tests and all three named mutants delivered inline to Sage using t3_code t3_thread_send, clientRequestId fethry-row332-resume-report-001, delivery steered. No unresolved route question remains. GPT API selection awaits CLEAR and pinned-binary evidence. Production implementation remains held for required first RED; tests/probes/fetches remain held for CLEAR. git diff --check clean.
|
||
|
||
Canonical queue next fethry started without timeout; no start retry until Sage confirms after-none write. Initial local-worktree queue invocation refused because queue requires canonical checkout; rerouted to canonical as required, no state bypass.
|
||
|
||
## Queue start retry — sage-4301, 2026-10-24T23:15Z
|
||
|
||
Sage reports after=none at rev4057. Retried canonical `scripts/mosaic queue move 332 in-progress --op fethry-332-start --by fethry` without a timeout. Awaiting its result; no duplicate command or manual queue edit. Lane B remains held and all tests/probes/fetches remain forbidden until CLEAR. Static review of test fixtures confirms launcher test uses the existing real-harness fake-adapter setup; initial RED remains unrun.
|
||
|
||
Start result: `ok fethry-332-start rev 4059 row 332 briefed→in-progress` (exit0). No tests/probes/fetches run.
|
||
|
||
## P1 rebase and pre-run reader stop — sage-4312/4313
|
||
|
||
Rebased onto 9e2689dff; current documentation checkpoint efe3e4697. Saved/restored all uncommitted notes/tests with named stash (retained for recovery). BUILD-LOG.md and SESSIONS.md append conflicts preserve both upstream and row332 entries. No production edits or force-push. git diff --check clean.
|
||
|
||
CLEAR received in sage-4313, conditional on pre-step reader check. STOP condition found before any test/probe/fetch: packages/cli/tests/launcher.test.mjs imports ./helpers.mjs, whose line10 imports BusError/Broker from ../../bus/src/broker.mjs (P1-changed path). The P3 test also starts the real broker through startHost. Report delivered to Sage as fethry-resume-0003, clientRequestId fethry-row332-p1-reader-stop. Await specific reader-chain authorization. No runs, counts or mutant outcomes exist. Mutant execution requires implementation reaching GREEN first; baseline RED will not be claimed as mutant evidence.
|
||
|
||
## First execution — sage-4316/4319, lane B, 2026-10-24
|
||
|
||
Reader chain authorized by sage-4316. Every run below used fresh shell `mktemp -d /mnt/storage/scratch/tmp/gXXX`, absolute nice19 (recorded), timeout -k10 (180s new files/300s whole launcher). No probes/fetches/mutants or case1-accept run. Logs are plain text in red/ beside this note.
|
||
|
||
| File | UTC start/end | pass/fail/skip | Classification |
|
||
| --- | --- | --- | --- |
|
||
| business proxy-launch | 23:41:37/23:41:37 | 2/4/0 | Expected missing route validation/account support |
|
||
| harness proxy-bundle | 23:41:42/23:41:42 | 0/5/0 | Fixture ERROR: assignment to frozen resolved.vars, not feature RED |
|
||
| plugins proxy-harness | 23:41:44/23:41:44 | 0/5/0 | Fixture ERROR: missing createLoader options, not feature RED |
|
||
| seat proxy-session-env | 23:41:50/23:41:50 | 1/1/0 | Expected instance OAuth leak |
|
||
| cli launcher (whole) | 23:41:55/23:42:25 | 34/1/0 | New P3 route rejected; all34 old tests pass |
|
||
|
||
Per sage-4319, fixed only the two new-file fixtures and committed b285e581e `fixture fix, untested` before rerunning. resolvedFor uses its mutation callback; createLoader receives {log(){}}. Existing launcher assertions were not changed.
|
||
|
||
| Corrected file | UTC start/end | pass/fail/skip | Classification |
|
||
| --- | --- | --- | --- |
|
||
| harness proxy-bundle | 23:42:41/23:42:41 | 0/5/0 | Another fixture ERROR: pm selects a/z/g absent from fixture launch.models; not valid feature RED |
|
||
| plugins proxy-harness | 23:42:41/23:42:41 | 1/4/0 | Valid feature REDs: missing Claude proxy URL/key and preflight; pi missing-credential refusals absent. Acceptance test already passes because existing pi preflight only checks binary; not proof of proxy credential behavior |
|
||
|
||
Stopped after exactly one authorized corrected run each. No edits/reruns after second harness fixture error; report to Sage before changes. Proposed follow-up: preserve valid fixture business routing, then overlay a test-local resolved vars object for buildBundle, or supply a coherent model table in callback. GPT API assertion still awaits authorized evidence and must precede a GREEN claim.
|
||
|
||
Stash created before rebase: 69ad35ec79805a0303ede4454f8d6815ddfa7bb3. Shared refs/stash must not be used again; entry remains untouched for Sage to clear. Future checkpoints use branch WIP commits.
|
||
|
||
Own-worktree node/chromium process sweep at23:42:57Z found only six tool-service processes predating tests (started23:12:08–23:12:10Z), no test node/chromium leftovers. Preserved tool services. No process killed. Lane B returned; mutants deferred until RED→fix→GREEN and later CLEAR with tip.
|
||
|
||
## Corrected bundle first valid RED — sage-4320
|
||
|
||
Only proxy-bundle.test.mjs edited: resolve a valid existing fixture business first, then copy resolved and vars locally, overlay harness/model, and assert selection exists in the supplied declared models table. Frozen original is untouched. Commit56701f715 `fixture fix, untested`, directly atop b285e581e, before execution.
|
||
|
||
Exactly one whole proxy-bundle run at23:44:40Z (start/end), fresh gXXX TMPDIR, nice19, timeout-k10/180s: 5tests,0pass,5fail,0skip,exit1. All five now reach real buildBundle and fail ENOENT on the required run/home/.pi/agent/models.json: missing production generation, valid feature RED rather than fixture errors. Earlier frozen-vars and unknown-model errors remain separately recorded. Log red/harness-corrected-2.txt. No production edits, further runs, mutants, probes or fetches. Lane B free.
|
||
|
||
Rebase made original origin/fethry/row332 diverge from local; publish current history on fethry/row332-p1 without force, preserving original remote checkpoint. Shared stash69ad35ec79805a0303ede4454f8d6815ddfa7bb3 remains untouched. Remaining uncommitted business/seat tests, launcher addition and audit source are not included in this two-fixture checkpoint.
|
||
|
||
## P3 implementation checkpoint — sage-4323/4325, UNRUN
|
||
|
||
Scope correction: sage-4322's P1 meant P3; no P1 code changed. Source edits authorized by sage-4323; all runs remain held. This is an implementation checkpoint, not GREEN or acceptance. Executing the established plan inline; user lane restrictions supersede skill test-run/commit defaults for this checkpoint.
|
||
|
||
Latest route ruling sage-4325 supersedes sage-4293/4298 and all earlier route-required notes: omitted proxy route means Anthropic and preserves the stored provider/model shape. Explicit anthropic/glm/codex routes remain accepted; unknown/present-invalid route refuses proxy-route-unknown. proxy-route-missing is withdrawn, not implemented. Other providers keep provider/model-only schema. Own business test updated for default; new bundle test exercises default generation without changing existing explicit-route assertions. launch-settings.test.mjs remains byte-unchanged.
|
||
|
||
Implementation in six production files:
|
||
- business launch validates optional proxy route, preserves omission, accepts account credential literal proxy.
|
||
- seat sessionEnv leaves ENV_ALLOW unchanged and filters provider variables only with proxy context.
|
||
- Claude accepts proxy credential preflight and returns proxy base/auth env; pi requires own provider key or proxy key, never Claude OAuth.
|
||
- bundle carries transient proxy/models to harness calls and propagates proxyRoute separately from primary/fallback route; no context in manifest.
|
||
- pi groups declared routes into run-local private models.json, references only $ANTHROPIC_API_KEY, refuses executable-looking model ids/key collisions, exclusive create and0700 parents/0600 file. No host auth reads. Generated file digest included in bundle manifest. Models use pi's documented default sizes/costs and reasoning support, with explicit z.ai compat for GLM; no catalog membership inference.
|
||
- launcher accepts the specified context stand-in or a per-agent factory, copies only baseUrl/key, carries it through repeated preflight checks and final bundle/spawn. Factory receives business/instance; P2 owns acquisition and may be called twice due to existing launch recheck. No P2 store/client calls invented. Provider credential variables split out at actual session.json serialization and delivered only through spawn env. Account proxy source validates against the supplied context, not host upstream variables.
|
||
|
||
### Old-test changes authorized by sage-4325 (baseline1e47b0919)
|
||
|
||
P3 item4 (rows brief pi preflight bullet, lines250-252) mandates refusal without proxy/own credential:
|
||
- plugins/tests/harness.test.mjs:102 before `assert.equal(pi.preflight({ env: {} }), null)`; after asserts `.code === no-session-credential`. Other assertions unchanged.
|
||
- cli/tests/launcher.test.mjs prepare():84 before only fake Claude OAuth; after additionally supplies ZAI_API_KEY=fx332-pi only when chief primary/fallback names pi. Other tests' assertions unchanged; Claude-only preparation does not receive it.
|
||
- cli/tests/launcher.test.mjs old no-credential pi test (sage reference697): before deletes OAuth then expects launch/pi and launch-log event; after also deletes newly supplied fake ZAI key, expects no-session-credential refusal, refused log code and no registered session. Test renamed to reflect mandated behavior. Existing no-session-credential Claude test unchanged.
|
||
|
||
No other old test was changed. Static review found these conflicts before execution and authorization preceded edits. No old-test RED occurred; baseline whole launcher had34 old passes.
|
||
|
||
### GPT wire API: PENDING
|
||
|
||
Single build-time value PROXY_CODEX_API=null in pi/index.mjs. A declared codex route refuses generation with a plain pending-evidence error until that value is settled; no guessed wire API, environment switch or runtime fallback. Consequently existing all-three-route bundle tests are not expected GREEN yet. P2 integration, full tests, pinned evidence, mutants and reviews remain pending.
|
||
|
||
Planned separate 4c evidence run (outside scripts/test-*.sh), requiring its own lane B CLEAR:
|
||
1. Use landed P1 fetchPinned only under a fresh owned temp root for the exact PIN (8.0.42). Fetch is a separately approved preparation, not part of offline networking. Verify hashes via P1; never use host installation or another seat's scratch.
|
||
2. Run the pinned proxy and local stand-in upstream inside unshare -rn with loopback enabled, empty private HOME/auth dir and a sanitized environment. No real auth file or network. All fake credentials under24 chars. Private test-only proxy config points only at the stand-in.
|
||
3. Generate two private probe-only pi model configs, one openai-responses and one openai-completions, both baseUrl=the isolated proxy/v1. Run pinned pi turns and record safe path/body shape fields, statuses, stream result and upstream observations, omitting auth/header values. These probe configs do not select the production constant.
|
||
4. Separately run the GLM completions turn under the same isolation and record whether thinkingFormat=zai/zaiToolStream-derived fields survive proxy translation.
|
||
5. If the offline stand-in cannot distinguish the two GPT shapes for the Codex-login route, report inconclusive evidence to Sage for Mos; do not select a value. A compatibility route cannot be reported as a real Codex-auth turn. First real Codex turn remains row209 phaseA step7.
|
||
|
||
No tests, probes, binary invocation or fetch ran during implementation. Import audit below is source parsing only, never repository evaluation. New run list includes the old harness.test.mjs touched under ruling; case1-accept remains EXCLUDED. Shared stash already cleared by Sage after1e47b0919 confirmation; no further stash operation used.
|
||
|
||
## Six whole files on a5330386c — sage-4326 lane B
|
||
|
||
Each ran exactly once, in requested order, no edits between runs and no reruns. Fresh shell gXXX TMPDIR per file; every log records nice19; timeout-k10/180s (launcher300s). No mutants/probes/fetches or extra impact files. Logs green-attempt/*.txt.
|
||
|
||
| File | pass/fail/skip | exit | UTC start/end |
|
||
| --- | --- | --- | --- |
|
||
| business | 6/0/0 | 0 | 23:57:06Z/23:57:06Z |
|
||
| seat | 2/0/0 | 0 | 23:57:06Z/23:57:06Z |
|
||
| proxy-harness | 5/0/0 | 0 | 23:57:06Z/23:57:06Z |
|
||
| harness | 9/0/0 | 0 | 23:57:12Z/23:57:12Z |
|
||
| proxy-bundle | 1/5/0 | 1 | 23:57:12Z/23:57:12Z |
|
||
| launcher | 34/1/0 | 1 | 23:57:12Z/23:57:42Z |
|
||
|
||
Expected-PENDING failures (each shared declared table includes codex), all stop before assertions with `Error: proxy GPT API is PENDING build-time evidence`:
|
||
- P3 Anthropic route uses messages at proxy root and the declared model id
|
||
- P3 GLM route uses completions at proxy /v1 with explicit z.ai compatibility
|
||
- P3 GPT route selects a stack-owned provider instead of pi Codex OAuth
|
||
- P3 models file is private, references the one session key, and stores no executable values or keys
|
||
- P3 every launch regenerates proxy port, declared models and own key without caching
|
||
|
||
The omitted-route-only bundle case passed. Five pending failures do not establish the remaining route/file assertions; no claim of GREEN.
|
||
|
||
Real old-test RED: `row 65 a failed primary preflight launches the fallback on a fixture harness module, recording the route and the reason` (launcher.test.mjs:714). First expected operation `await launcher.launchPm()` throws before the result assertions: `PM launch refused: no-session-credential (fallback fixture: pi needs its own provider key or a session proxy key (primary down: fixture preflight fails))`. Fixture harness re-exports real pi; prepare() recognized literal pi primary/fallback only, so it did not supply the needed own key. Reported to Sage as fethry-resume-0012 before any edit; no fix or rerun authorized/performed. P3 serialization test and all other launcher tests passed.
|
||
|
||
After all runs finished, changed only harness.test.mjs:100 title per sage-4326 to `row 65 pi preflight refuses missing credentials, and its version is the package pin`; assertion unchanged, no rerun for title. Sweep after end23:57:42Z found the same six pre-existing tool services (2699602,2699605,2700525,2700526,2700531,2700931), no test node/chromium leftovers; no process killed. Lane B free. No other source/test fixes in this follow-up.
|
||
|
||
## Fixture correction authorized — sage-4327
|
||
|
||
Old-test list addition: launcher.test.mjs row65 fallback test (line714 at e9fc105ac), before: no own pi credential before setup; after: this test alone sets given.f.env.ZAI_API_KEY=fx332-pi immediately before setup. All assertions unchanged; prepare() condition unchanged. Reason: P3 item4 requires pi own/proxy credential; this fixture inherits pi preflight. Prior real RED and first thrown error preserved above.
|
||
|
||
New proxy-bundle tests now supply explicit per-test declared tables: Anthropic only, omitted/default only, GLM only, GPT only; privacy/regeneration use Anthropic+GLM and retain every key/mode/no-executable assertion applicable to those routes. Regeneration additionally checks changed GLM endpoint/model. Added expected refusal test for declared Codex with pending build-time API; no production source changes. Only GPT generation test should remain expected-PENDING. Fixture fixes committed untested before exactly two authorized whole-file runs.
|
||
|
||
### Two-file fixture verification — sage-4327
|
||
|
||
Fixture checkpoint f1e8cda07, no source change. Exactly one run each, no edits between runs or reruns. nice19, fresh gXXX TMPDIR per file, timeout-k10/180s bundle and300s launcher. Logs fixture-r3/*.txt.
|
||
- proxy-bundle23:59:16Z:7tests,6pass,1fail,0skip,exit1. Sole expected-PENDING failure: `P3 GPT route selects a stack-owned provider instead of pi Codex OAuth`, error `proxy GPT API is PENDING build-time evidence`. All other route/privacy/regeneration cases and explicit pending-refusal case pass.
|
||
- launcher23:59:16–23:59:45Z:35tests,35pass,0fail,0skip,exit0. Row65 fallback assertions unchanged and now pass; P3 transient serialization case passes.
|
||
|
||
No failure other than expected GPT generation; GPT wire evidence, P2 integration/rebase, mutants and reviews still pending. Sweep shows only same six pre-existing node/chrome tool services, no test leftovers. Lane B free after23:59:45Z. No probes/fetches/mutants or extra tests run.
|
||
|
||
## Route-required correction — sage-4328 restores sage-4293
|
||
|
||
sage-4325 default-Anthropic ruling withdrawn. Explicit route required again: missing proxy-route-missing, present invalid proxy-route-unknown, distinct own tests. Removed generation/session-model defaults; bundle omitted-route test now asserts missing-route code. Active plug-in documentation corrected. No catalog/prefix inference.
|
||
|
||
Old-test list (baseline1da28a7bd): launch-settings.test.mjs41,154,161,188,198 object fixtures before provider:proxy/model only; after identical objects plus route:anthropic. Line45 before assignment models.opus.provider=proxy; after adds models.opus.route=anthropic. Every assertion byte-unchanged; no assertion relaxed. Authority/reason sage-4293 restored by sage-4328: D9 proxy is any upstream route and omission cannot select Anthropic silently.
|
||
|
||
Pre-run git-grep audit scoped 'packages/*/tests/*', saved route-required/proxy-fixture-grep.txt:16 model/assignment lines in four files. Positive controls matched launch-settings41 literal,45 assignment and intentional missing inputs proxy-launch14/proxy-bundle47. Broader quoted-proxy literal audit saved proxy-literal-grep.txt, manually reviewed for multiline entries. Remaining route omissions only intentional refusal cases (proxy-launch14,proxy-bundle47); unknown-route test uses route variable. All six old fixtures explicit; launcher155 and remaining bundle model literals explicit. Other broad hits are account sentinels, CLI argv or filesystem strings, not model table entries. Findings sent inline as fethry-resume-0015 BEFORE any tests. No other missing-route positive fixture found.
|
||
|
||
Committed untested per instruction; four whole-file runs follow under lane B CLEAR, no reruns or extra files. GPT offline run and P1 fetch remain unstarted and require separate explicit go.
|
||
|
||
### Required-route four-file verification — sage-4328
|
||
|
||
Tested9563fbc8b, exactly once per whole file in authorized order. No edits between runs, no reruns/extra tests. Each fresh gXXX TMPDIR,nice19,timeout-k10/180s (launcher300s). Plain logs route-required/*.txt.
|
||
|
||
| File | pass/fail/skip | exit | UTC start/end (2026-10-25) |
|
||
| --- | --- | --- | --- |
|
||
| proxy-launch | 6/0/0 | 0 | 00:01:47Z/00:01:47Z |
|
||
| launch-settings | 18/0/0 | 0 | 00:01:55Z/00:01:56Z |
|
||
| proxy-bundle | 6/1/0 | 1 | 00:01:56Z/00:01:56Z |
|
||
| launcher | 35/0/0 | 0 | 00:01:56Z/00:02:27Z |
|
||
|
||
Only failure: `P3 GPT route selects a stack-owned provider instead of pi Codex OAuth`, expected-PENDING error before assertions: proxy GPT API is PENDING build-time evidence. No other failures; missing-route and unknown-route separate-code tests pass; six old launch-settings fixture metadata changes preserve all assertions. All35 launcher tests pass.
|
||
|
||
Sweep after00:02:27Z: only same six pre-existing tool services; no test node/chromium leftovers and no process killed. Lane B free. GPT wire-shape evidence and P1 fetch NOT started; each still needs Sage explicit go/CLEAR. No mutants.
|
||
|
||
## GPT offline attempt1 and static diagnosis — sage-4329/4330
|
||
|
||
One authorized landed-P1 fetchPinned invocation succeeded, exact PIN8.0.42 executable SHA74661f8cf949977870231359e8bf4344e07946766a673c08fa25a3e5f72fc95e, panel1.26.7 SHA8c9c6b7d3fb311e6aad5d06e1993e53a2d28389e640448a1bc6304ed20b057b5. Fresh owned root named in evidence/root.txt, no alternate binary/new fetch. Fetch entry required nice19, end log observed16 due host renice; disclosed before continuing. Static-inspection invocation then failed entry nice guard before any binary read/launch; no turn. Main isolated attempt1 setPriority19 explicitly, but static binary tag scan again observed host renice16; subsequent child starts explicitly set19.
|
||
|
||
Attempt1 unshare-rn showed interfaces[lo], empty private HOME/auth and sanitized env. Proxy booted version8.0.42 commitbc064340, built2026-10-24T14:21:38Z. GET/v1/models response200 with modelIds[], script refused `stand-in routes absent from proxy catalog`; zero GPT-responses/GPT-completions/GLM pi turns ran, so zero compatibility evidence. Cleanup remainingManagedChildren0. No rerun under that CLEAR; reported0018. Raw sanitized receipt evidence/offline.txt preserved.
|
||
|
||
Startup network finding for P7/unit, plain text from isolated proxy log:
|
||
`failed to fetch latest Grok CLI version from npm, keeping fallback/cached version error=npm registry request failed: Get https://registry.npmjs.org/@xai-official/grok/latest: dial tcp [2606:4700::6810:122]:443: connect: network is unreachable`.
|
||
The namespace blocked external egress. Panel auto-update was disabled; this separate Grok version check still attempted startup egress. No real auth or host proxy touched.
|
||
|
||
### Static cause recorded BEFORE attempt2 (sage-4330)
|
||
|
||
No executable/probe invocation for diagnosis. Read the hash-pinned bundled management.html's config reader/serializer and P1 initialConfig in packages/model-proxy/src/settings.mjs. P1 produces nested server/management/access/oauth/observability/routing but adds no upstream provider config. Bundled panel Ip explicitly reads `api-keys.openai-compatibility`; zee reads e['api-keys'][provider]; Fp rejects groups without array group.keys; Np reads group name/base-url/keys/models; xv serializes a group with name,base-url,keys; hv serializes each key as api-key. Therefore the version8 payload is ROOT `api-keys: { openai-compatibility: [{name,base-url,keys:[{api-key}],models:[{name}]}] }`, distinct from the client allowlist under access.api-keys. Source excerpts/character offsets in evidence/bundled-panel-shape.txt; no header/auth values in receipts. This is actual pinned bundled UI reader/writer source, not a guessed provider nesting or an external/unpinned example.
|
||
|
||
Cause of first setup failure: my test used providers.openai-compatibility with api-key-entries, neither the root key nor the group-key field expected by that pinned writer. Initial readiness also stopped at first200 instead of waiting for required models; fixed to30s bound,1s intervals, model count logged per poll. Under sage-4330 one further isolated attempt only: reuse fetched binary and re-hash with P1 verifyInstall before launch; separate attempt2 test roots; actual pi turns each once, retry disabled in pi settings; API constant remains PENDING. Record/restore niceness for own descendants when host policy changes it. No actual turn has yet run as of this pre-attempt note.
|
||
|
||
## Offline attempt2 evidence — sage-4330, API STILL PENDING
|
||
|
||
Static diagnosis above preceded this one extra attempt. No new fetch. P1 verifyInstall recomputed existing executable/panel hashes before use and matched PIN8.0.42/panel1.26.7. unshare-rn verified only lo, empty private HOME/auth, sanitized env. Test config uses bundled writer's root api-keys.openai-compatibility/groups.keys shape. Readiness poll1 not-ready/modelCount0; poll2 status200/modelCount2; proxy lists gpt-fixture and glm-fixture. No setup failure on attempt2.
|
||
|
||
A transparent loopback HTTP tap captures pi's method/path and a whitelist of body shape fields; forwards original body bytes to pinned proxy; no header/auth values recorded. Upstream stand-in receives proxy output. Both remain inside network namespace. Each actual pi invocation once,50s timeout-k10; retry.enabled=false and provider.maxRetries=0 in private pi settings. Proxy has request-retry0. Outer isolation240s timeout-k10; no reruns. All three turn exits0 and marker P332_OFFLINE_OK observed:
|
||
|
||
| Turn | Pi request to proxy through transparent tap | Proxy response | Stand-in upstream observation |
|
||
| --- | --- | --- | --- |
|
||
| GPT responses | POST/v1/responses, modelgpt-fixture,streamtrue,reasoning={effort:low,summary:auto} |200,response.completed event, marker |POST/v1/chat/completions,reasoning_effort=low,max_tokens=16384,streamtrue |
|
||
| GPT completions | POST/v1/chat/completions, modelgpt-fixture,roles[developer,user],reasoning_effort=low,max_completion_tokens=16384 |200,completion stream marker |POST/v1/chat/completions,roles[developer,user],reasoning_effort=low,max_tokens=16384 |
|
||
| GLM completions | POST/v1/chat/completions,modelglm-fixture,thinking={type:enabled,clear_thinking:false},reasoning_effort=low,max_completion_tokens=16384 |200,completion stream marker |POST/v1/chat/completions,same thinking object and reasoning_effort retained,max_tokens=16384 |
|
||
|
||
GLM compatibility finding: thinkingFormat=zai-generated thinking.type=enabled/clear_thinking=false survives proxy translation, as does reasoning_effort=low. zaiToolStream-derived tool_stream was NOT emitted, because this turn disabled tools; its survival is NOT proven. Static pinned pi source node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js:612-618 sets params.tool_stream=true only with active tools and compat.zaiToolStream. No tool-call stream was exercised. This limitation is reported, not silently interpreted as pass or drop.
|
||
|
||
Both GPT shapes pass on the stand-in openai-compatibility credential route. This does not distinguish them for the Codex-login route; no Codex OAuth/auth file exists in this experiment. Evidence is INCONCLUSIVE for the production GPT choice. PROXY_CODEX_API remains null/PENDING; no source or API selection changed. Sage rules or takes to Mos per plan item5; first real Codex-auth turn stays row209 phaseA step7.
|
||
|
||
Niceness: attempt2 entry/emitted turn values19, explicit setPriority at entry/child start and100ms restore over owned descendants. Host policy temporarily changed processes to16 eight times; corrections restored19, disclosed here. Initial fetch end16 and failed inspection guard are retained separately, not represented as clean19 throughout. Full safe request/response receipts in evidence/offline-attempt2.txt; no auth/header value recorded. Process cleanup reports remainingManagedChildren0. Sweep over worktree and owned evidence root found same six pre-existing tool services only, no proxy/pi/timeout/chromium test leftovers. Lane B free. No mutants or other test files run.
|
||
|
||
## API choice and active-tool follow-up — sage-4331
|
||
|
||
Sage's ruling: PROXY_CODEX_API=openai-responses. The evidence does not separate the two shapes: both pass through pinned8.0.42. This is a tie broken on reasoning; it is NOT an evidence-decided pick. Sage's reason: Codex upstream speaks Responses natively and Responses carries pi's reasoning summary field, while completions drops that field; expected fewer translations/lost fields on the real route. This reasoning is a lead decision, not a claim of an authenticated Codex experiment. Row209 phaseA step7 verifies first real Codex turn; change the single constant if it fails there, with no runtime fallback/env switch. Earlier PENDING logs/notes remain historical evidence.
|
||
|
||
Set constant/remove pending refusal; GPT route test asserts openai-responses on mosaic-proxy-codex. Replaced temporary pending-refusal test with generated single-provider/responses/key-reference assertions per ruling. No other production change. Active plug-in docs updated.
|
||
|
||
Evidence script adds glm-tool mode: one GLM turn only, same pinned verified binary and isolated setup, distinct attempt3-tool root, active built-in read tool but stand-in still returns text only. Capture tool_stream and tool names before/after proxy, never header/auth values. No actual tool execution is demanded by stand-in, so this checks wire-field survival, not arbitrary tool-call semantics. Rehash before launch, no fetch,30s catalog readiness with counts,50s timeout-k10 for one turn,own descendants restored nice19. Commit untested before cleared run; then proxy-bundle and proxy-harness each whole once. No other runs/mutants.
|
||
|
||
### sage-4331 single active-tool GLM turn and two-file results
|
||
|
||
Tested ef0939e35. No fetch. P1 verifyInstall rehashed existing binary/panel and matched both PIN hashes before use. One isolated glm-tool run, unshare-rn interfaces[lo],empty private HOME/auth,sanitized env. Readiness poll1 not-ready/count0;poll2 status200/count2. One pi invocation with one active builtin read tool,exit0,markerP332_OFFLINE_OK; no rerun. Outer timeout-k10/140s,inner120s,pi50s;nice19 explicitly at entry/child starts and guard restores observed16→19 three times. No production API chosen by script.
|
||
|
||
Plain request/response evidence (full safe receipt evidence/glm-tool.txt):
|
||
- pi POST/v1/chat/completions modelglm-fixture,streamtrue,tools=[read],tool_stream=true,thinking={type:enabled,clear_thinking:false},reasoning_effort=low,max_completion_tokens=16384.
|
||
- pinned proxy200 completion stream,marker.
|
||
- stand-in receives POST/v1/chat/completions,tools=[read],tool_stream=true and same thinking/reasoning_effort fields;max_tokens=16384. Thus zaiToolStream-derived tool_stream survives this proxy route. No tool invocation or tool-call delta sequence was requested by the stand-in; this proves field survival with active tool, not every tool-call streaming semantic.
|
||
|
||
Then exactly once each whole file, fresh gXXX TMPDIR,nice19,timeout-k10/180s:
|
||
- packages/harness/tests/proxy-bundle.test.mjs00:14:20Z:7pass,0fail,0skip,exit0.
|
||
- packages/plugins/tests/proxy-harness.test.mjs00:14:20Z:5pass,0fail,0skip,exit0.
|
||
|
||
No failures, no extra runs/mutants. Cleanup managed children0. Own-worktree/evidence-root sweep found only same six pre-existing tool services,no proxy/pi/test/timeout/chromium leftovers. Lane B free. P3 now waits for P2/row331 landing before rebase,mutants,Gladstone review and further gates; no landing/merge requested or performed.
|
||
|
||
## Mos1961 joined execution — 2026-10-26, test-first preparation
|
||
|
||
Status-only recovery identified old candidate c7c38a6aa on base9e2689dff; P2/P4 product prerequisite is met at362893d04/52ba14c5f and current authorized base09a847edaa25b609bac7728ff83f224708a29399. Queue331 tracking-only state is not a blocker. New local branch fethry/row332-join1961 preserves all prior branches/packets. Local merge --no-commit of09a847ed into c7c38a6aa; only append-only BUILD-LOG/SESSIONS conflicts, both histories retained. No merge commit yet; tests must verify joined tree first. No push authorized.
|
||
|
||
Mos1961 scope: real P2 modelPreflight context before harness credential preflight, same key through bundle/spawn/bind/stall; preserve655 ownership and653 stall assertions/deadlines; no662,657/658 backlog. P5 owns runtime createUsage~382/tick/close/client/plugin/accounting; no runtime edits needed/planned. Landed runtime.mjs and original653/655 test files remain byte-identical to09a847ed. Sage notified before edits; serial tests held until334 returns slot. Codex only; parent coordinates reviews/fullgate/landing.
|
||
|
||
Mechanical join exposes two bugs to pin first: P3 check consults old injected stand-in rather than actual P2 host.op modelPreflight, so proxy-only launch refuses early; auto-merged bundle has duplicate proxy properties and can overwrite actual P2 context. New proxy-context-join.test.mjs uses existing real managed-launch fixture/runtime/controller with stand-in management HTTP and fake adapter; no management key/token from host. Verifies actual zai and anthropic provider mapping, one successful acquisition, same generation binding/stall identity and runner key, different-agent exclusion, private model references/permissions and disk value absence; unsupported provider refuses distinct code with no fallback/key acquisition/spawn. New pure proxy-routing.test.mjs pins explicit provider identities, strict proxy routes and unchanged nonproxy shape. Tests authored before integration code, not yet run.
|
||
|
||
Owner clarified compatibility mapping inside supplied P2 context: anthropic→anthropic-messages, zai→GLM/openai-completions, no model-name/catalog inference; provider:proxy still explicit route required. Unsupported providers refuse proxy-provider-unsupported before launch; no fallback/upstream escape. No-context behavior retains original routing/env. This preserves existing653/655 business metadata rather than rewriting positive fixtures.
|
||
|
||
### Mos1961 actual joined source/fixture result — 2026-10-26
|
||
|
||
New tests ran RED before source fix: proxy-routing2pass/3fail and proxy-context-join0pass/3fail. Named defects: no identity route mapping/unsupported refusal; actual P2 launches failed no-session-credential before modelPreflight because P3 used its old stand-in seam. Mechanical merge also had duplicate proxy bundle properties. Full RED logs routing-red.txt/context-red.txt preserved.
|
||
|
||
Actual integration changes (no runtime area edit): metadata-only initial check for system.proxy; one real trusted host.op modelPreflight after existing admission/authorization/workspace preparation; same supplied context used in final harness preflight and bundle/spawn; only its hash bound/registered/stall-watched. Real system.proxy ignores injected stand-in option. Existing P2 first-turn marker, modelKeyId and trusted modelStall remain tied to that same admitted generation. Native provider mapping only in supplied context: anthropic→Anthropic and zai→GLM, original provider retained for accounting; proxy still strict explicit route; unsupported proxy-provider-unsupported refused before acquisition/fallback/spawn. No-context model/environment shape unchanged. Pi generation maps supported declared provider identities with same central route resolver. No new public field, policy authority or credential source.
|
||
|
||
Original653 and655 test bodies/assertions/deadlines are byte-identical to09a847ed; preservation-pins.json also proves runtime.mjs,process.mjs,model-keys.mjs unchanged. P5 createUsage~382/tick/close/client/plugin/accounting exact overlap: NONE. No662;657/658 stay backlog. All new actual proxy cases zai,anthropic,explicitproxy routes anthro/GLM/Codex and Claude transient auth pass. They prove one successful actual model preflight, same generation key hash bound and own raw key only in runner env, a second agent's key excluded, private model-file modes/references, no key value in session.json/bundle/history, and no fake upstream credential present in proxy fixture.
|
||
|
||
Unexpected RED1 (preserved managed-first.txt): original653 nonproxy positive lacked own pi credential, brief-mandated preflight refused. Minimal approved helper prerequisite if proxy:false only adds fake own ZAI key fx653-pi. Managed proxy cases receive none; source-credential PRESENCE list is asserted empty in every new proxy positive. Original test file/body/assertions/deadlines untouched. Helper also has a default-pi harness selector only for new real Claude-path control; no preflight stub or production dummy token added. Exact before/after helper diff and SHA pins retained.
|
||
|
||
Unexpected RED2 (whole launcher full log packages_cli_tests_launcher.test.mjs.txt; focused RED logs also retained): real local-CLI-to-stand-in test failed127. First diagnostic polling missed short-lived stderr; a diagnostic-only fs.rmSync pre-cleanup capture retained actual assembled adapter stderr: `/usr/bin/claude: line 4: /opt/claude-code/bin/claude: No such file or directory`. Command/environment PRESENCE only, no values, captured before original cleanup. /usr/bin/claude is a110-byte shell wrapper to existing /opt ELF; existing harness mounts skip extra bind for /usr wrapper, leaving its /opt target absent. This is an executable dependency, NOT missing-key/auth or launcher proxy behavior.
|
||
|
||
Minimal fixture prerequisite correction: test discovery before `which.status===0 ? which.stdout.trim():null`; after `process.env.MOSAIC_CLAUDE_BIN ?? (which.status===0 ? which.stdout.trim():null)`. Test body/assertions/deadlines unchanged. Run explicitly pins SAME existing /opt ELF so existing harness.mounts readonly binds declared executable; no PATH widening/install/arbitrary fallback/general production mount rewrite. Focused genuine reproduction failed before this correction, focused corrected test1/0, then full launcher35/0. Original /usr-wrapper dependency limitation remains disclosed; fixed verified executable required by dedicated runner profile.
|
||
|
||
Executable prerequisite: /opt/claude-code/bin/claude; SHA256 f7dd62ae415378018cd21dd950eb3bac174ab085830304d3b8b098146bfd47b6; local --version with empty private HOME/env: 2.1.259 (Claude Code). No real auth/provider turn. runner-profile.json fixes this executable/hash and retains PATH=/usr/bin:/bin; run-targeted.py verifies hash before launcher run, uses private HOME/MOSAIC_CONFIG/TMPDIR and original bounds, restores nice19 over owned descendants, records all corrections (not claiming no host renice).
|
||
|
||
Latest whole-file results (source-derived targeted list, no package/global gate):
|
||
|
||
| File | pass/fail/skip | exit | Receipt |
|
||
| --- | --- | --- | --- |
|
||
| packages/harness/tests/proxy-routing.test.mjs | 5/0/0 | 0 | join1961/routing-green.txt |
|
||
| packages/cli/tests/proxy-context-join.test.mjs | 7/0/0 | 0 | join1961/context-final.txt |
|
||
| packages/cli/tests/model-managed-launch.test.mjs | 5/0/0 | 0 | join1961/managed-green.txt |
|
||
| packages/bus/tests/model-hire-ownership.test.mjs | 18/0/0 | 0 | join1961/ownership-green.txt |
|
||
| packages/harness/tests/proxy-bundle.test.mjs | 7/0/0 | 0 | join1961/packages_harness_tests_proxy-bundle.test.mjs.txt |
|
||
| packages/plugins/tests/proxy-harness.test.mjs | 5/0/0 | 0 | join1961/packages_plugins_tests_proxy-harness.test.mjs.txt |
|
||
| packages/cli/tests/launcher.test.mjs | 35/0/0 | 0 | join1961/launcher-final-green.txt |
|
||
| packages/seat/tests/proxy-session-env.test.mjs | 2/0/0 | 0 | join1961/packages_seat_tests_proxy-session-env.test.mjs.txt |
|
||
| packages/business/tests/proxy-launch.test.mjs | 6/0/0 | 0 | join1961/packages_business_tests_proxy-launch.test.mjs.txt |
|
||
| packages/business/tests/launch-settings.test.mjs | 18/0/0 | 0 | join1961/packages_business_tests_launch-settings.test.mjs.txt |
|
||
| packages/plugins/tests/harness.test.mjs | 9/0/0 | 0 | join1961/packages_plugins_tests_harness.test.mjs.txt |
|
||
|
||
Total117pass/0fail/0skip across11wholefiles. Original REDs and diagnostic-focused runs remain separate, not hidden reruns or reported as suite passes. Every run fresh shell gXXX TMPDIR/private HOME/config, absolute nice19 with owned-descendant corrections, timeout-k10; no original assertion or deadline relaxed. No real provider/auth turn, no new binary fetch or dependency installation. Owned-root sweep cleanup.json finds0 leftovers. No privileged process stop/borrowed token. Local merge commit follows targeted verification, preserving old packets; no push.
|
||
|
||
Review packet: join1961/inventory.json complete source/test/fixture list; source-vs-current.diff six production-file delta vs09a847ed; fixture-delta.diff and preservation-pins.json; source-pins.json; imports.jsonl/targeted-imports.txt source parsed graphs (loader/fork/spawn edges explicit,case1-accept EXCLUDED); runner-profile.json; results.json and all full logs. Static preservation-inventory command initially named nonexistent model-organization.mjs and stopped without side effects; corrected to actual landed model-keys.mjs. No missing preservation comparison is silently assumed.
|
||
|
||
Parent coordinates334+332 integration, Darkwing's precise independent native-Case1 join base, Codex reviews/fullgate/landing. This branch contains09a847ed+P3 only, not newly returned334. Mutants/full package/globalgate/installation/liveprovider acceptance remain pending. #655 ownership and653 actual caller/stall wholefiles verified at original bounds; unmeasured live behavior remains UNVERIFIED. Slot released for227 after owned cleanup and local commit.
|
||
|
||
Commit integration correction: merge commit from oldc7HEAD refused by queue guard because incoming already-landed09 queue files appeared staged vs oldHEAD. No commit/queue edit/guard bypass occurred. Fixed-path scratch backup command was separately refused before execution by mktemp-guard; corrected to mktemp-created backup recorded in join1961/tested-patch-path.txt. Preserved full tested delta and original branchc7; moved only new localbranch/index onto authorized09a847ed with worktree retained (mixed reset). Verified every tested production SHA unchanged and both queue files byte-identical to09. Commit is ordinary P3-only child of09a847ed,not a merge that recommits queue records. No tests repeated for history/index-only correction.
|
||
|
||
Post-commit history proof: d6dc04e84fac839b7259488162b145b9683f943b is normal child of09a847ed, originalc7packet remains fethry/row332-p1. Compared saved PRE-reset full binary patch against committed09..d6dc package/test/script delta blocks: all identical, including new files. history-correction-pins.json records every block hash; six direct production-file hashes also unchanged. Queue delta0. No no-verify/commit-tree/shared-ref rewrite. Mutants remain NOT RUN: OAuth-env leak(sessionEnv),literal model-file key(pi.bundle),serialized session key(launcher harnessEnv). Latest positive controls117/0/0skip are not mutant kills/full acceptance. Return these exact pending checks to parent so slot227 is not delayed. Fullgate/reviews/installation/liveprovider acceptance remain pending.
|
||
|
||
## Named mutants completed — 2026-10-26, product bytes unchanged
|
||
|
||
Source productd6dc04e84 and docs569765f6 preserved; parent c91bd3787 journal repair is outside this worktree and does not alter these source bytes. Fresh independent review remains parent-owned. M1/M2 were tiny serial pure-unit runs while227 held heavy slot: in-process environment/file generation only, no namespace/native model/launcher child. M3 ran only after227 SLOTBACK under explicit heavy-slot go. Direct SLOTBACK sent to Steelbeak7f079f4a-114d-4be6-b352-f598f786596b and copied Sage after restoration/cleanup, before his rerun.
|
||
|
||
Native helper join1961/mutations/run.py records exact one-match source anchors and initial/mutant/restored SHA, refuses dirty/mismatched pinned source, restores original bytes in finally, then runs restored whole-file positive control. M3 requires explicit --heavy-slot. Every phase fresh shell-mktemp gXXX TMPDIR/private HOME/config,nice19 owned-descendant restoration,timeout-k10/original whole-file bounds (180s pure,300s context; original30s test deadlines unchanged). Existing nativeELF prerequisite hash reverified before M3; these actual context controls use fake adapters, so no extra realCLI/auth/provider invocation. No public/runtime ready flag or sourcecandidate commit changed. Fake values redacted from mutation output.
|
||
|
||
| Mutant | Whole file | Baseline p/f/s | Mutant p/f/s;exit | Restored p/f/s;exit | byte identity |
|
||
| --- | --- | --- | --- | --- | --- |
|
||
| M1: proxy mode still passes CLAUDE_CODE_OAUTH_TOKEN | packages/seat/tests/proxy-session-env.test.mjs | 2/0/0 | 1/1/0;1 | 2/0/0;0 | True |
|
||
| M2: models.json gets literal key instead of environment reference | packages/harness/tests/proxy-bundle.test.mjs | 7/0/0 | 5/2/0;1 | 7/0/0;0 | True |
|
||
| M3: proxy key serialized into session.json | packages/cli/tests/proxy-context-join.test.mjs | 7/0/0 | 1/6/0;1 | 7/0/0;0 | True |
|
||
|
||
M1 narrows filter bug to passing only Claude OAuth; proxy-removal assertion catches it while nonproxy control still passes. M2 mutates only final models.json write to replace environment reference with own fake key (after original in-memory safety check), so actual on-disk literal-key defect is exercised; single-Codex-provider reference and privacy assertions kill it. M3 changes actual serialized harnessEnv to bundle.env; six managed native/explicit-route/Claude privacy assertions fail on credential value in session.json, while unsupported-provider refusal control still passes. These are genuine assertion REDs, not syntax/fixture/timeouts;0cancelled/0skips every phase. All6 production hashes match original pinned candidate after each restore. No assertion/deadline weakened.
|
||
|
||
All3 named mutants now KILLED; prior pending notes remain historical. Receipts include each baseline/full mutant/full restored log and source-anchor/SHA details; cleanup.json verifies0remaining owned-root processes. Product-source git diff vsd6 is empty. Restored positive controls2/2,7/7,7/7. No further fullgate/global/package runs, shareddragon fallback,secret read,borrowed token,dependency install or realprovider/authturn. No push. Three kills plus117 targeted tests do NOT claim full acceptance; independent review/fullgate/installation/live behavior remain pending/UNVERIFIED.
|
||
|
||
## R2, the pi credential preflight and the whole cli suite, 2026-11-02
|
||
|
||
Row 332 R2, #1830. Written by Claude Opus 5.5 as the implementation child of the Mosaic Stack lead (T3 c5c1e8ba),
|
||
on the lead's brief /mnt/storage/scratch/mosaic-lead/briefs/row332-r2-fix.md. Checkout
|
||
/home/jwoltje/.t3/worktrees/mosaic-stack/t3-dd0db440, branch `t3/row332-r2-fix`, fast-forwarded from 09a847eda to
|
||
eabeb1aa8 before any change. Earlier sections are unchanged. Times are UTC. Each file or suite ran alone with
|
||
`timeout 1800`, absolute nice 19 and TMPDIR from `mktemp -d /mnt/storage/scratch/tmp/XXXXXX` (31 bytes). The nice
|
||
column is what the run read at start; ananicy reniced one RED run to -4, recorded as seen.
|
||
|
||
### Correction to R1's evidence
|
||
|
||
R1's evidence ran touched files only, not the whole cli suite. The 117/0/0 table under "Mos1961 actual joined
|
||
source/fixture result" is 11 whole files, and the named mutants above ran one file each. None of the 13 files that
|
||
later failed was among them. The lead's landing gate ran pkg-cli whole and got 1044 pass, 53 fail
|
||
(/mnt/storage/scratch/b2gate/out-r2/pkg-cli.log). R1 did list full package runs as pending; the review approved on
|
||
the touched files.
|
||
|
||
### Cause
|
||
|
||
The brief named two causes. They explain all 53 failures, and I found no third.
|
||
|
||
1. P3's pi preflight (packages/plugins/harness/pi/index.mjs:39-46) refuses `no-session-credential` unless the
|
||
launch has a session proxy key or one of ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY or ZAI_API_KEY.
|
||
Twelve cli files copy the shell's environment, delete only the SESSION_CREDENTIALS names
|
||
(packages/seat/src/session.mjs:253) or nothing at all, and launch pi. This host's shell exports
|
||
ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL and none of pi's four names (checked by name only), so every pi
|
||
launch refused. That is 52 failures. Most carry `no-session-credential` in the log. The rest, in
|
||
compactions-launch, session-clear, idle-stop-race and revoke-window, fail with "timed out waiting", "no RESULT"
|
||
or an empty state list, because the session they wait on never started. On a host that exports
|
||
OPENAI_API_KEY the same tests pass on a real key, so the suite's result depended on the host.
|
||
2. packages/cli/tests/stack-copy.test.mjs:51 calls `bundle()` with no argument on every harness. P3 made pi's
|
||
bundle destructure its argument with no default, so it threw "Cannot destructure property 'dir' of
|
||
'undefined'". That is 1 failure.
|
||
|
||
The proof is the hermetic run below. With only the test change for cause 1 and no product change, the 12 files ran
|
||
87 tests with 0 failures. With the product change for cause 2, stack-copy passes 19/19.
|
||
|
||
### Item 1, the refusal stays
|
||
|
||
No change to the preflight. pi's own credential is still exactly those four names or a proxy key, the preflight
|
||
still runs outside proxy mode, and no existing assertion was weakened. The one changed assertion is stronger
|
||
(item 2).
|
||
|
||
### Item 2, hermetic cli tests
|
||
|
||
packages/cli/tests/helpers.mjs gains three exports.
|
||
|
||
- `HOST_CREDENTIALS`, the SESSION_CREDENTIALS names plus OPENAI_API_KEY, OPENROUTER_API_KEY and ZAI_API_KEY. It is
|
||
built from the seat's list, so a new session login name lands in it too.
|
||
- `FAKE_PI_KEY = "fx332-fake-pi"`.
|
||
- `withoutHostCredentials(env, { piKey })`, which deletes every HOST_CREDENTIALS name and, for a pi launch, sets
|
||
ZAI_API_KEY to the fake key.
|
||
|
||
How each file changed and how its env assertions keep their meaning:
|
||
|
||
- session-launch, idle-stop-race, revoke-window, compactions-launch, session-clear, thread-launch, lifecycle and
|
||
thread-revoke. `for (const k of SESSION_CREDENTIALS.flat()) delete f.env[k];` became
|
||
`withoutHostCredentials(f.env, { piKey: true });`. All eight launch pi only and assert nothing about which
|
||
credential variables the session env holds. The only change is that the host no longer decides the outcome.
|
||
- launch-limit-checks and launch-limits. The call is added after `fixture()`. These files deleted nothing before,
|
||
so they ran on the host's whole environment.
|
||
- launch-routes. The call is added in setup before `Object.assign(f.env, more)`. The metered-route test (line 78)
|
||
still sets the session login names through `more`, which runs after the delete. The fake key is ZAI_API_KEY,
|
||
which is no session login, so the account checks that test asserts on see only what it set.
|
||
- launch-account. setup calls `withoutHostCredentials(f.env, { piKey: harness === 'pi' })` before it sets `set`.
|
||
"REQ-LIMIT-2 a pi launch carries account null and skips both account checks" still checks that no session login,
|
||
and two at once, both reach mayLaunch with account null. Its comment now says pi runs on the fake key, which is
|
||
no session login. The account checks read only SESSION_CREDENTIALS names, so ZAI_API_KEY can't change them.
|
||
- launcher.test.mjs. prepare() replaces its delete loop and its inline `ZAI_API_KEY = "fx332-pi"` with the helper.
|
||
"a pi launch with no own credential refuses no-session-credential" asserted that the SESSION_CREDENTIALS names
|
||
were absent. It meant "this env holds no credential pi could use", and the old list missed three of pi's names.
|
||
It now asserts every HOST_CREDENTIALS name is absent, which holds on any host.
|
||
|
||
Host-dependence check, 21:06:35-21:06:36, nice 19, with a made-up `OPENAI_API_KEY=fx332-host-openai` in the shell
|
||
and `--test-name-pattern="a pi launch with no own credential"`. The eabeb1aa8 copy of launcher.test.mjs, run as a
|
||
temporary file and removed after, fails 0/1 with "Missing expected rejection". The changed file passes 1/0.
|
||
|
||
Other package suites. The bus launcher tests (model-historical-ipc, model-historical-cleanup, model-restart,
|
||
model-review-fixtures, model-hire-ownership-fixture) build the launch env from an empty object, and the plugins
|
||
tests pass an explicit env, so neither reads host credentials. The other copies of process.env in package tests
|
||
feed git or CLI subprocesses, not launches. Nothing outside cli needed the change.
|
||
|
||
### Item 3, pi bundle default
|
||
|
||
pi/index.mjs:70 is now `bundle({ dir, models, proxy = null } = {})`. With no argument it returns
|
||
`{ files: {}, digests: [], sources: { piExtension, ...UNSLOP } }`, the value 09a847eda's `bundle = () => (...)`
|
||
returned. The proxy path is unchanged. Test: packages/plugins/tests/proxy-harness.test.mjs "row 332 R2 pi bundle()
|
||
with no argument returns the non-proxy bundle it returned before P3". stack-copy.test.mjs covers it as well.
|
||
|
||
### Item 4, review F2
|
||
|
||
pi.bundle now skips a launch.models entry when proxyRouteFor throws `proxy-provider-unsupported`. Any other route
|
||
error, `proxy-route-missing` or `proxy-route-unknown`, still throws, so a malformed proxy entry still fails closed.
|
||
sessionModel routes the session's own selection before the bundle runs, so the selected entry can't be skipped
|
||
without a refusal.
|
||
|
||
I chose to skip unroutable entries rather than write only the selected primary and fallback, because the
|
||
amendment's tests need more than the selection. "P3 models file is private..." and "P3 every launch
|
||
regenerates..." in packages/harness/tests/proxy-bundle.test.mjs select `a` from declared `{a, z}` and expect both
|
||
the anthropic and mosaic-proxy-glm providers in models.json. Writing only the selection breaks them.
|
||
|
||
Tests:
|
||
|
||
- packages/harness/tests/proxy-bundle.test.mjs "row 332 R2 an unroutable model table entry is left out of
|
||
models.json and the launch goes on". The review's table (opus on anthropic, glm on zai, router on openrouter with
|
||
model x), selecting opus. Expects providers anthropic and mosaic-proxy-glm, no model x and PI_MODEL
|
||
claude-fixture. An added `{provider: 'proxy'}` entry with no route still throws `proxy-route-missing`.
|
||
- packages/cli/tests/proxy-context-join.test.mjs "row 332 R2 joined pi launch goes live when launch.models also
|
||
holds an unroutable entry, which models.json leaves out". The review's failure scenario on the joined launcher
|
||
with P2 admission. The session goes live with one successful preflight and one run directory, models.json has
|
||
claude-opus-5-5 and no x, and the private-artifact check finds no key.
|
||
|
||
### Item 5, review F3
|
||
|
||
The launcher branches at packages/cli/src/launcher.mjs:435-439 are unchanged. packages/cli/tests/launch-account.test.mjs
|
||
setup() gains `proxy` (the launcher's static proxy context) and `edit` options, and the new tests add a model
|
||
`proxy-sonnet` with provider proxy and route anthropic. One test per branch:
|
||
|
||
- "row 332 R2 a proxy session refuses account-credential-missing when launch.account names a host login, not proxy".
|
||
- "row 332 R2 launch.account credential proxy with no proxy session refuses account-credential-missing".
|
||
- "row 332 R2 account-is-credential: launch.account.name is the session proxy key; another name passes the account
|
||
checks". A positive control with the name jason-max reaches mayLaunch with account jason-max.
|
||
|
||
Each checks the refusal code and why, that the launch log holds no value or key, and that mayLaunch was not called.
|
||
|
||
The BundleError at packages/harness/src/bundle.mjs:332 now has the code `invalid-proxy-context`. Test:
|
||
proxy-bundle.test.mjs "row 332 R2 a session proxy context without a key or loopback URL refuses
|
||
invalid-proxy-context", with an empty key, a localhost URL and a missing key. The code has no `proxy-` prefix on
|
||
purpose. The launcher catch at launcher.mjs:686 turns only `proxy-*` codes into a Refusal with that code and
|
||
reports everything else as launch-failed, so this error still ends as launch-failed, as it did under the old
|
||
default code `bundle-refused`. No code or test at eabeb1aa8 named this error by message or code. The comment at
|
||
bundle.mjs:50 still describes the default for other errors and is unchanged.
|
||
|
||
### Item 6, open follow-ups, unchanged in R2
|
||
|
||
- F1, medium. packages/cli/src/launcher.mjs:401-402, together with 524-545. In proxy mode the first check()
|
||
returns early, so the capacity, limit, sandbox and mayLaunch refusals run only after ensureCheckouts and P2
|
||
modelPreflight. It fails closed but wastes a key issuance, git work and an authorization record.
|
||
- F4, info. packages/cli/src/launcher.mjs:224 and 403-411. The createLauncher static `proxy` option bypasses P2
|
||
admission. Production passes none. The new launch-account tests use this option for their proxy context, as
|
||
launcher.test.mjs:152 does, so a later rename or removal touches them too.
|
||
- F2 docs. packages/plugins/README.md describes pi's models.json and could say that unroutable entries are left
|
||
out. The brief asked me to avoid that file, so it is unedited.
|
||
|
||
### RED on eabeb1aa8, the 13 failing cli files, before any change
|
||
|
||
| File | Tests | Pass | Fail | Time | Nice |
|
||
| --- | --- | --- | --- | --- | --- |
|
||
| lifecycle | 24 | 13 | 11 | 20:50:30-20:50:38 | 19 |
|
||
| thread-launch | 15 | 3 | 12 | 20:50:38-20:53:10 | -4 |
|
||
| session-launch | 8 | 0 | 8 | 20:53:10-20:54:12 | 19 |
|
||
| compactions-launch | 5 | 0 | 5 | 20:54:12-20:55:56 | 19 |
|
||
| session-clear | 5 | 0 | 5 | 20:55:56-20:57:47 | 19 |
|
||
| launch-limit-checks | 5 | 2 | 3 | 20:57:47-20:57:47 | 19 |
|
||
| launch-routes | 9 | 6 | 3 | 20:57:47-20:57:47 | 19 |
|
||
| idle-stop-race | 1 | 0 | 1 | 20:57:47-20:58:07 | 19 |
|
||
| launch-account | 7 | 6 | 1 | 20:58:07-20:58:08 | 19 |
|
||
| launch-limits | 1 | 0 | 1 | 20:58:08-20:58:08 | 19 |
|
||
| revoke-window | 1 | 0 | 1 | 20:58:08-20:58:28 | 19 |
|
||
| stack-copy | 19 | 18 | 1 | 20:58:28-20:58:46 | 19 |
|
||
| thread-revoke | 3 | 2 | 1 | 20:58:46-20:59:07 | 19 |
|
||
|
||
53 failures, the gate's count, file for file. 0 skipped, 0 cancelled.
|
||
|
||
### Hermetic test change only, no product change
|
||
|
||
| File | Tests | Pass | Fail | Time |
|
||
| --- | --- | --- | --- | --- |
|
||
| lifecycle | 24 | 24 | 0 | 21:03:23-21:03:36 |
|
||
| thread-launch | 15 | 15 | 0 | 21:03:36-21:03:55 |
|
||
| session-launch | 8 | 8 | 0 | 21:03:55-21:04:09 |
|
||
| compactions-launch | 5 | 5 | 0 | 21:04:09-21:04:35 |
|
||
| session-clear | 5 | 5 | 0 | 21:04:35-21:04:47 |
|
||
| launch-limit-checks | 5 | 5 | 0 | 21:04:47-21:04:47 |
|
||
| launch-routes | 9 | 9 | 0 | 21:04:47-21:04:47 |
|
||
| idle-stop-race | 1 | 1 | 0 | 21:04:47-21:04:49 |
|
||
| launch-account | 10 | 10 | 0 | 21:04:49-21:04:49 |
|
||
| launch-limits | 1 | 1 | 0 | 21:04:49-21:04:49 |
|
||
| revoke-window | 1 | 1 | 0 | 21:04:49-21:04:50 |
|
||
| thread-revoke | 3 | 3 | 0 | 21:04:50-21:04:51 |
|
||
|
||
87 tests, 0 fail, all nice 19. launch-account counts the three F3 tests, which need no product change.
|
||
|
||
### New tests fail without their product fix
|
||
|
||
Run with the new tests in place and pi/index.mjs and bundle.mjs still at eabeb1aa8, then again after the fix.
|
||
|
||
| File | Without fix p/f | Time | With fix p/f | Time | What failed |
|
||
| --- | --- | --- | --- | --- | --- |
|
||
| harness proxy-bundle | 7/2 | 21:05:03-21:05:04 | 9/0 | 21:05:55 | F2 test throws proxy-provider-unsupported; invalid-context test gets bundle-refused |
|
||
| plugins proxy-harness | 5/1 | 21:05:04 | 6/0 | 21:05:55 | TypeError, cannot destructure 'dir' |
|
||
| cli proxy-context-join | 7/1 | 21:05:04-21:05:11 | 8/0 | 21:05:55-21:06:04 | launch refused proxy-provider-unsupported after admission |
|
||
| cli stack-copy | 18/1 | 21:05:11-21:05:28 | 19/0 | 21:06:04-21:06:22 | TypeError, cannot destructure 'dir' |
|
||
|
||
The F3 launcher tests and the changed launcher.test.mjs assertion fail without their fix as shown by the mutants
|
||
and the host-dependence check.
|
||
|
||
### GREEN, every package suite but queue, whole
|
||
|
||
`node --test tests/*.test.mjs` from each package, one at a time, on the final bytes.
|
||
|
||
| Package | Tests | Pass | Fail | Skip | Time | Seconds |
|
||
| --- | --- | --- | --- | --- | --- | --- |
|
||
| business | 289 | 289 | 0 | 0 | 21:07:03-21:07:06 | 3 |
|
||
| control-board | 130 | 130 | 0 | 0 | 21:07:06-21:07:06 | 0 |
|
||
| conversation | 187 | 187 | 0 | 0 | 21:07:06-21:07:42 | 36 |
|
||
| discord | 200 | 200 | 0 | 0 | 21:07:42-21:07:45 | 3 |
|
||
| harness | 205 | 205 | 0 | 0 | 21:07:45-21:07:57 | 12 |
|
||
| ledger | 89 | 89 | 0 | 0 | 21:07:57-21:08:11 | 14 |
|
||
| library | 168 | 168 | 0 | 0 | 21:08:11-21:08:17 | 6 |
|
||
| model-proxy | 100 | 100 | 0 | 0 | 21:08:17-21:08:19 | 2 |
|
||
| mosaic | 69 | 69 | 0 | 0 | 21:08:19-21:08:21 | 2 |
|
||
| plugins | 126 | 126 | 0 | 0 | 21:08:21-21:08:21 | 0 |
|
||
| processing-control | 62 | 62 | 0 | 0 | 21:08:21-21:08:22 | 1 |
|
||
| project | 41 | 41 | 0 | 0 | 21:08:22-21:08:24 | 2 |
|
||
| runs | 43 | 43 | 0 | 0 | 21:08:24-21:08:24 | 0 |
|
||
| seat | 223 | 223 | 0 | 0 | 21:08:25-21:08:31 | 6 |
|
||
| supervisor | 45 | 45 | 0 | 0 | 21:08:31-21:08:31 | 0 |
|
||
| tasks | 100 | 100 | 0 | 0 | 21:08:31-21:08:33 | 2 |
|
||
| webui | 490 | 490 | 0 | 0 | 21:08:33-21:10:13 | 100 |
|
||
| bus | 1349 | 1349 | 0 | 0 | 21:10:13-21:11:01 | 48 |
|
||
| cli | 1057 | 1056 | 0 | 1 | 21:11:01-21:21:37 | 636 |
|
||
| harness, rerun | 205 | 205 | 0 | 0 | 21:21:55-21:22:08 | 13 |
|
||
|
||
19 suites, 4973 tests, 4972 pass, 0 fail, 1 skipped, 0 cancelled, every run nice 19. The skip is "FED R7
|
||
scratch two-instance acceptance", which skips by design (it runs from scripts/test-federation-acceptance.sh) and
|
||
was skipped at the lead's gate too. The bus flake at model-final-completion.test.mjs:69 did not occur, so there was
|
||
nothing to rerun.
|
||
|
||
The first 19 runs used the working tree before commit. After the harness run I removed one blank line at the end
|
||
of proxy-bundle.test.mjs that `git diff --check` flagged, then reran harness whole (last row). No other byte
|
||
changed before the product commit 39eadf8ba, and `git diff --stat HEAD` was empty after it.
|
||
|
||
The gate's batch had 1098 cli tests, because it carried other rows. This branch is 09a847eda plus row 332 plus R2,
|
||
with 1057 cli tests, four of them new in R2.
|
||
|
||
### Mutants
|
||
|
||
Mutants ran on the product commit 39eadf8ba, one at a time. A scratch script made each one an exact one-match
|
||
replace and printed the file's sha256, first 16 hex, before and after. Each killing test ran once, then
|
||
`git checkout -- <file>` and `git status --short`. The commit came first so that the checkout restores committed
|
||
bytes.
|
||
|
||
| Mutant | Change | Killing test | p/f/s; exit | sha16 committed, mutant, restored | Time |
|
||
| --- | --- | --- | --- | --- | --- |
|
||
| pi-preflight-open | pi/index.mjs, `return null;` as the first line of preflight | plugins tests/proxy-harness.test.mjs | 4/2/0; 1 | b37d81c5b552db21, c35c3cdbbcc10ccf, b37d81c5b552db21 | 21:22:22 |
|
||
| | | cli tests/launcher.test.mjs, name pattern "a pi launch with no own credential" | 0/1/0; 1 | | 21:22:22-21:22:23 |
|
||
| bundle-all-entries | pi/index.mjs, the R2 skip replaced by base's `const route = proxyRouteFor(entry);` | harness tests/proxy-bundle.test.mjs | 8/1/0; 1 | b37d81c5b552db21, e901d619074e7729, b37d81c5b552db21 | 21:22:28 |
|
||
| | | cli tests/proxy-context-join.test.mjs | 7/1/0; 1 | | 21:22:28-21:22:36 |
|
||
| proxy-account-unchecked | launcher.mjs:438-439, the proxy credential check and its throw, deleted | cli tests/launch-account.test.mjs | 8/2/0; 1 | 1001674131006a7e, 3d52f49ff1a1b8c8, 1001674131006a7e | 21:22:44-21:22:45 |
|
||
| session-proxy-key-unchecked, extra | launcher.mjs:435, the "session proxy key" hold, deleted | cli tests/launch-account.test.mjs | 9/1/0; 1 | 1001674131006a7e, 8cfd4d43e3f189a0, 1001674131006a7e | 21:22:49-21:22:50 |
|
||
| M1, re-run | session.mjs:262 `!(proxy && isProviderVariable(k))` to `!(proxy && isProviderVariable(k) && k !== "CLAUDE_CODE_OAUTH_TOKEN")` | seat tests/proxy-session-env.test.mjs | 1/1/0; 1 | 488e593811adf369, b37acf6ba05ee6e6, 488e593811adf369 | 21:22:52 |
|
||
|
||
5 of 5 killed, each by an assertion. There were no syntax errors, timeouts, skips or cancellations. After every
|
||
restore, `git status --short` printed nothing and the restored hash matched the committed one.
|
||
|
||
- pi-preflight-open. "P3 pi refuses no-session-credential with no provider key" and "...with only a Claude OAuth
|
||
token" fail, and the launcher test fails "Missing expected rejection".
|
||
- bundle-all-entries. Both F2 tests fail with "provider is unsupported by the supplied model proxy context" from
|
||
proxyRouteFor at bundle.mjs:86.
|
||
- proxy-account-unchecked. The brief names 437-439. Line 437 is the outer `if` whose `else` holds the host-login
|
||
checks, so deleting it as well breaks the syntax. I deleted 438-439, which removes the refusal and leaves the
|
||
outer `if` with an empty body. Both branch tests get `fixture-policy` where they expect
|
||
`account-credential-missing`.
|
||
- session-proxy-key-unchecked. Not required by the brief. It covers the third F3 branch. The account-is-credential
|
||
test gets `fixture-policy` where it expects `account-is-credential`.
|
||
- M1. "P3 proxy sessionEnv removes every instance provider credential without widening ENV_ALLOW" fails on
|
||
CLAUDE_CODE_OAUTH_TOKEN, as in R1.
|
||
|
||
### Cleanup
|
||
|
||
No test process of mine is left running, checked through the /proc cwd links of my own processes. After this
|
||
commit the node_modules links (`node_modules` and `packages/webui/node_modules`) and the TMPDIR come out, as the
|
||
brief asks. The logs behind these tables lived in that TMPDIR and are not kept. The counts and times here are
|
||
copied from them.
|
||
|
||
## Lead correction after the R2 GPT review (2026-11-02)
|
||
|
||
Written by the lead (T3 c5c1e8ba). The GPT review of 6e9f3d723 asked for changes with two findings. This section
|
||
corrects the R2 text above; the earlier sections stay as written.
|
||
|
||
F1 (P2), fixed by the lead in da1f0ceda. `packages/cli/tests/federation-acceptance.test.mjs:122` built each
|
||
host's env from HOME, PATH, TMPDIR, MOSAIC_CONFIG and NODE_EXTRA_CA_CERTS only. With no pi key there, the R1
|
||
preflight refused the assistant launch with `no-session-credential` and the RESULT wait failed. The cli suite does
|
||
not run this file; `scripts/test-federation-acceptance.sh` does. The fix adds `ZAI_API_KEY: 'fx332-fake-pi'`,
|
||
the same fake value `FAKE_PI_KEY` in helpers.mjs holds. `bash scripts/test-federation-acceptance.sh` on 6e9f3d723:
|
||
rc 1, 21:42:03Z to 21:42:26Z, "start refused: no-session-credential". With the fix: rc 0, 21:42:34Z to
|
||
21:42:39Z, pass 1, fail 0. Every `scripts/test-*.sh` then ran on the fixed tree, all rc 0: auth 15/0, conductor
|
||
17/0, config 55/0, discord 82/0, extension-package 18/0, federation 1/0, foundation 44/0, land-work 86/0,
|
||
push-check rc 0, queue 156/0 and 28/0, release 15/0, task 92/0. test-task skips the live provider cases (row 244)
|
||
as the batch 2b gate did; its count is 3 lower than that gate because ee151685e (#156) added cases after base
|
||
09a847eda.
|
||
|
||
F2 (P3), a wrong citation in the R2 text above. It says the launcher catch at `launcher.mjs:686` turns the new
|
||
`invalid-proxy-context` BundleError into launch-failed. That catch never sees it. `buildBundle` runs at
|
||
`launcher.mjs:569`, before the `try` at `:655` that holds the `:686` line. The error leaves `start()` as a plain
|
||
BundleError. `fromSession` maps any non-Refusal to `launch-failed` at `:1199`. `launchPm` rethrows a non-Refusal
|
||
at `:1215`, so a PM launch fails with the BundleError itself, whose code is now `invalid-proxy-context` instead of
|
||
R1's default `bundle-refused`. The only other `proxy-` prefix check, `launcher.mjs:365`, wraps `sessionModel`
|
||
and never sees an error from `buildBundle`. So the prefix choice changes no path today. A session launch ends as
|
||
launch-failed, as in R1. No test asserts what a PM launch reports for this error.
|