From e7e2bd6f628946aed7ebf62a91106d6592d16114 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 9 Sep 2026 04:13:34 -0400 Subject: [PATCH] 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. --- src/game/ai/orders.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/ai/orders.h b/src/game/ai/orders.h index 878f5fa..fb0f781 100644 --- a/src/game/ai/orders.h +++ b/src/game/ai/orders.h @@ -194,6 +194,16 @@ struct ColonizeOrder { // 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 // 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 // key, measured across three processes including a branch flip),