From 656588f597fce08898de67100a3356706f5a2894 Mon Sep 17 00:00:00 2001 From: Dai Ha Date: Sat, 3 Oct 2026 19:50:16 +0200 Subject: [PATCH] fleetd #661: add the pane-placement case to the validateAll reachability enumeration validateAllReachesEveryOneOfTodaysSixValidators only covered six of the eight real validators; the new validator was reachability-tested only from FleetConfigTest, in a different file from the one whose job is to enumerate every validateAll-reachability case. Add the pane-placement case to the enumeration, rename the method to drop the hardcoded count (validateAllReachesEveryOneOfTodaysRealValidators), and correct the surrounding claims to say seven of eight, naming validateLeadRollover as the one case still missing (fleetd #668, not fixed here). --- .../config/FleetConfigValidateAllTest.java | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/fleetd/src/test/java/dev/ltms/fleet/config/FleetConfigValidateAllTest.java b/fleetd/src/test/java/dev/ltms/fleet/config/FleetConfigValidateAllTest.java index e056e4ca..c6dd15f4 100644 --- a/fleetd/src/test/java/dev/ltms/fleet/config/FleetConfigValidateAllTest.java +++ b/fleetd/src/test/java/dev/ltms/fleet/config/FleetConfigValidateAllTest.java @@ -42,12 +42,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue; * has right now. This is the proof that a future, real seventh validator on {@link * FleetConfig} would be swept automatically, without needing to add a real (unwanted) * seventh validator just to exercise the claim. - *
  • {@link #validateAllReachesEveryOneOfTodaysSixValidators()} proves {@link + *
  • {@link #validateAllReachesEveryOneOfTodaysRealValidators()} proves {@link * FleetConfig#validateAll()} itself is wired to that same generic mechanism and genuinely - * reaches each of today's six real validators — reusing the exact minimal failing + * reaches seven of today's eight real validators — reusing the exact minimal failing * configurations {@code FleetConfigTest} already established for each one directly, so a - * single call to {@code validateAll()} is shown to reproduce every one of those six - * failures.
  • + * single call to {@code validateAll()} is shown to reproduce every one of those seven + * failures. The eighth, {@link FleetConfig#validateLeadRollover()}, has no case here yet — + * a pre-existing gap tracked as fleetd #668. * * *

    Together with the direct-{@code Fleetd.main}-invocation tests in {@code @@ -209,7 +210,7 @@ class FleetConfigValidateAllTest { + "name) must all be skipped"); } - // ── Claim 2: FleetConfig.validateAll() is wired to that mechanism and reaches all six today ── + // ── Claim 2: FleetConfig.validateAll() is wired to that mechanism and reaches seven of eight today ── /** * Reflectively enumerates {@link FleetConfig}'s own public, no-arg, void {@code validateXxx()} @@ -264,14 +265,17 @@ class FleetConfigValidateAllTest { } /** - * The heart of claim 2: for each of today's six real validators, a minimal file that fails + * The heart of claim 2: for seven of today's eight real validators, a minimal file that fails * ONLY that one — the exact fixtures {@code FleetConfigTest} uses to test each validator * directly — must also fail through {@link FleetConfig#validateAll()}. If a future edit to - * {@code validateAll()} silently dropped one validator from the sweep (e.g. a typo'd name - * filter), exactly one of these six would start passing when it must not. + * {@code validateAll()} silently dropped one of these seven from the sweep (e.g. a typo'd name + * filter), exactly one of them would start passing when it must not. + * + *

    The eighth, {@link FleetConfig#validateLeadRollover()}, has no case here — a pre-existing + * gap tracked as fleetd #668, not fixed by this change. */ @Test - void validateAllReachesEveryOneOfTodaysSixValidators(@TempDir Path dir) throws Exception { + void validateAllReachesEveryOneOfTodaysRealValidators(@TempDir Path dir) throws Exception { // validateAuthExposure: a non-loopback bind without token mode. assertValidateAllRefuses(dir, "auth-exposure.yaml", """ bind: @@ -344,6 +348,20 @@ class FleetConfigValidateAllTest { allow: - model: claude-sonnet-5 """, "rogue"); + + // validatePanePlacementAgainstLeadTabs: a pane-placed profile while a lead names a tab. + assertValidateAllRefuses(dir, "pane-placement.yaml", """ + bind: + host: 127.0.0.1 + port: 8765 + profiles: + gx10: + placement: pane + fleet: + leaders: + opus: + tab: "lead: opus" + """, "gx10"); } private static void assertValidateAllRefuses(Path dir, String fileName, String yaml,