fleetd #404: report armed detection from startup map #406

Merged
ltms merged 3 commits from worker/armed-reads-live-config-404-ed931f-9 into main 2026-09-10 04:20:55 +02:00
Member

Fixes fleetd #404. exhaustionDetectionArmed now reads exhaustedPatternsByProfile, the compiled startup map used by CompletionResolver, so reporting stays aligned with real detection until restart.

Test: FleetdExhaustionDetectionArmedWiringTest writes config under @TempDir, reloads a new exhaustedPattern, and asserts the startup map remains unarmed. It also source-checks the Fleetd wiring, so replacing the map lookup with config.get() fails.

Build run: mvn clean install in fleetd. Exact result: Tests run: 1475, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS.

Mutation check: restored config.get() in the report lambda and ran mvn test. It failed: FleetdExhaustionDetectionArmedWiringTest.reloadedPatternDoesNotChangeTheArmedFieldUntilRestart(Path) with: Fleetd must derive exhaustionDetectionArmed from exhaustedPatternsByProfile, not config.get(): the compiled startup map is what CompletionResolver uses until restart. ==> expected: but was: .

Corrected comment: fleetd #404: use the compiled startup map that CompletionResolver reads. An exhaustedPattern edit is deferred, so this stays aligned with detection until restart.

Deferred-key scan: no other config.get() read for a deferred key was found in the inspected Fleetd wiring.

Fixes fleetd #404. exhaustionDetectionArmed now reads exhaustedPatternsByProfile, the compiled startup map used by CompletionResolver, so reporting stays aligned with real detection until restart. Test: FleetdExhaustionDetectionArmedWiringTest writes config under @TempDir, reloads a new exhaustedPattern, and asserts the startup map remains unarmed. It also source-checks the Fleetd wiring, so replacing the map lookup with config.get() fails. Build run: mvn clean install in fleetd. Exact result: Tests run: 1475, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS. Mutation check: restored config.get() in the report lambda and ran mvn test. It failed: FleetdExhaustionDetectionArmedWiringTest.reloadedPatternDoesNotChangeTheArmedFieldUntilRestart(Path) with: Fleetd must derive exhaustionDetectionArmed from exhaustedPatternsByProfile, not config.get(): the compiled startup map is what CompletionResolver uses until restart. ==> expected: <true> but was: <false>. Corrected comment: fleetd #404: use the compiled startup map that CompletionResolver reads. An exhaustedPattern edit is deferred, so this stays aligned with detection until restart. Deferred-key scan: no other config.get() read for a deferred key was found in the inspected Fleetd wiring.
agent added 1 commit 2026-09-10 03:57:06 +02:00
fleetd #404: report armed detection from startup map
CI / build (pull_request) Successful in 1m25s
CI / contract (pull_request) Successful in 1m20s
44c735f6f5
agent added 1 commit 2026-09-10 04:13:12 +02:00
fleetd #404: test armed startup map behavior
CI / contract (pull_request) Successful in 48s
CI / build (pull_request) Successful in 1m30s
b8aedeafcb
agent added 1 commit 2026-09-10 04:20:47 +02:00
fleetd #404: pin the armed field's TRUE direction too
CI / contract (pull_request) Successful in 50s
CI / build (pull_request) Successful in 1m51s
446cc11d1d
Mutation-tested during review: replacing the armed lambda with
`profile -> false` left the whole suite green at 1475 tests, because the
only existing test passes an EMPTY startup map. That mutation would make
#395's visibility feature silently dead.

With this test the same mutation fails, and it is the only test that
fails, so nothing else covers this direction.
ltms merged commit a502ba53e0 into main 2026-09-10 04:20:55 +02:00
Sign in to join this conversation.