lane T2: the phase's leaf self-report is its own accounting, not the report's

This commit is contained in:
alex 2026-09-08 14:51:12 -04:00
parent 5d29ee60e4
commit fa5e190bce

View file

@ -77,10 +77,11 @@ TreatyStampResult StampTreatyTurns(std::vector<PlayerEntry>& players, std::int32
if (field) *field = frame;
}
}
// A created entry puts a whole record on the wire, not one value: its own leaf plus the
// element leaf the container gains. A stamp into an entry that already existed moves one
// leaf. Counting it this way keeps the phase's self-report in the same currency as the
// divergence report rather than in a currency of its own.
// The phase's own accounting: one for each stamp that moved a value, plus one for each
// record that did not exist before. It is deliberately NOT an attempt to predict the
// divergence report's leaf count, which also charges two container leaves to each player
// whose ledger goes from empty to non-empty -- on the reference pair this reports 28
// where the report closes 26. The report is the authority; this is what the phase did.
r.leafWrites = r.fieldsWritten + r.entriesCreated;
return r;
}