fleetd #612 r5: pin FleetdAssembly's leadConfigDirSource call site #643
Reference in New Issue
Block a user
Delete Branch "worker/612-a-r5-leadconfigdir-9e70cf-6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ticket: fleetd #612, Shape A, unit r5.
Scope: one call site,
FleetdAssembly.java:488--Fleetd.leadConfigDirSource(() -> config.get().profiles(), leaders)passed intoFleetMcp. This is the literal fleetd #602/#606 defect, one call site away from its own fix:FleetdLeadConfigDirSourceWiringTestalready pins the factoryFleetd.leadConfigDirSourceitself, but by its own javadoc cannot cover whetherFleetdAssembly's call site still calls it -- swapping that one line for a bareFleetMcp.LeadConfigDirSource.none()compiled clean and left the whole suite green before this PR.Adds one new test file,
FleetdLeadConfigDirSourceAssemblyTest: assembles the realFleetdRuntimeviaFleetdAssembly.assembleAndStart, pulls theleadConfigDirsfield off the real, assembledFleetMcpvia reflection (no public accessor exists for it, unlikequarantineSource()/leadSeatSource()), and asserts it resolves a configured lead's realconfigDirrather thannone()'s hardcoded null.No production code changed.
Verification performed:
expected: <LOUD-CONTROL-WRONG-VALUE> but was: </mnt/fake-lead-configdir>), reverted, confirmed green.FleetMcp.LeadConfigDirSource.none()-> RED (expected: </mnt/fake-lead-configdir> but was: <null>). Reverted;git diff --statempty.Fleetd.leadConfigDirSource(...)called with every symbol in place, swapped the profile supplier for() -> Map.of()(empty map) -> RED, same assertion, same failure shape. Reverted;git diff --statempty.grep -nbefore mutating (anchor count 1 each time) and after reverting.runtime.close()in afinallyblock (Surefire runs one JVM fork here).mvn clean installin this worktree --Tests run: 1893, Failures: 0, Errors: 0, Skipped: 0,BUILD SUCCESS.Scope note (not fixed, per ticket instructions): ticket #612's newest comment lists several other call sites in
FleetdAssemblywhose inert variant is a publishedX.none()not distinguished by any test (ranks 4, 9, 10, 11, 12) -- those are other Shape A units running in parallel, out of scope here.