fleetd #589 (Groups 1 & 2): pin 6 main() wiring sites with named factories #599

Merged
ltms merged 1 commits from worker/589-f64303-2 into main 2026-09-19 10:39:48 +02:00
Member

Closes the Group 1 (exhaustion/quarantine) and Group 2 (CB-596 credential policy) portion of fleetd #589, strictly within Fleetd.main()'s :214-:468 range (Group 3 at line 500+ is handled by a concurrent worker, worker/589-fcd2aa-1, on a separate branch).

What changed

Extracted 6 previously-inline wiring expressions in main() into named, package-private static factories on Fleetd, following the FleetdLoopHealthSourceWiringTest (#584) shape, each with a new behavioral wiring test:

Group 1

  • forwardingExhaustionSink (was inline ExhaustionSink.forwardingTo(exhaustionSinkRef::get) at :221)
  • publishExhaustionSink (was two untested statements at :468 building the sink and .set()-ing it)
  • liveExhaustedPatterns (was inline new LiveExhaustedPatterns(...) at :411)
  • exhaustedPatternLookup (was an inline lambda at :412-416; losing this wiring is the worst-case regression in the ticket - a real usage-limit refusal would stop being classified as BACKEND_EXHAUSTED and would be handed back as real completed work)

Group 2

  • claudeCodeLauncher (was inline new ClaudeCodeLauncher(...) at :230, whose memberCredentials supplier argument is the CB-596 credential-shadowing policy)
  • openCodeLauncher (was inline new OpenCodeLauncher(...) at :237, same memberCredentials argument)

Verification

For each of the 6 sites: applied the named inert mutation, confirmed the new test failed BY NAME (named AssertionFailedError, not a crowd failure), restored, confirmed GREEN again; then separately applied a behavior-preserving rewrite (reformatted the call across lines and extracted the wired argument into a local variable) and confirmed the test stayed GREEN, ruling out a disguised source-text test. No Files.readString/source.contains assertions anywhere.

Full suite: 1789 -> 1799 tests (+10, matching the 10 new tests added), 0 failures, 0 errors. mvn -o clean install: BUILD SUCCESS (verified with unpiped, captured exit status per the ticket's mid-task correction comment).

No other files touched; .mcp.json, opencode.json, .autoenv, fleetd.yaml, and wiki/ were not touched.

Closes the Group 1 (exhaustion/quarantine) and Group 2 (CB-596 credential policy) portion of fleetd #589, strictly within Fleetd.main()'s :214-:468 range (Group 3 at line 500+ is handled by a concurrent worker, worker/589-fcd2aa-1, on a separate branch). ## What changed Extracted 6 previously-inline wiring expressions in main() into named, package-private static factories on Fleetd, following the FleetdLoopHealthSourceWiringTest (#584) shape, each with a new behavioral wiring test: **Group 1** - `forwardingExhaustionSink` (was inline `ExhaustionSink.forwardingTo(exhaustionSinkRef::get)` at :221) - `publishExhaustionSink` (was two untested statements at :468 building the sink and `.set()`-ing it) - `liveExhaustedPatterns` (was inline `new LiveExhaustedPatterns(...)` at :411) - `exhaustedPatternLookup` (was an inline lambda at :412-416; losing this wiring is the worst-case regression in the ticket - a real usage-limit refusal would stop being classified as BACKEND_EXHAUSTED and would be handed back as real completed work) **Group 2** - `claudeCodeLauncher` (was inline `new ClaudeCodeLauncher(...)` at :230, whose memberCredentials supplier argument is the CB-596 credential-shadowing policy) - `openCodeLauncher` (was inline `new OpenCodeLauncher(...)` at :237, same memberCredentials argument) ## Verification For each of the 6 sites: applied the named inert mutation, confirmed the new test failed BY NAME (named AssertionFailedError, not a crowd failure), restored, confirmed GREEN again; then separately applied a behavior-preserving rewrite (reformatted the call across lines and extracted the wired argument into a local variable) and confirmed the test stayed GREEN, ruling out a disguised source-text test. No `Files.readString`/`source.contains` assertions anywhere. Full suite: 1789 -> 1799 tests (+10, matching the 10 new tests added), 0 failures, 0 errors. `mvn -o clean install`: BUILD SUCCESS (verified with unpiped, captured exit status per the ticket's mid-task correction comment). No other files touched; `.mcp.json`, `opencode.json`, `.autoenv`, `fleetd.yaml`, and `wiki/` were not touched.
agent added 1 commit 2026-09-19 10:35:58 +02:00
fleetd #589 (Groups 1 & 2): pin 6 main() wiring sites with named factories
CI / shell-tests (pull_request) Successful in 9s
CI / contract (pull_request) Successful in 54s
CI / build (pull_request) Successful in 1m52s
ae7845c375
Extracts 6 inline wiring expressions from Fleetd.main() into named,
directly-testable package-private static factories, following the
FleetdLoopHealthSourceWiringTest (#584) shape, and adds one wiring test
per factory:

Group 1 (exhaustion/quarantine):
- forwardingExhaustionSink(exhaustionSinkRef) — was inline
  ExhaustionSink.forwardingTo(exhaustionSinkRef::get)
- publishExhaustionSink(...) — was two untested statements building the
  real sink and .set()-ing it into exhaustionSinkRef
- liveExhaustedPatterns(config) — was inline
  new LiveExhaustedPatterns(() -> config.get().profiles())
- exhaustedPatternLookup(roster, liveExhaustedPatterns) — was an inline
  lambda resolving a herdr target to its profile's live pattern; silently
  losing this is the worst regression in the sweep, since a real
  usage-limit refusal would stop being classified as BACKEND_EXHAUSTED

Group 2 (CB-596 credential policy):
- claudeCodeLauncher(...) — was an inline `new ClaudeCodeLauncher(...)`
  whose memberCredentials supplier argument was untestable wiring
- openCodeLauncher(...) — same, for OpenCodeLauncher

Each new test pins its factory behaviorally (never via source-text
assertions): built and confirmed RED by name against the named inert
mutation, then confirmed GREEN again after restoring, and separately
confirmed GREEN after a behavior-preserving reformat/local-variable
extraction of the same call, to rule out a disguised source-text test.

Suite: 1789 -> 1799 tests (+10, matching the 10 tests added), 0
failures, mvn -o clean install BUILD SUCCESS.

Scope strictly limited to main()'s :214-:468 range per the ticket split
with the concurrent worker handling Group 3 at line 500+.
ltms merged commit 6eb34a654f into main 2026-09-19 10:39:48 +02:00
Sign in to join this conversation.