#589 Group 3: wiring-test 5 sites below line 500 in Fleetd.main() #598

Merged
ltms merged 1 commits from worker/589-fcd2aa-1 into main 2026-09-19 10:33:07 +02:00
Member

Implements Group 3 of #589: extracts the 5 assigned inline wiring sites (turnRegistrar, healthFailTarget, releaseCleanup, replyInboxOpener, leadMailboxOpener) into named package-private factories on Fleetd, following the FleetdLoopHealthSourceWiringTest pattern from #584. Each gets a runtime test (not source-text) that drives real collaborators through public APIs.

releaseCleanup was done first, as required, since MessageService.abandon's javadoc documents that losing this cleanup leaves a torn-down worker's rendezvous waiter open forever.

Tests: 1789 -> 1794 (+5), 0 failures, 0 errors. Verified mvn -q -o test exit 0 directly (not through a pipe), no BUILD FAILURE in the log. Each new test was confirmed RED on the inert form named in the ticket (failing by name), and GREEN after reformatting the wiring call across lines and extracting the argument into a local variable/factory, per criteria 1 and 2.

Scope stays below line 500 in main(), per the split with worker/589-f64303-2 (Groups 1/2, at or above line 500).

Implements Group 3 of #589: extracts the 5 assigned inline wiring sites (turnRegistrar, healthFailTarget, releaseCleanup, replyInboxOpener, leadMailboxOpener) into named package-private factories on Fleetd, following the FleetdLoopHealthSourceWiringTest pattern from #584. Each gets a runtime test (not source-text) that drives real collaborators through public APIs. releaseCleanup was done first, as required, since MessageService.abandon's javadoc documents that losing this cleanup leaves a torn-down worker's rendezvous waiter open forever. Tests: 1789 -> 1794 (+5), 0 failures, 0 errors. Verified mvn -q -o test exit 0 directly (not through a pipe), no BUILD FAILURE in the log. Each new test was confirmed RED on the inert form named in the ticket (failing by name), and GREEN after reformatting the wiring call across lines and extracting the argument into a local variable/factory, per criteria 1 and 2. Scope stays below line 500 in main(), per the split with worker/589-f64303-2 (Groups 1/2, at or above line 500).
agent added 1 commit 2026-09-19 10:24:31 +02:00
#589 Group 3: wiring-test the 5 sites below line 500 in Fleetd.main()
CI / shell-tests (pull_request) Successful in 11s
CI / contract (pull_request) Successful in 1m26s
CI / build (pull_request) Successful in 2m11s
6cccd458d4
Extracts the inline lambdas/method references at the 5 assigned wiring
sites into named package-private factories on Fleetd, following the
FleetdLoopHealthSourceWiringTest pattern from #584:

- turnRegistrar(CompletionResolver) — was completion::register (Injector)
- healthFailTarget(MessageService) — was messages::abandon (FleetHealthMonitor)
- releaseCleanup(MessageService, ReplyInbox, PrimaryRegistry) — was the
  inline sessions.onRelease(detail -> {...}) cleanup lambda
- replyInboxOpener() — was AmqpReplyInbox::open passed to selectReplyInbox
- leadMailboxOpener() — was LeadMailbox::open passed to openLeadMailbox

Each factory has a new runtime test (not source-text) that drives real
collaborators through public APIs: MessageService.poll(ticket).phase(),
InMemoryReplyInbox.peek(), PrimaryRegistry.nudgeTargetFor(), and the
opener tests connect to a guaranteed-closed local port to prove a real
network attempt vs. an inert stub.

releaseCleanup was done first per the brief: MessageService.abandon's
javadoc documents that losing this cleanup leaves a torn-down worker's
rendezvous waiter open forever.

Tests: 1789 -> 1794 (+5), 0 failures, 0 errors. mvn -q -o test exit 0,
no BUILD FAILURE, no piped exit status. Each new test verified RED on
the inert form named in the ticket, and GREEN after reformatting the
call across lines and extracting the argument into a local/factory.
ltms merged commit 61115f6f61 into main 2026-09-19 10:33:07 +02:00
Sign in to join this conversation.