A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Sim: TotalPopulation sums in ordinal key order; goldens re-pinned (Refs #2804 item 4) (#2885)
Beri285eba4f204a
diff --git a/changelog.d/2804-total-population-order.md b/changelog.d/2804-total-population-order.mdnew file mode 100644index 000000000..aca38395f--- /dev/null+++ b/changelog.d/2804-total-population-order.md@@ -0,0 +1,5 @@+### Changed++- The country's head count adds up its population groups in a fixed order, so the same game gives the same numbers+ however the groups are stored (Refs #2804). Debt and foreign currency move only in their last digits; nothing a+ player sees changes.diff --git a/docs/RELEASING.md b/docs/RELEASING.mdindex 4cf2b48e4..a22ce0f71 100644--- a/docs/RELEASING.md+++ b/docs/RELEASING.md@@ -28,10 +28,10 @@ macOS IL2CPP parity check is not an MVP release gate.uv run tools/machine_lock.py --shared --wait-unity -- "$UNITY" -batchmode -CI false -GITHUB_ACTIONS false -TF_BUILD false -quit -projectPath unity -buildTarget WebGL -executeMethod Statecraft.Game.EditorTools.Build.Web -compression gzip -shareable -logFile "$PWD/unity-build-web-gz.log"git checkout -- unity/Assets/Settings unity/ProjectSettings/ProjectSettings.assetgolden_expect=(); while read -r name hash; do [[ -z "$name" || "$name" == \#* ]] || golden_expect+=(--expect "GOLDEN OK $name $hash"); done < sim/Statecraft.Sim.Tests/golden/manifest.txt- # one GOLDEN OK line per manifest golden (#394), e.g. "GOLDEN OK hash1950 a08ff8504d862925563c8523a707b58ebe3bcaac0b504dc9ce7e028fc19eb0e4"- # and "GOLDEN OK hash1952 5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97ef"+ # one GOLDEN OK line per manifest golden (#394), e.g. "GOLDEN OK hash1950 7d8e158b26fd2301d27361dc4912debc5085d1cc0915b2182195bd1a6cc5f6ba"+ # and "GOLDEN OK hash1952 f5ebb83052aa1fed13a0f3ce0295e5620e70a34906ff0f7fc5c4ce8654ee708e"uv run tools/web_check.py unity/Builds/Web-gzip --query "golden&smoke=5" "${golden_expect[@]}" \- --expect "SMOKE OK 5 turns 1948-10-15 d12c83ce94e3940f93ed21abe7c2c9957de099b2653961da90e87785e6405e79"+ --expect "SMOKE OK 5 turns 1948-10-15 b93ad5503dad3981b7a0de4c078b6d4323794be991a8d8343e5fe90271dc006c"uv run tools/web_check.py unity/Builds/Web-gzip --startscreen new --timeout 300 --stall 90uv run tools/web_check.py unity/Builds/Web-gzip --startscreen recording --timeout 300 --stall 90uv run tools/web_check.py unity/Builds/Web-gzip --startscreen new --query lang=he --timeout 300 --stall 90@@ -66,7 +66,7 @@ macOS IL2CPP parity check is not an MVP release gate.uv run tools/machine_lock.py --shared --wait-unity -- "$UNITY" -batchmode -CI false -GITHUB_ACTIONS false -TF_BUILD false -quit -projectPath unity -buildTarget WebGL -executeMethod Statecraft.Game.EditorTools.Build.Web -compression gzip -decompressionFallback -shareable -out Builds/Web-pages -logFile "$PWD/unity-build-web-pages.log"git checkout -- unity/Assets/Settings unity/ProjectSettings/ProjectSettings.assetuv run tools/web_check.py unity/Builds/Web-pages --query "golden&smoke=5" "${golden_expect[@]}" \- --expect "SMOKE OK 5 turns 1948-10-15 d12c83ce94e3940f93ed21abe7c2c9957de099b2653961da90e87785e6405e79"+ --expect "SMOKE OK 5 turns 1948-10-15 b93ad5503dad3981b7a0de4c078b6d4323794be991a8d8343e5fe90271dc006c"uv run tools/web_check.py unity/Builds/Web-pages --startscreen new --timeout 300 --stall 90uv run tools/web_check.py unity/Builds/Web-pages --startscreen recording --timeout 300 --stall 90uv run tools/web_check.py unity/Builds/Web-pages --startscreen new --query lang=he --timeout 300 --stall 90diff --git a/docs/determinism.md b/docs/determinism.mdindex 335e5ee2b..470b4d3ff 100644--- a/docs/determinism.md+++ b/docs/determinism.md@@ -63,9 +63,9 @@ final `GameState.Hash()` is pinned:| Run | Ends | Hash ||---|---|---|-| to 1950-01-01 (`Hash1950`) | 1950-01-15, turn 20 | `a08ff8504d862925563c8523a707b58ebe3bcaac0b504dc9ce7e028fc19eb0e4` |-| to 1952-01-01 (`Hash1952`) | 1952-01-15, turn 44 (the game's end) | `5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97ef` |-| to the game's end (`mvp-end`) | 1952-01-15, turn 44 | `5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97ef` |+| to 1950-01-01 (`Hash1950`) | 1950-01-15, turn 20 | `7d8e158b26fd2301d27361dc4912debc5085d1cc0915b2182195bd1a6cc5f6ba` |+| to 1952-01-01 (`Hash1952`) | 1952-01-15, turn 44 (the game's end) | `f5ebb83052aa1fed13a0f3ce0295e5620e70a34906ff0f7fc5c4ce8654ee708e` |+| to the game's end (`mvp-end`) | 1952-01-15, turn 44 | `f5ebb83052aa1fed13a0f3ce0295e5620e70a34906ff0f7fc5c4ce8654ee708e` |`hash1952` stops at the first turn on or after 1 January 1952, which is the game's last turn, so it is the same run as`mvp-end` (`DeterminismTests.TheWholeGameToItsEndIsFixed`). Both names are kept (spec 2026-10-12 section 3 step 6): a@@ -74,7 +74,7 @@ player check enumerate the manifest, so it and every scenario are checked withouA further value is pinned for the browser smoke run (`?smoke=5`: the golden seed, five turns played through the UI's ownbuttons, answering each event with its first option while the turn's Attention pays for it, the rest left to their-ministers): `SMOKE OK 5 turns 1948-10-15 d12c83ce94e3940f93ed21abe7c2c9957de099b2653961da90e87785e6405e79`.+ministers): `SMOKE OK 5 turns 1948-10-15 b93ad5503dad3981b7a0de4c078b6d4323794be991a8d8343e5fe90271dc006c`.It depends on the UI path as well as the sim (which option is first, the turn grid), so re-record it when either changes.Check every WebGL build with every manifest entry (plus the UI-path smoke line) with:@@ -85,7 +85,7 @@ while read -r name hash; dogolden_expect+=(--expect "GOLDEN OK $name $hash")done < sim/Statecraft.Sim.Tests/golden/manifest.txtuv run tools/web_check.py unity/Builds/Web-<compression> --query "golden&smoke=5" "${golden_expect[@]}" \- --expect "SMOKE OK 5 turns 1948-10-15 d12c83ce94e3940f93ed21abe7c2c9957de099b2653961da90e87785e6405e79"+ --expect "SMOKE OK 5 turns 1948-10-15 b93ad5503dad3981b7a0de4c078b6d4323794be991a8d8343e5fe90271dc006c"````smoke-orders` (GDD Phase 5 PR 15, #754) is the same kind of browser run for the unit orders (`?smoke-orders`, desktop@@ -513,3 +513,13 @@ The hash reads the state keys, so it never sees a record outside its window. An| #1270 (S1), re-pinned on main after #2087: as above | scenario-mvp-occupy-cost | `ad9af425` | the Syrian unit on (15, 5) is the only change (was `612e9feb`) || #1270 (S1), re-pinned on main after #2087: as above | scenario-mvp-annex-nazareth | `e8a9dbf1` | the Syrian unit on (15, 5); unit 1, on its card order toward (15, 3), is on (13, 6) at the run's end instead of (15, 5) (was `c8195c09`). No other golden moves: smoke-orders does not reach 15 July 1948 || #2608: the annexed residents join the population (R-CITY-008) | scenario-mvp-annex-nazareth | `d0372ca6` | `end_occupation nazareth annex` adds the row's count to `GameState.Population`'s `annexed` group, so the population gains the annexed residents, and the debt, FX and Food lines move with it; the annexation itself and every unit position are unchanged. No other golden occupies a place, so none moves (was `e8a9dbf1`) |+| #2804 item 4: `GameState.TotalPopulation` sums the population groups in ordinal key order (R-FOOD-001; owner, 6 Nov 2026: "Do it just before the regen") | hash1950 | `7d8e158b` | floating-point rounding only: the same numbers added in a different order land one ulp apart, in `debt` (`...5F79` to `...5F7A`); no rule, value or event changes (was `a08ff850`) |+| #2804 item 4: as above | hash1952 | `f5ebb830` | rounding only: `fx` moves by 16 ulp (`-12.990431328096559` to `-12.99043132809653`) and nothing else (was `5561fc51`) |+| #2804 item 4: as above | mvp-end | `f5ebb830` | same run as hash1952 (was `5561fc51`) |+| #2804 item 4: as above | smoke5 | `b93ad550` | rounding only; no snapshot is kept for this run (was `d12c83ce`) |+| #2804 item 4: as above | scenario-reckless | `c0eeb7dd` | `debt` 2 ulp apart, nothing else (was `bed7eb74`) |+| #2804 item 4: as above | scenario-cautious | `31ab04b0` | `debt` 2 ulp apart, nothing else (was `4f3a0556`) |+| #2804 item 4: as above | scenario-mvp-absorb-first | `16c8a869` | `debt` 1 ulp apart, nothing else (was `f289f897`) |+| #2804 item 4: as above | scenario-mvp-defeat | `572f71ab` | `debt` and `fx` 2 ulp apart each; the defeat is unchanged (was `8c83f6e0`) |+| #2804 item 4: as above | scenario-mvp-occupy-cost | `eb3ae67b` | `debt` 1 ulp apart, nothing else (was `ad9af425`) |+| #2804 item 4: as above | scenario-mvp-annex-nazareth | `3cab078b` | `debt` 2 ulp apart, nothing else (was `d0372ca6`). No other golden moves: smoke-orders keeps `08d9800e` |diff --git a/sim/Statecraft.Sim.Tests/Gdd03RegionalIsolationTests.cs b/sim/Statecraft.Sim.Tests/Gdd03RegionalIsolationTests.csindex 119fa89a9..3b3acfc3b 100644--- a/sim/Statecraft.Sim.Tests/Gdd03RegionalIsolationTests.cs+++ b/sim/Statecraft.Sim.Tests/Gdd03RegionalIsolationTests.cs@@ -161,6 +161,6 @@ public class Gdd03RegionalIsolationTestsforeach (var id in new[] { "fixture", A, "fixture-a-job", "fixture-workshop" })Assert.DoesNotContain(id, production.Describe(), StringComparison.Ordinal);Assert.Empty(production.PlayerRegions); Assert.False(production.PopulationLedger.IsInitialized);- Assert.Equal(production.Population.Values.Sum(), production.TotalPopulation);+ Assert.Equal(production.Population.OrderBy(kv => kv.Key, StringComparer.Ordinal).Sum(kv => kv.Value), production.TotalPopulation);}}diff --git a/sim/Statecraft.Sim.Tests/OldSaveNoOperationCardsTests.cs b/sim/Statecraft.Sim.Tests/OldSaveNoOperationCardsTests.csindex 68945ab76..f7a10c8f8 100644--- a/sim/Statecraft.Sim.Tests/OldSaveNoOperationCardsTests.cs+++ b/sim/Statecraft.Sim.Tests/OldSaveNoOperationCardsTests.cs@@ -11,8 +11,10 @@ using Statecraft.Sim;public class OldSaveNoOperationCardsTests{// GameState.Hash() of this save's replay after S1 (the Syrian army's 15 July 1948 step, #1270), reviewed and accepted by- // the owner's 4 Nov 2026 ruling "(a) Accept replay differs (Recommended)" on #2180.- private const string AcceptedReplayHashAfterS1 = "bec1464e1a0811554f8958e8d5a601807d887d3f18b6c88e90914292bc88a89d";+ // the owner's 4 Nov 2026 ruling "(a) Accept replay differs (Recommended)" on #2180. Re-pinned for #2804 item 4+ // (TotalPopulation summed in ordinal key order, a rounding-only move; owner on #2804, 6 Nov 2026: "Do it just before+ // the regen (Recommended)"; was bec1464e).+ private const string AcceptedReplayHashAfterS1 = "ca30ddf09dfc46eefef11c5528b864fa664aaa77f129786d79867b17fba4dc9c";[Fact]public void V034Gdd01SaveWithNoOperationCardLoadsAndReportsReplayDiffers()diff --git a/sim/Statecraft.Sim.Tests/PopulationTests.cs b/sim/Statecraft.Sim.Tests/PopulationTests.csindex 06586e2d9..c32c6dfae 100644--- a/sim/Statecraft.Sim.Tests/PopulationTests.cs+++ b/sim/Statecraft.Sim.Tests/PopulationTests.cs@@ -26,6 +26,20 @@ public class PopulationTestspublic void NoArrivalsOutsideSeries() =>Assert.Empty(PopulationSystem.Arrivals(C, new DateTime(1950, 1, 1), new DateTime(1950, 4, 1)));+ // R-FOOD-001: the national head count feeds the economy's per-capita tax and spending (EconomySystem), which moves the+ // hashed debt and fx, so it sums the groups in ordinal key order, never in the Dictionary's enumeration order, which+ // .NET does not promise. These three doubles give a different sum in each order.+ [Fact]+ public void TotalPopulationSumsTheGroupsInOrdinalKeyOrder()+ {+ var s = new GameState();+ s.Population["b"] = 1;+ s.Population["c"] = 1;+ s.Population["a"] = 1e16;+ Assert.NotEqual((1e16 + 1) + 1, (1.0 + 1) + 1e16); // precondition: the order changes the sum+ Assert.Equal((1e16 + 1) + 1, s.TotalPopulation);+ }+[Fact]public void ApplyAddsNaturalIncreaseThenArrivals(){diff --git a/sim/Statecraft.Sim.Tests/golden/hash1950.txt b/sim/Statecraft.Sim.Tests/golden/hash1950.txtindex 3651f7e73..2e2f69498 100644--- a/sim/Statecraft.Sim.Tests/golden/hash1950.txt+++ b/sim/Statecraft.Sim.Tests/golden/hash1950.txt@@ -44,7 +44,7 @@ pop{sit[housing_crisistreasury=0 [0000000000000000]-debt=88.05032828298671 [40560338941E5F79]+debt=88.05032828298673 [40560338941E5F7A]fx=94.52989672613671 [4057A1E9D3F540F0]rung=2;cf=0;mob=0.05 [3FA999999999999A]diff --git a/sim/Statecraft.Sim.Tests/golden/hash1952.txt b/sim/Statecraft.Sim.Tests/golden/hash1952.txtindex 73b4af8eb..b0e8af6e6 100644--- a/sim/Statecraft.Sim.Tests/golden/hash1952.txt+++ b/sim/Statecraft.Sim.Tests/golden/hash1952.txt@@ -46,7 +46,7 @@ sit[housing_crisistreasury=0 [0000000000000000]debt=224.04012071283807 [406C0148AB3BB104]-fx=-12.990431328096559 [C029FB19D0A63796]+fx=-12.99043132809653 [C029FB19D0A63786]rung=2;cf=0;mob=0.05 [3FA999999999999A]stab=0.4456162321139136 [3FDC84F9F1DFBE87]diff --git a/sim/Statecraft.Sim.Tests/golden/manifest.txt b/sim/Statecraft.Sim.Tests/golden/manifest.txtindex dfdd13013..a28f7f45c 100644--- a/sim/Statecraft.Sim.Tests/golden/manifest.txt+++ b/sim/Statecraft.Sim.Tests/golden/manifest.txt@@ -3,14 +3,14 @@# rewrites this file, the snapshots and the GoldenRun.cs constants; then update docs/determinism.md and tools/web_check.py# (GoldenManifestTests names any place that is out of date) and add a row to the rebaseline history.# gdd-0.3 has no GoldenRun entries: its reference-player policy is not defined, so GoldenRun refuses that ruleset.-hash1950 a08ff8504d862925563c8523a707b58ebe3bcaac0b504dc9ce7e028fc19eb0e4-hash1952 5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97ef-smoke5 d12c83ce94e3940f93ed21abe7c2c9957de099b2653961da90e87785e6405e79+hash1950 7d8e158b26fd2301d27361dc4912debc5085d1cc0915b2182195bd1a6cc5f6ba+hash1952 f5ebb83052aa1fed13a0f3ce0295e5620e70a34906ff0f7fc5c4ce8654ee708e+smoke5 b93ad5503dad3981b7a0de4c078b6d4323794be991a8d8343e5fe90271dc006csmoke-orders 08d9800eda4462ef165cc7ea6285fad059c030c0f87ad563e35c9789cc352d78-scenario-reckless bed7eb74b0993b491e991e9b492df9d5172d9d024a215d334310579fab70c9dc-scenario-cautious 4f3a0556f1e1b72d2acb00da238e240ea8e0212fb07c659f5b2298ed6bc43363-scenario-mvp-absorb-first f289f8972cbc81f0fe4672c517008501142b5507b0a5de6b20de1229ff3c4b46-mvp-end 5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97ef-scenario-mvp-defeat 8c83f6e0dc1e10fcb753699848d88fda3921e6812214c095b0c7a8537dd4979b-scenario-mvp-occupy-cost ad9af425c85e09c642bc05297925f374fce7cea3596761f356197555572f0fb4-scenario-mvp-annex-nazareth d0372ca656fa65aae7b68d4623d3f6c69dfe5ce900d661db187e6ac85462d92c+scenario-reckless c0eeb7ddaab6b00e2c4a93af36c59df8b569f67a95e9a7d8525e20e064226759+scenario-cautious 31ab04b0b12dddfbaaf56eb6d98c3c18a3b2f802df7fe36677dd301b98ed3e8f+scenario-mvp-absorb-first 16c8a86939f294fd89c375aaca0379ab22db638bbbc082f84e837a7a3c62e95c+mvp-end f5ebb83052aa1fed13a0f3ce0295e5620e70a34906ff0f7fc5c4ce8654ee708e+scenario-mvp-defeat 572f71ab1d0c1b7811675e2116748558d7e6b99ee5ccf453e3f398ee0f64fc52+scenario-mvp-occupy-cost eb3ae67bd7c3c661e597336679b3ea9647b1a118c128392bd57a542ff0bd80d8+scenario-mvp-annex-nazareth 3cab078b3d6efa62fc00239ca6cf170d79a6c8dfff288f46c3e1f54ca2e87487diff --git a/sim/Statecraft.Sim.Tests/golden/mvp-end.txt b/sim/Statecraft.Sim.Tests/golden/mvp-end.txtindex 73b4af8eb..b0e8af6e6 100644--- a/sim/Statecraft.Sim.Tests/golden/mvp-end.txt+++ b/sim/Statecraft.Sim.Tests/golden/mvp-end.txt@@ -46,7 +46,7 @@ sit[housing_crisistreasury=0 [0000000000000000]debt=224.04012071283807 [406C0148AB3BB104]-fx=-12.990431328096559 [C029FB19D0A63796]+fx=-12.99043132809653 [C029FB19D0A63786]rung=2;cf=0;mob=0.05 [3FA999999999999A]stab=0.4456162321139136 [3FDC84F9F1DFBE87]diff --git a/sim/Statecraft.Sim.Tests/golden/scenario-cautious.txt b/sim/Statecraft.Sim.Tests/golden/scenario-cautious.txtindex a22ad1ccd..c2ce63521 100644--- a/sim/Statecraft.Sim.Tests/golden/scenario-cautious.txt+++ b/sim/Statecraft.Sim.Tests/golden/scenario-cautious.txt@@ -43,7 +43,7 @@ pop{veterans=659531.4296791082 [41242096DBFEE66B]sit[treasury=0 [0000000000000000]-debt=40.53793189372496 [404444DAF3C98314]+debt=40.53793189372497 [404444DAF3C98316]fx=90.22947100954694 [40568EAFA72C5897]rung=2;cf=0;mob=0.05 [3FA999999999999A]diff --git a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-absorb-first.txt b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-absorb-first.txtindex 00b804306..292b73d6d 100644--- a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-absorb-first.txt+++ b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-absorb-first.txt@@ -43,7 +43,7 @@ pop{veterans=667938.2378207468 [4124624479C3A414]sit[treasury=0 [0000000000000000]-debt=280.6253282829868 [40718A01583ACB13]+debt=280.62532828298686 [40718A01583ACB14]fx=94.52989672613671 [4057A1E9D3F540F0]rung=2;cf=0;mob=0.05 [3FA999999999999A]diff --git a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txt b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txtindex 647c30e5a..e151c44d3 100644--- a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txt+++ b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txt@@ -41,7 +41,7 @@ pop{veterans=657677.6664788157 [4124121B553CB61A]sit[treasury=0 [0000000000000000]-debt=31.081471221917234 [403F14DB4C49B31E]+debt=31.08147122191724 [403F14DB4C49B320]fx=83.68904673158221 [4054EC19577663EC]rung=5;cf=0;mob=0.8 [3FE999999999999A]diff --git a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-defeat.txt b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-defeat.txtindex 31a6e627f..79d35cb93 100644--- a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-defeat.txt+++ b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-defeat.txt@@ -46,8 +46,8 @@ sit[fx_crisishousing_crisistreasury=0 [0000000000000000]-debt=297.740120712838 [40729BD788D10BB4]-fx=-74.99043132809655 [C052BF633A14C6F2]+debt=297.7401207128381 [40729BD788D10BB6]+fx=-74.99043132809652 [C052BF633A14C6F0]rung=2;cf=0;mob=0.05 [3FA999999999999A]stab=0.4594478025131746 [3FDD6797C180D779]diff --git a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-occupy-cost.txt b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-occupy-cost.txtindex a71388923..e46baa7b9 100644--- a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-occupy-cost.txt+++ b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-occupy-cost.txt@@ -40,7 +40,7 @@ pop{veterans=655829.1137019362 [412403AA3A3723E3]sit[treasury=0 [0000000000000000]-debt=17.99688825186829 [4031FF3411878A7A]+debt=17.996888251868295 [4031FF3411878A7B]fx=76.85902112083348 [405336FA33B92365]rung=5;cf=0;mob=0.8 [3FE999999999999A]diff --git a/sim/Statecraft.Sim.Tests/golden/scenario-reckless.txt b/sim/Statecraft.Sim.Tests/golden/scenario-reckless.txtindex ee3530b36..fb0ec9de4 100644--- a/sim/Statecraft.Sim.Tests/golden/scenario-reckless.txt+++ b/sim/Statecraft.Sim.Tests/golden/scenario-reckless.txt@@ -43,7 +43,7 @@ pop{veterans=659531.4296791082 [41242096DBFEE66B]sit[treasury=0 [0000000000000000]-debt=40.53793189372496 [404444DAF3C98314]+debt=40.53793189372497 [404444DAF3C98316]fx=90.22947100954694 [40568EAFA72C5897]rung=2;cf=0;mob=0.05 [3FA999999999999A]diff --git a/sim/Statecraft.Sim/GameState.cs b/sim/Statecraft.Sim/GameState.csindex 5999c76fd..dcf40d282 100644--- a/sim/Statecraft.Sim/GameState.cs+++ b/sim/Statecraft.Sim/GameState.cs@@ -155,7 +155,9 @@ namespace Statecraft.Simpublic int DisplacedByPlayer;public double TotalPopulation => PopulationLedger.IsInitialized- ? PopulationLedger.TotalPeople : Population.Values.Sum();+ ? PopulationLedger.TotalPeople+ // R-FOOD-001: in ordinal key order, since .NET does not promise a Dictionary's enumeration order and the sum feeds the economy's per-capita tax and spending (EconomySystem), which is what moves the hashed debt and fx.+ : Population.OrderBy(kv => kv.Key, StringComparer.Ordinal).Sum(kv => kv.Value);public GameState Clone(){diff --git a/sim/Statecraft.Sim/GoldenRun.cs b/sim/Statecraft.Sim/GoldenRun.csindex 6bd035981..0ad4cf4fb 100644--- a/sim/Statecraft.Sim/GoldenRun.cs+++ b/sim/Statecraft.Sim/GoldenRun.cs@@ -16,13 +16,13 @@ namespace Statecraft.Sim/// <summary>Final hash of Play(content, Until1950). Changing it is a deliberate rules or content change: the value/// is pinned in sim/Statecraft.Sim.Tests/golden/manifest.txt, and STATECRAFT_UPDATE_GOLDEN=1 dotnet test rewrites/// both (docs/determinism.md). Say why in the commit message.</summary>- public const string Hash1950 = "a08ff8504d862925563c8523a707b58ebe3bcaac0b504dc9ce7e028fc19eb0e4";+ public const string Hash1950 = "7d8e158b26fd2301d27361dc4912debc5085d1cc0915b2182195bd1a6cc5f6ba";public static readonly DateTime Until1950 = new DateTime(1950, 1, 1);/// <summary>Final hash of Play(content, Until1952): the M3 content range (to 31 December 1951). The GDD game ends on/// 15 January 1952 (R-LOOP-004), the first turn on or after Until1952, so this is also the mvp-end run.</summary>- public const string Hash1952 = "5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97ef";+ public const string Hash1952 = "f5ebb83052aa1fed13a0f3ce0295e5620e70a34906ff0f7fc5c4ce8654ee708e";public static readonly DateTime Until1952 = new DateTime(1952, 1, 1);diff --git a/tools/web_check.py b/tools/web_check.pyindex 1f3ae84fa..a86704592 100644--- a/tools/web_check.py+++ b/tools/web_check.py@@ -8,7 +8,7 @@ fail on a failure line or a timeout. Uses Chrome for Testing from the Playwright--enable-logging=stderr --v=1 as INFO:CONSOLE... "text", source: ...Usage (from the repo root):- uv run tools/web_check.py unity/Builds/Web-disabled --query "golden" --expect "GOLDEN OK hash1950 a08ff8504d862925563c8523a707b58ebe3bcaac0b504dc9ce7e028fc19eb0e4" --expect "GOLDEN OK hash1952 5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97ef"+ uv run tools/web_check.py unity/Builds/Web-disabled --query "golden" --expect "GOLDEN OK hash1950 7d8e158b26fd2301d27361dc4912debc5085d1cc0915b2182195bd1a6cc5f6ba" --expect "GOLDEN OK hash1952 f5ebb83052aa1fed13a0f3ce0295e5620e70a34906ff0f7fc5c4ce8654ee708e"uv run tools/web_check.py unity/Builds/Web-disabled --query "smoke-orders" --expect "SMOKE ORDERS OK 1948-06-15 08d9800eda4462ef165cc7ea6285fad059c030c0f87ad563e35c9789cc352d78"(the smoke-orders golden: one Move given through the unit card, docs/determinism.md)Every run needs a positive check: a nonblank --expect, --startscreen, --persistence or --first-save (#2690).