fleetd #422 follow-up: make the model gate's own state observable #434
Reference in New Issue
Block a user
Delete Branch "worker/422-gate-state-observability-9e79d6-11"
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?
Closes fleetd #422 follow-up.
Problem: PeerLauncher.disabledModels() returned an empty set both when a host has no models: block at all (nothing gated) and when a block exists with nothing currently off (gate armed, reporting zero). fleet_profiles/GET /profiles and the startup log could not tell the two apart.
Fix:
Deliberately did NOT reuse CompletionResolver.UnsetMeaning: that enum exists so two DIFFERENT keys (exhaustedPattern/errorPattern) can each state what their own empty-coverage means. Here there's only one gate and one accessor, so a small dedicated ModelGateState record (configured + off) was a better fit than threading an unrelated enum through it.
Tests:
Build: mvn clean install — Tests run: 1544, Failures: 0, Errors: 0, Skipped: 0. BUILD SUCCESS (main was at 1535; +9 new tests).
Mutation proof (see PR description / worker report for full table): 4 mutations run, each killing a distinct test or test set — including the two required ones (always-armed, ignoring no-block; always-not-configured, ignoring an off model), plus one each for the Fleetd and FleetMcp sites. All reverted; final build reconfirmed green after revert.