diff --git a/fleetd/src/test/java/dev/ltms/fleet/config/ConfigRefProfileCoverageTest.java b/fleetd/src/test/java/dev/ltms/fleet/config/ConfigRefProfileCoverageTest.java index cda5530..f7e8d61 100644 --- a/fleetd/src/test/java/dev/ltms/fleet/config/ConfigRefProfileCoverageTest.java +++ b/fleetd/src/test/java/dev/ltms/fleet/config/ConfigRefProfileCoverageTest.java @@ -153,6 +153,21 @@ class ConfigRefProfileCoverageTest { "ConfigRef.LAUNCH_SETTINGS_EXCLUDED names a component that does not exist on " + "FleetConfig.Profile — check for a typo: " + excluded); + // The exclusion set is this mechanism's own escape hatch, so it has to be pinned too. + // Found by mutation while verifying fleetd #323: moving autoCompactWindow and + // ideOpenCommand OUT of the comparison and INTO the exclusion set left the whole suite + // green — the loop below simply skips them, and the denominator assertion still balances. + // That is exactly the lazy move a failing coverage test invites, and it silently restores + // the #323 bug. Only ideProjectDir and worktreeGroup were saved by a behavioural test in + // ConfigRefTest; the other two had none. So: growing this set now requires editing this + // line as well, which is a visible, deliberate diff rather than a quiet one. + assertEquals(Set.of("weight", "maxLoad", "credentialId"), excluded, + "ConfigRef.LAUNCH_SETTINGS_EXCLUDED changed. A component belongs in it ONLY if it " + + "is read live off the config supplier, not baked into a launcher at " + + "startup. If you are adding one to silence this test, that is fleetd #323 " + + "happening again: compare it in sameLaunchSettings instead. If it really " + + "is read live, name where it is read and update this assertion."); + FleetConfig.Profile base = profileOf(BASE); List uncovered = new java.util.ArrayList<>(); int compared = 0;