Repository navigation
Inject setup's collaborators and pin server selection at the spawn boundary - #922
Conversation
A spawned kcap re-resolves KCAP_URL and KCAP_PROFILE at its own composition root, so containment belongs where the child is built; in-process nothing reads them but the three roots. The assembly-wide reset also blanked the variable SkipUnlessLiveGateReady gates on, leaving the memory-index live certs unable to run at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
With the statics gone the command cannot ignore either one and still compile, which the seams allowed. Moving facade construction out leaves it with no auth transports at all: httpFactory, proxy, workos and github are no longer read. ChosenServerHttp is extracted so the runner and the command share one builder for the server chosen mid-run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR Summary by QodoInject setup collaborators and isolate spawned server selection
AI Description
Diagram
High-Level Assessment
Files changed (16)
|
Code Review by Qodo
1.
|
Dropping the duplicate leaves env and machine unread, so the command no longer takes the profile overrides or the machine credential either — the container build was their only reader. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
NO FINDINGS |
Closes #921 — AI-2737
What & why
Two pieces of the setup lane resolved themselves from process-global state.
SetupCommand.FacadeOverrideandImportRunnerOverridewere mutable statics existing only for tests, so a site that ignored its collaborator still passed; both now arrive injected, and ignoring one is a compile error (CS9113).ProfileOverridesGlobalSetupblankedKCAP_URL/KCAP_PROFILEfor every test assembly to contain an exposure that is entirely at the spawn boundary — a child re-resolves them at its own root — soKcapProcessclears them for the child beside the two directories it already pins, and the guard retires.Where to look
Retiring that guard un-skips nine
*MemoryIndexLiveCertTests: it blanked the variableSkipUnlessLiveGateReadygates on, so they could never run. They stay gated on the live flag, and this PR does not exercise them.Moving façade construction out leaves
SetupCommandwith no auth transports — four constructor parameters went unread and are gone.ChosenServerHttpis extracted so the command and the runner share one builder for the server chosen mid-run.Verification
Every suite with a hostile
KCAP_URL=https://bogus.invalid KCAP_PROFILE=bogus-profileexported — the case the retired guard existed for:Mutations, each reverted: wrong pinned import flag → 2 failures; skip branch inverted → all 10 import tests; provisioner dropped at the factory call → 1; DI registrations removed → both
Every_registered_command_resolves. Solution builds at 0 warnings; AOT publish emits no IL2026/IL3050.SetupCommandTestsgoes from 14 exclusions to 8 — the 6 keyed on the import seam. The other 8 are driven by console capture and a working-directory move, which this does not touch.