ai: the gather order decides fleet names too, and not only ours

Lane BT found it while building the comparison: FtName is an id-attached label
minted by the same pass as the id, and its counter is per player and shared with
the server's fleets. In the original, a run that minted two client fleets named
an unrelated server fleet differently from a run that minted three. So a gather
that visits groups in a different order renames fleets the AI never touched.
This commit is contained in:
alex 2026-09-09 04:13:34 -04:00
parent 45b16ef626
commit e7e2bd6f62

View file

@ -194,6 +194,16 @@ struct ColonizeOrder {
// run states its own order for free. An optional override that replays a captured order is // run states its own order for free. An optional override that replays a captured order is
// what turns "equal modulo a relabelling" into "equal" -- three words per new fleet, the same // what turns "equal modulo a relabelling" into "equal" -- three words per new fleet, the same
// cost class as pinning a seed. // cost class as pinning a seed.
// 4. **The gather order also decides fleet NAMES, and not only ours.** `FtName` is an
// id-attached label -- a Greek ordinal minted by the same pass as the id -- and its counter is
// PER PLAYER and SHARED WITH THE SERVER'S FLEETS. In the original, the run that minted two
// client fleets named an unrelated node-0 fleet "Upsilon" and the run that minted three named
// that same fleet "Phi". So a gather that visits groups in a different order renames fleets
// the AI never touched, across a boundary that has nothing to do with the AI. Whatever we do
// here, the naming must come off the same ordered walk as the ids, or saves will differ in
// names while agreeing on everything else. (Found by lane BT while building the comparison:
// "apply the relabelling to every id-valued leaf" would have produced two spurious name
// differences, because the name belongs to the slot and not to the group.)
// //
// Evidence: sots-re `findings/control-flow/fleet-visit-order-mechanism.md` (the container and its // Evidence: sots-re `findings/control-flow/fleet-visit-order-mechanism.md` (the container and its
// key, measured across three processes including a branch flip), // key, measured across three processes including a branch flip),