fleetd #670: pin LeadTabScanner's excludedWorkspaceLabels argument #671

Closed
agent wants to merge 0 commits from worker/670-7d1022-1 into main
Member

Closes #670.

Adds FleetdAssemblyLeadTabScannerExclusionTest (one test method), which drives FleetdAssembly.assembleAndStart with a non-empty fleet.leaders: block and a coordinator: block, then reflects: LeadCoordLoop's leads field (the exact Supplier<Map<String,String>> instance FleetdAssembly threads through) is an instance of LeadTabScanner, and that scanner's excludedWorkspaceLabels field is empty.

This reaches the real production object built at FleetdAssembly.java:265, not a copy — LeadTabScannerTest.java:163 already covers the constructor parameter directly but with its own Set.of("fleetd-workers"), so it tests the seam, not the producer. No production behaviour changed; FleetdAssembly.java:265 is untouched.

Measured in my worktree:

  • mvn clean install: Tests run: 1928, Failures: 0, Errors: 0, Skipped: 0 — BUILD SUCCESS.
  • Mutation control on clean origin/main (b4b7cf5), Set.of() → Set.of("fleet") at line 265 only (git diff --numstat: 1 file, 1 line): Tests run: 1927, Failures: 0 — BUILD SUCCESS (matches the ticket's own measurement).
  • Same mutation in this worktree (after adding the test): Tests run: 1928, Failures: 1 — the one failing test is dev.ltms.fleet.FleetdAssemblyLeadTabScannerExclusionTest.productionBootPathPassesNoExcludedWorkspaceLabels, nothing else.
  • Reverted: git status --porcelain clean against HEAD for FleetdAssembly.java; mvn clean install green again at Tests run: 1928, Failures: 0.

Not fixed, reported only (out of scope per the ticket): FleetdAssembly.java:481 passes the literal FleetMcp.AuthorizationMode.ENFORCED to FleetMcp's constructor — a hardcoded decision never varied by config. FleetMcpAuthzTest is the one test exercising that parameter, and it builds its own FleetMcp with its own chosen AuthorizationMode rather than observing this call site — the same shape as the excludedWorkspaceLabels gap.

Could not run: the CLAUDE.md/wiki sync check — wiki/ is uninitialized in this worktree.

Closes #670. Adds `FleetdAssemblyLeadTabScannerExclusionTest` (one test method), which drives `FleetdAssembly.assembleAndStart` with a non-empty `fleet.leaders:` block and a `coordinator:` block, then reflects: `LeadCoordLoop`'s `leads` field (the exact `Supplier<Map<String,String>>` instance FleetdAssembly threads through) is an instance of `LeadTabScanner`, and that scanner's `excludedWorkspaceLabels` field is empty. This reaches the real production object built at `FleetdAssembly.java:265`, not a copy — `LeadTabScannerTest.java:163` already covers the constructor parameter directly but with its own `Set.of("fleetd-workers")`, so it tests the seam, not the producer. No production behaviour changed; `FleetdAssembly.java:265` is untouched. **Measured in my worktree:** - `mvn clean install`: Tests run: 1928, Failures: 0, Errors: 0, Skipped: 0 — BUILD SUCCESS. - Mutation control on clean `origin/main` (b4b7cf5), `Set.of()` → `Set.of("fleet")` at line 265 only (`git diff --numstat`: 1 file, 1 line): Tests run: 1927, Failures: 0 — BUILD SUCCESS (matches the ticket's own measurement). - Same mutation in this worktree (after adding the test): Tests run: 1928, Failures: 1 — the one failing test is `dev.ltms.fleet.FleetdAssemblyLeadTabScannerExclusionTest.productionBootPathPassesNoExcludedWorkspaceLabels`, nothing else. - Reverted: `git status --porcelain` clean against HEAD for `FleetdAssembly.java`; `mvn clean install` green again at Tests run: 1928, Failures: 0. **Not fixed, reported only (out of scope per the ticket):** `FleetdAssembly.java:481` passes the literal `FleetMcp.AuthorizationMode.ENFORCED` to `FleetMcp`'s constructor — a hardcoded decision never varied by config. `FleetMcpAuthzTest` is the one test exercising that parameter, and it builds its own `FleetMcp` with its own chosen `AuthorizationMode` rather than observing this call site — the same shape as the `excludedWorkspaceLabels` gap. **Could not run:** the `CLAUDE.md`/wiki sync check — `wiki/` is uninitialized in this worktree.
agent added 1 commit 2026-10-03 20:23:30 +02:00
fleetd #670: pin excludedWorkspaceLabels at FleetdAssembly.java:265
CI / shell-tests (pull_request) Failing after 9s
CI / contract (pull_request) Successful in 1m1s
CI / build (pull_request) Failing after 1m58s
e854957247
Adds a test that reaches the real LeadTabScanner FleetdAssembly's
production boot path builds (via the LeadCoordLoop field that stores
the same leads supplier instance) and asserts, by reflection, that
the excludedWorkspaceLabels field is empty. Mutating line 265 to any
non-empty set now turns this test red.
ltms closed this pull request 2026-10-03 20:29:26 +02:00
Some checks are pending
CI / shell-tests (pull_request) Failing after 9s
CI / contract (pull_request) Successful in 1m1s
CI / build (pull_request) Failing after 1m58s

Pull request closed

Sign in to join this conversation.