fleetd #404: report armed detection from startup map #406
Reference in New Issue
Block a user
Delete Branch "worker/armed-reads-live-config-404-ed931f-9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.