Extract the inline new FleetMcp.LeadConfigDirSource(leadConfigDirLookup(...))
construction in Fleetd.main into a package-private factory,
Fleetd.leadConfigDirSource, mirroring loopHealthSource/capacitySource/
healthCoverageSource. Add FleetdLeadConfigDirSourceWiringTest, which calls the
factory directly with real Profile/Leader fixtures and asserts the returned
source resolves a real configDir -- a property that is false if the factory's
body is mutated to return LeadConfigDirSource.none().
Neither FleetMcpLeadContextGaugeWiringTest nor FleetdLeadConfigDirLookupTest
could catch main losing this wiring: each builds its own instance instead of
calling what main calls. This closes that gap at the factory level, matching
the standard already accepted for loopHealthSource's own wiring test.
FleetMcp.contextView hardcoded LeadContextGauge.read(null, ...), so a lead whose
profile sets its own CLAUDE_CONFIG_DIR always read the wrong transcript directory
and reported UNKNOWN forever, with no error anywhere.
- Add FleetMcp.LeadConfigDirSource (same idiom as LeadSeatSource) and thread it
through the constructor / listFleet overload chain / leadView / contextView.
- Add Fleetd.leadConfigDirLookup, wired at construction, following the same
fleet.leaders.<name>.profile link leadSeatLookup already uses, one step
further to that profile's own configDir.
- LeadContextGauge.parse: a single unparseable line (typically the final one,
torn by a write this read raced) is now skipped rather than forcing UNKNOWN;
only when every line in the read window fails to parse does it report
UNKNOWN, which is the real format-change signal.
- Tests: FleetdLeadConfigDirLookupTest (lookup logic), FleetMcpLeadContextGaugeWiringTest
(end-to-end: config naming directory A vs B decides which is read; a lead with
no configured dir degrades without throwing), and two replacement properties in
LeadContextGaugeTest for the torn-line fix plus its all-unparseable control.