Repository navigation
Conversation
Add an in-process harness that runs the plugin inside the real host,
so the routing work that follows can be measured against today's
behaviour rather than against fakes. Additive only: no src/ change.
test/support/host.ts gives two tiers. Tier A is a bare cordis Context
with LlmRuntime and llm-pi-ai mounted with { providers }, for the
config waterfall and pi-ai's credential paths. Tier B is dsh-app-boot's
boot() with a temporary HOME, a test bundle, a fake credentials service
and a launch-environment snapshot, for the config editor,
settings.describe and the volatile commit. Tier B's rows carry package
names through a stub module loader, and it fixes the apply order,
because the loader starts rows in parallel.
On top of it:
- contract tests for the waterfall, the profile and Config shapes,
credentials, and the config editor (host-waterfall, host-shapes,
host-credentials, host-editor-contracts), plus a tier A smoke test;
- a characterization of today's behaviour on pi 1.1.0, each row tagged
where P-R1 is expected to flip it, with S0_TODAY shared by the
binary e2e;
- the keyless 401-vs-404 matrix: a pure classifier, its unit test and
a gated live run;
- a binary e2e gated on DSH_HOST_E2E=1 with its probe bundle, the
e2e-host CI job (a pinned, patched cell on PRs that touch the host
seams or vite.config.ts, and a floating cell nightly and on
dispatch), and the test:e2e:host script.
The binary e2e now reports why a run failed: a timeout only when its
own deadline killed the host, the signal for a crash, and the probe's
fatal message whenever there is one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141fKp5k6hiaJcP5ovhGtSD
|
The fix is the nightly scheduled run on Generated by Claude Code |
The review ran three rounds through the correctness, rules and matrix lenses. What it found, and what changed: - The binary e2e's beforeAll budget was smaller than the blocking subprocess deadlines it serializes. Each plugin install now has its own deadline, the hook's budget is derived from the installs and the boot, and afterAll stops a host a failed hook left running. - providerWithApiKey claimed to be a line-for-line restatement but skipped upstream's credentialRef(ref) check. It now throws the same TypeError for a ref outside the grammar (a host-editor-contracts case pins it), and its comment names the deliberate differences. - The pinned e2e-host cell let cordis and the loader float at patch level. The overrides now force both, the cache key includes them, and the job asserts them against HOST_VERSIONS. - The pi-ai-first characterization asserted every facet under one KNOWN_DEFECT title. Each apply order now generates one test per row and facet, titled with that order's own tags. - CONTRIBUTING said the contract tests pin F11-F20, and the plan said P-T1 pins every fact. Both now give the same accounting: which facts are pinned by number, which P-R1 exercises first, and why F9 and F17 are not pinned. - CONTRIBUTING put the e2e's dummy keys in the profile's credentials file; they are in the temporary home's credentials document. - F5 had no real-host pin: host-shapes now pins that a route-level api and baseURL collapse pi's protocols onto one. F6 is recorded as first exercised by P-R1. - The credential-mapping row pinned only the api-key branch of toPiCredential. host-credentials now covers all three branches, and the env branch is asserted through pi's Models.getAuth, so the case fails without it. - The plan's reason for restating hasProviderApiKey was inaccurate; it now says no installed copy reaches the function. - The new credential cases cited toPiCredential at the wrong lines; they now cite auth.ts:74-84. - F4's listing and dispatch halves were pinned only by KNOWN_DEFECT rows P-R1 flips. A plugin-less tier-A case in host-shapes now pins that an id pi cannot place is not listed and that a turn on it is INVALID_CONFIG with no request; the save and deferred-read halves are tagged F4 too. - The one facet that depends on the apply order lost its tag when the pi-ai-first block was split. The fixture case now checks only structure (the facets whose value moves are the facets whose tag moves), and the exact pin is its own KNOWN_DEFECT case that boots no host. CONTRIBUTING and the plan say P-R1 drops todayRowsFor's override and turns that case into a BASELINE check in the same diff. Nothing under src/ changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141fKp5k6hiaJcP5ovhGtSD
|
This phase's first reviews ran on the general reviewer because the dedicated reviewer was unavailable. It has now had the dedicated review. Rounds (by lens: correctness, rules, matrix)
All upheld findings were low severity. Fixed
Declined No upheld finding was declined. The other findings (4 in round 1, 1 in round 2) did not survive verification, so they were left alone. Nothing under Commit: 409b5e1 Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141fKp5k6hiaJcP5ovhGtSD
The vendor renamed the Go plane's Gemini model from gemini-4-argon-contributor to gemini-4-argon. The tier-B fixtures (S0_PROFILE, S0_TODAY, CHARACTERIZED_PROFILE through S0, and todayRowsFor's pi-ai-first override) declared the old id as the Go gap id: one the plugin's catalog describes and pi 1.1.0 cannot place. After the refresh the catalog no longer described it. They now name the renamed id, which still plays that role because pi 1.1.0's opencode-go table has no gemini-4-argon either. The host-shapes and editor-contract cases follow the same fixture. The pi 1.3.0 note in mount-protocols names that pi's own row, so it stays as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141fKp5k6hiaJcP5ovhGtSD
Phase P-T1b of docs/improvement-plan.md, stacked on #109.
An in-process harness that runs the plugin inside the real host, so the routing phases that follow (P-H, P-R1, P-R2) are measured against today's behaviour rather than against fakes. Additive only: no
src/change.What changed
test/support/host.tsContextwithLlmRuntimeanddsh-llm-pi-aimounted with{ providers }, for theinternal/configwaterfall and pi-ai's credential paths.test/support/host.tsboot()with a temporary HOME, a test bundle (llm,llm-pi-ai,editor: ConfigEditor,settings: Settings, the plugin), a fake credentials service and a launch-environment snapshot. Rows carry package names through a stub module loader, because the plugin finds pi-ai byoptions.name. The apply order is fixed (plugin-first, as the binary does it, orpi-ai-first), because the loader starts rows in parallel. It also rebuildshasProviderApiKeyasproviderWithApiKey.test/host-waterfall.test.ts,test/host-shapes.test.ts,test/host-credentials.test.ts,test/host-editor-contracts.test.tsprependputs it outermost,raw === _configholds for_reload/update/_commitVolatilebut not for the editor candidate (F14), and a deep-frozen input is never mutated while the fiber keeps the return value (F12). Shapes: the profile shape, theConfigdefaults snapshot,recordKeyFor, no secret-role nodes, the loader's interpolation and pi's public exports. Credentials. Editor:configEditor.editwritesrawbeside the YAML,_commitVolatilere-resolves through a prepended listener, andsettings.describeandhasProviderApiKeyget baselines.test/host-harness.test.tslistProviders()equals pi-ai's keys (F11), and each builder option is exercised once.test/host-characterization.test.tsKNOWN_DEFECTorINTENDED_CHANGEwhere P-R1 is expected to flip it.S0_TODAYis shared with the binary e2e.test/support/keyless-matrix.ts,test/keyless-matrix.test.ts,test/e2e/keyless-matrix.e2e.tstest/e2e/host-binary.e2e.ts,test/e2e/host/DSH_HOST_E2E=1and readingDSH_HOST_PREFIX..github/workflows/ci.yml,package.jsone2e-hostjob. Cell a: pi 1.1.0, pinned and patched, on PRs that touch the host seams,cordis.patch.ymlorvite.config.ts. Cell b: whatever npm installs, nightly and on dispatch. Adds thetest:e2e:hostscript.AGENTS.md,CONTRIBUTING.md,docs/improvement-plan.md,test/support/src.ts,vite.config.tsin review), the test door, and the e2e config base.Behaviour changes
src/changes.e2e-hostjob also runs on pull requests that touchvite.config.ts. That file holds the pack config forlib/index.mjsand the test settings that the e2e config inherits.dshinstall helper reports spawn errors and signals instead of "exited null".Review
Three lenses (correctness, tests, repo rules), three rounds. No reviewer was missing in any round.
Each round's upheld findings were fixed before the next round ran. Round 3's four findings are fixed in this commit:
endpoint: legacywording is narrowed. Go's Google traffic stays on the modern cell under every family.whyRunFailedseparates timeouts, signal deaths and fatal probe results.vite.config.tsis added to the e2e-host scope.hasProviderApiKey.Verification
pnpm run checkvp test runvp test run --config vitest.mock.config.tspnpm run buildscripts/check.tsvp test run --coveragesk-hit is the fixturesk-ambient-go-not-a-key. A canary file gave the expected hits, so the scan did read its input.The first five rows were run again right before the commit. The rest come from the implementation run on the same tree.
Note: the
catalog freshnesscheck fails on every branch until the vendor-catalog refresh lands onmain. That failure is unrelated to this PR.Generated by Claude Code