fleetd #416: fleet_list must enumerate the STARTUP profile set #420
Reference in New Issue
Block a user
Delete Branch "worker/416-3ad1da-1"
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 #416.
CapacitySourcewas built with() -> config.get().profiles().keySet()— the live map — whileprofilesis a DEFERRED key.HerdrPeerLaunchertakesMap.copyOf(profiles)once at construction, so a profile added only to a hot-reloaded config can never be spawned.fleet_listtherefore advertised free slots for a profilefleet_spawnrefuses withunknown worker profile, while its own contract forfreeclaims it runs "the same check the spawn gate itself runs".The set now comes from the startup snapshot, matching the
coordinator.peerswiring three lines below — whose comment already stated this exact rule.maxLoadstays live on purpose (ConfigRefdocuments it as hot, likecredentialIdandweight), so an existing profile'smaxLoadedit still takes effect without a restart.Verification — run by the lead, not reported by the member
The implementing member's reply was lost to an empty scrape (a subscription usage limit took out three members at once), so the work was salvaged uncommitted from its worktree and both required proof steps were run here:
mvn clean installTests run: 1505, Failures: 0, Errors: 0, Skipped: 0, 0 compile errorskeySet()liveOnlyProfileIsNotListedFAILS, and only that teststartupProfileIsListedFAILS, and only that testMutation B is why the second direction exists. Per #404, a test that only ever checks the absent case cannot tell a correct lookup from one that returns nothing at all — that gap let a
profile -> falsemutation survive with 1475 tests green.The third test,
reloadedMaxLoadStillChangesWhatFleetListReports, pins the mirror-image regression: a fix that froze the wholeCapacitySourceagainst the startup snapshot would trade this bug for the opposite one.Credit
Found by the fleet01 lead, who derived it from the "sitting next to a hot lookup does not make a deferred key hot" generalisation and proved it with a live
ghost404profile — reload log,fleet_profiles,fleet_listandfleet_spawnside by side — rather than by argument. Implemented by asonnetmember.