A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Annexing a stayed town adds its residents to the national population (Fixes #2608) (#2620)
Beri2065f1521ec4
diff --git a/changelog.d/2608-annexed-residents-population.md b/changelog.d/2608-annexed-residents-population.mdnew file mode 100644index 000000000..a8153af6d--- /dev/null+++ b/changelog.d/2608-annexed-residents-population.md@@ -0,0 +1,7 @@+- Annexing a town whose residents stayed now adds them to the nation's population record (Fixes #2608). Before, the new+ city held its people but the national count left them out. They join their own group, so the record of who arrived+ from where is unchanged. The bigger population feeds the economy and needs more Food, so a game that annexes+ Nazareth ends with slightly different debt, foreign currency and Food. A town whose residents fled still adds no one.+- The end screen's population line now names what it compares with: the game's population counts annexed residents,+ so the CBS figure beside it is labelled as the Jewish population. The absorption objective reads the same total, so+ annexing a stayed town can bring its 1,000,000 milestone a little earlier.diff --git a/content/objectives.yaml b/content/objectives.yamlindex 9f20e217c..058626c06 100644--- a/content/objectives.yaml+++ b/content/objectives.yaml@@ -46,7 +46,7 @@ objectives:name: Absorb the immigrantsname_he: קליטת העוליםname_he_review: agent-checked- # R-OBJ-004 (D-B4; owner, 18 October 2026, #738, option (a)): once the Jewish population has reached the milestone,+ # R-OBJ-004 (D-B4; owner, 18 October 2026, #738, option (a)): once the population has reached the milestone,# the cities' overflow is at most a share of the people they house and their employed at least a share of civilians.# Then changed (3 Nov 2026): the employed share is over civilians and craftsmen, as R-CITY-005 counts them (owner, #1714:# "Both rulesets (Recommended)").diff --git a/docs/determinism.md b/docs/determinism.mdindex 786e01cbc..cf1c45294 100644--- a/docs/determinism.md+++ b/docs/determinism.md@@ -35,7 +35,7 @@ The simulation must produce the same state, bit for bit, on .NET, Unity Mono andits hex, with no RNG draw (R-CTRL-011 to R-CTRL-013; `OccupyTests.TheTimerCountsDownInStepTen` and`OccupationDrawsNothing`). `mvp-occupy-cost` (#798) is the golden that occupies a place: it plays the real content, movesGolani's unit onto Nazareth, answers the capture with Occupy and runs to the end of the timer; `OccupyTests` plays the- same run on fixture content. `mvp-annex-nazareth` (#799) plays the same run and annexes Nazareth when the timer ends (R-CTRL-016): one new city from the row's count, with no RNG draw (`EndOccupationTests`). No other golden occupies a place, so none moves.+ same run on fixture content. `mvp-annex-nazareth` (#799) plays the same run and annexes Nazareth when the timer ends (R-CTRL-016): one new city from the row's count, with no RNG draw (`EndOccupationTests`), and the same count joins `GameState.Population`'s `annexed` group (R-CITY-008, #2608), which moved this golden's population, debt, FX and Food lines. No other golden occupies a place, so none moves.- **Deport (resolver step 10, after the occupation timers):** the units leave as in Raid; the costs, the drag (each turn,per place in `DisplacedByPlayer`) and the International Support ceiling are plain arithmetic on the indicator's shift,with no RNG draw (R-CTRL-018; `DeportTests.DeportDrawsNothing`). `DisplacedByPlayer` is hashed as `displaced=` only when@@ -511,3 +511,4 @@ 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-defeat | `8c83f6e0` | as absorb-first (was `6782cce4`) || #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`) |diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex b4fbdb552..5639a72f7 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -64,7 +64,7 @@ R-CTRL-014: `EndOccupation(settlement, outcome)` answers the end of an occupatioR-CTRL-015: No puppet regime (Q-PUP-1 (c), owner, 18 October 2026, #783). `SettlementControl.EndOptions(content, state, settlement)` offers Annex and Withdraw, in that order (the ruling's words, "annex or withdraw"), with no default or selected flag, each with its refusal or its preview as `CaptureOptions` (R-CTRL-008); it is empty when the place is not awaiting the end. Withdraw is R-CTRL-010's withdrawal, the same code path.-R-CTRL-016: Annexation and the residents (Q-ANNEX-1, owner, 18 October 2026, #783; OWNER QUESTIONS 1 (a) and 3 (a), owner, 24 October 2026, #799). The record becomes `owner=israel,state=annexed`, keeping its capture date and `fled`, with no timer. A fled place adds nothing else: no city, people, housing, jobs, Food, Money, Arms, indicator change, score or objective progress ("Territory only, no gain"). A stayed place adds one city by the starting-city rule: its row's `annexation.people` (a sourced count the owner approves) in population units (R-CITY-007), housing equal to them, job slots equal to the employed (people times `annexation.employed_share`, the national share 0.439, to the nearest unit), the condition `mvp.housing_start_condition`, and no refugees, recruits or craftsmen; refused, the state unchanged, if the id is already a city. Each target row says `residents: fled` or `stayed` with at least one source (`residents_sources`); only a stayed row has an `annexation` block, whose `people` must be a sourced whole number; any other row is a load error naming file and field. The town stays Israeli for good: step 10 ignores an annexed record, so the upkeep stops and no unit has to stay, and an annexed target is no enemy-held locality for movement (R-MOVE-005, R-ENEMY-001). A city that exists only in state has no training facility.+R-CTRL-016: Annexation and the residents (Q-ANNEX-1, owner, 18 October 2026, #783; OWNER QUESTIONS 1 (a) and 3 (a), owner, 24 October 2026, #799). The record becomes `owner=israel,state=annexed`, keeping its capture date and `fled`, with no timer. A fled place adds nothing else: no city, people, housing, jobs, Food, Money, Arms, indicator change, score or objective progress ("Territory only, no gain"). A stayed place adds one city by the starting-city rule: its row's `annexation.people` (a sourced count the owner approves) in population units (R-CITY-007), housing equal to them, job slots equal to the employed (people times `annexation.employed_share`, the national share 0.439, to the nearest unit), the condition `mvp.housing_start_condition`, and no refugees, recruits or craftsmen, and the same approved people join `GameState.Population` (R-CITY-008; owner, 4 November 2026, #2608, the option labelled "Yes, add them (Recommended)"), in a group of their own, `annexed`, unless an initialized gdd-0.3 ledger keeps the record (the separate group and that exception are this change's design, not the owner's ruling); refused, the state unchanged, if the id is already a city. Each target row says `residents: fled` or `stayed` with at least one source (`residents_sources`); only a stayed row has an `annexation` block, whose `people` must be a sourced whole number; any other row is a load error naming file and field. The town stays Israeli for good: step 10 ignores an annexed record, so the upkeep stops and no unit has to stay, and an annexed target is no enemy-held locality for movement (R-MOVE-005, R-ENEMY-001). A city that exists only in state has no training facility.R-CTRL-017: A depopulated place (Deport) is never offered or given `EndOccupation`, so it is never annexed (Q-ANNEX-2 (a), owner, 18 October 2026, #783). The owner's rulings of 27 October 2026 on #1712 (https://github.com/eyalgolan/statecraft-israel/issues/1712#issuecomment-6461246243) and of 1 November 2026 ("30 Oct wins for the MVP (Recommended)") leave it as written. It holds unchanged under gdd-0.3 (`EndOccupationTests.ADepopulatedPlaceIsNeverAnnexed`).@@ -104,7 +104,7 @@ Synthetic regional fixtures additionally enforce R-CITY-001/002 and R-CITY-006:R-CITY-003: Arrivals from the CBS series (`aliyah.yaml`) become refugees in the cities. Let `P(t)` be the people the series brings from `city_arrivals_from` to the date `t` (0 before it), summed over the origin groups in ordinal order. `city_arrivals_from` is 8 November 1948, the census day the cities' start values count: the census already holds the people who arrived from 15 May, so the cities take none before it (Q-ARRV-3, owner, 15 October 2026). The cities' arrived units by `t` are `U(t) = floor(P(t) / people_per_unit)`, and a turn from date `d` to date `e` adds `U(e) - U(d)` refugees over all cities. `people_per_unit` and `city_arrivals_from` are the same in every era (the loader refuses an era that changes either), so over any run of turns the refugees added are `U(end) - U(start)`: no unit is lost or counted twice. The units are split in proportion to the cities' census `people` (Q-ARRV-1): the first `U` units are handed out one at a time, unit `n` to the city with the largest remainder `n * people / total people - units it holds`, a tie to the lower city id (ordinal), and a turn gives each city its share of `U(e)` minus its share of `U(d)`. Building the split up one unit at a time keeps it cumulative: a fresh largest-remainder split of each total could take a unit back from a city as the total grows (the Alabama paradox; on the twelve cities it first happens at 7 units). The loader refuses a GDD game with no city.-R-CITY-008: Under legacy/gdd-0.1, `GameState.Population` is the one record of the nation's people: it takes every arrival from 15 May 1948 and is the count the CBS anchors check. The cities are the part of it placed in towns, so their people (civilians, craftsmen, refugees, recruits and the groups in training, times `people_per_unit`) never exceed it (Q-ARRV-2, owner, 15 October 2026). No person is counted twice. In initialized gdd-0.3 fixtures, the own-population ledger is authoritative instead: profession, employment, training and captivity are attributes/statuses of the same ids (R-POP-001), never extra people. No old headcount is rounded into ledger records.+R-CITY-008: Under legacy/gdd-0.1, `GameState.Population` is the one record of the nation's people: it takes every arrival from 15 May 1948 and is the count the CBS anchors check. The cities are the part of it placed in towns, so their people (civilians, craftsmen, refugees, recruits and the groups in training, times `people_per_unit`) never exceed it (Q-ARRV-2, owner, 15 October 2026). No person is counted twice. A stayed town's annexation (R-CTRL-016) adds its approved people to `GameState.Population` (owner, 4 November 2026, #2608, the option labelled "Yes, add them (Recommended)"; `EndOccupationTests.AnnexingAStayedPlaceAddsItsPeopleToThePopulationAndAFledOneAddsNone`). They go in a group of their own, `annexed`, not an aliyah origin, and an initialized gdd-0.3 ledger fixture is left alone (`EndOccupationTests.AnnexingIntoAnInitializedGdd03LedgerLeavesThePopulationAlone`); both are this change's design, not the owner's ruling. The total (`GameState.TotalPopulation`) counts them wherever the game reads it (owner, 4 November 2026, the option labelled "Count them everywhere", https://github.com/eyalgolan/statecraft-israel/pull/2620#pullrequestreview-5777301237), so it is the whole population, no longer the Jewish population alone. In initialized gdd-0.3 fixtures, the own-population ledger is authoritative instead: profession, employment, training and captivity are attributes/statuses of the same ids (R-POP-001), never extra people. No old headcount is rounded into ledger records.R-CITY-004: Each turn, on the housing step, a city's refugees become civilians without a job (R-CITY-009's default may then give them jobs), `floor(pool x m)` of them at the Immigration minister's multiplier since the ministers (R-MIN-002; all of them before); the rest wait as refugees for the next turns. There is no hard cap (D-D1, Q-HOUSE-1, owner, 15 October 2026): the people beyond the city's housing stay in the city as its overflow (R-HOUSE-002), and residents are housed automatically (Q-HOUSE-4).@@ -412,7 +412,7 @@ R-OBJ-002: Recording a standalone objective adds `objective_points + min(objectiR-OBJ-003: An event with `objective:` is that objective's card. It is eligible only once its objective is recorded, so it fires once, at the end of the turn the objective is completed in, and never in the legacy loop. It takes no soft-event slot, like a Deport card (owner, 4 November 2026, #2605: "Always that turn (Recommended)"). That holds on the turn that ends the game too (the dated end of R-LOOP-004, or a defeat): its objective cards, and the card of any objective recorded earlier that has not fired yet, fire then, without the cap, and no other event does; and Unity shows them before the end screen (owner, 4 November 2026, #2536: "Show the card (Recommended)"). Answering one there is no order and changes nothing: the score is the one step 11 recorded. A card has exactly one option, and an objective and its card name each other (the loader checks both). An unanswered card resolves to its option without drawing from the RNG.-R-OBJ-004: An objective may instead name `completes_when: { absorbed: { population_at_least, overflow_at_most, employed_at_least } }` (D-B4; owner, 18 October 2026, #738, option (a)). It holds at step 11 once the Jewish population (`GameState.TotalPopulation`, the national count as step 11 reads it, before the turn's population step) is at or above `population_at_least`, and then the cities' overflow (R-HOUSE-002), summed, is at most `overflow_at_most` of their housed people (R-HOUSE-003), summed, and their employed, summed, are at least `employed_at_least` of their civilians and craftsmen, summed (as R-CITY-005 counts them; owner, 3 November 2026, #1714: "Both rulesets (Recommended)", so gdd-0.1 and gdd-0.3 alike). Refugees waiting do not count: each turn's arrivals (step 9) wait at step 11, after housing (step 8). The gate keeps the census start values (41% employed, no overflow) from completing it on the first turn. Sums are integers, compared with the decimal share, so city order cannot change the result. An objective names exactly one kind; all three keys are required (a missing key is never read as 0), the shares are from 0 to 1 and the population above 0 (the loader). Recorded and scored as R-OBJ-001 and R-OBJ-002 say; its card follows R-OBJ-003.+R-OBJ-004: An objective may instead name `completes_when: { absorbed: { population_at_least, overflow_at_most, employed_at_least } }` (D-B4; owner, 18 October 2026, #738, option (a)). It holds at step 11 once the population (`GameState.TotalPopulation`, the national count as step 11 reads it, before the turn's population step, annexed residents included, R-CITY-008) is at or above `population_at_least`, and then the cities' overflow (R-HOUSE-002), summed, is at most `overflow_at_most` of their housed people (R-HOUSE-003), summed, and their employed, summed, are at least `employed_at_least` of their civilians and craftsmen, summed (as R-CITY-005 counts them; owner, 3 November 2026, #1714: "Both rulesets (Recommended)", so gdd-0.1 and gdd-0.3 alike). Refugees waiting do not count: each turn's arrivals (step 9) wait at step 11, after housing (step 8). The gate keeps the census start values (41% employed, no overflow) from completing it on the first turn. Sums are integers, compared with the decimal share, so city order cannot change the result. An objective names exactly one kind; all three keys are required (a missing key is never read as 0), the shares are from 0 to 1 and the population above 0 (the loader). Recorded and scored as R-OBJ-001 and R-OBJ-002 say; its card follows R-OBJ-003. The shipped milestone, 1,000,000, stays Q-ABS-1's sourced number for the Jewish population; since the total counts annexed residents (owner, 4 November 2026, "Count them everywhere", #2620), a game that annexes a stayed town may reach it earlier.For R-OBJ-004, the preceding active gdd-0.1 rule remains unchanged. The gdd-0.3 addition is an inactive, synthetic-only boundary: `Gdd03SyntheticAbsorptionBoundary.HoldsForSyntheticSettledFacts` accepts supplied represented own units, a canonical refugee-awaiting-legal-bed flag, ordinary-housing overflow/demand and employed/all-free-civilian counts; it neither produces nor classifies them (`sim/Statecraft.Sim/Gdd03SyntheticAbsorptionBoundary.cs:6-25@1e4b8a248`). Source: `docs/gdd/objective-card.md:19@605277dfa511dc512562ececeb273b8393b21d35`, "Empty denominators mean no overflow/full employment." and "Reference remains 20 December 1949"; `docs/gdd/balance.md:195-196` at that source revision gives the exceeded population target and inclusive percentage limits.@@ -490,7 +490,7 @@ D-H4 as decided (owner, 17 October 2026, #784: Q-END-1 and Q-END-2 as recommendeR-END-005: Once the game has ended, the end report lists the outcome (the `GameOver` code), the end date, the state's score as it stands, every objective in `objectives.yaml` order with its historical date and, when completed, the player's date and the months from history (`Objectives.MonthsFromHistory`), any Deport card that never fired although its place was depopulated (a Deport on the last turn, R-EVT-007), and the two national parameters, Social cohesion and International Support, with no historical value. It is pure: it computes no rule, writes nothing, and two calls give the same report with the state hash unchanged. A game still on has no report.-R-END-006: The report compares one measure with history (Q-END-2): the Jewish population at the end against the latest CBS anchor in `population.yaml` dated on or before the end, given with that anchor's date and sources. A game that ends before the first anchor has no comparison. No other value is compared, and none is invented.+R-END-006: The report compares one measure with history (Q-END-2): the population at the end (`GameState.TotalPopulation`, annexed residents included, R-CITY-008) against the latest CBS anchor of the Jewish population in `population.yaml` dated on or before the end, the anchor labelled as the Jewish population, given with that anchor's date and sources. A game that ends before the first anchor has no comparison. No other value is compared, and none is invented.## Governmentdiff --git a/sim/Statecraft.Sim.Tests/EndOccupationTests.cs b/sim/Statecraft.Sim.Tests/EndOccupationTests.csindex 69b6f01d5..f53f7f59c 100644--- a/sim/Statecraft.Sim.Tests/EndOccupationTests.cs+++ b/sim/Statecraft.Sim.Tests/EndOccupationTests.cs@@ -183,6 +183,44 @@ public class EndOccupationTestsAssert.Equal(cities + 1, s.Cities.Count);}+ // R-CITY-008, R-CTRL-016 (owner on #2608, 4 November 2026: "Yes, add them (Recommended)"): a stayed town's 60 approved+ // people join GameState.Population (in the annexed group, our design), so the national record still holds every+ // city's people. A fled town adds no one ("Territory only, no gain").+ [Fact]+ public void AnnexingAStayedPlaceAddsItsPeopleToThePopulationAndAFledOneAddsNone()+ {+ var c = CaptureTests.Load(CaptureTests.AllTargets); // fixture rows are stayed, people 60+ var s = AwaitingEnd(c, "town_c", false, Soldier(1, 4, 0));+ var (total, before) = (s.TotalPopulation, new Dictionary<string, double>(s.Population));+ Assert.DoesNotContain(Cities.AnnexedGroup, before.Keys);+ Assert.Null(SettlementControl.End(c, s, "town_c", SettlementControl.Annex, new List<Cause>()));+ Assert.Equal(60d, s.Population[Cities.AnnexedGroup]);+ Assert.Equal(total + 60, s.TotalPopulation);+ Assert.All(before, kv => Assert.Equal(kv.Value, s.Population[kv.Key])); // the other groups are untouched++ var fled = CaptureTests.LoadFled(new[] { "town_a" }, CaptureTests.AllTargets);+ var f = AwaitingEnd(fled, true, Soldier(1, 1, 0));+ var pop = new Dictionary<string, double>(f.Population);+ Assert.Null(SettlementControl.End(fled, f, "town_a", SettlementControl.Annex, new List<Cause>()));+ Assert.Equal(pop, f.Population);+ }++ // R-CITY-008 (#2620 review): an initialized gdd-0.3 ledger fixture keeps its own record of people (R-POP-001), so+ // annexing a stayed real town there still adds its city but leaves GameState.Population as it was.+ [Fact]+ public void AnnexingIntoAnInitializedGdd03LedgerLeavesThePopulationAlone()+ {+ var c = PlayerRegionsContentTests.Load(File.ReadAllText(Path.Combine(RealContentTests.ContentRoot(), "regions.yaml")));+ var s = PlayerRegions.CreateFixture(c,+ c.PlayerRegions.Regions.Keys.Select(id => new PlayerRegionPool(id, 0, 0m, 0, 0, Array.Empty<PlayerRegionFacility>())),+ Array.Empty<PopulationInventoryRow>(), Array.Empty<PopulationTarget>(), Array.Empty<string>(), Array.Empty<string>());+ Assert.True(s.PopulationLedger.IsInitialized);+ var pop = new Dictionary<string, double>(s.Population);+ Assert.Null(Cities.Annex(c, s, c.SettlementTargets.Single(x => x.Id == "nazareth")));+ Assert.Contains("nazareth", s.Cities.Keys);+ Assert.Equal(pop, s.Population);+ }+// R-CTRL-016: an id that is already a city is refused, the state unchanged (Cities.Annex adds one city, never two).[Fact]public void AnnexingOntoAnExistingCityIsRefused()diff --git a/sim/Statecraft.Sim.Tests/golden/manifest.txt b/sim/Statecraft.Sim.Tests/golden/manifest.txtindex cf6d45956..dfdd13013 100644--- a/sim/Statecraft.Sim.Tests/golden/manifest.txt+++ b/sim/Statecraft.Sim.Tests/golden/manifest.txt@@ -13,4 +13,4 @@ scenario-mvp-absorb-first f289f8972cbc81f0fe4672c517008501142b5507b0a5de6b20de12mvp-end 5561fc51a03a25e7bad499bd2c9d8de156dea241118ac4c80bbf2e0fb50c97efscenario-mvp-defeat 8c83f6e0dc1e10fcb753699848d88fda3921e6812214c095b0c7a8537dd4979bscenario-mvp-occupy-cost ad9af425c85e09c642bc05297925f374fce7cea3596761f356197555572f0fb4-scenario-mvp-annex-nazareth e8a9dbf10a7cda254619bf0fc32f7444ea37977994e722ca8257c16c23b92ddf+scenario-mvp-annex-nazareth d0372ca656fa65aae7b68d4623d3f6c69dfe5ce900d661db187e6ac85462d92cdiff --git a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txt b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txtindex a26d16d89..647c30e5a 100644--- a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txt+++ b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-annex-nazareth.txt@@ -34,14 +34,15 @@ bud{pop{africa=13083.414956040986 [40C98DB51D4790A8]america_oceania=656.5760557984527 [4084849BC3247834]+ annexed=17041.900139280137 [40D0A4799BE1C882]asia=13608.247349747442 [40CA941FA92811F8]europe=92107.08315677792 [40F67CB1549C339A]unknown=12647.33242354208 [40C8B3AA8CDAC8D4]veterans=657677.6664788157 [4124121B553CB61A]sit[treasury=0 [0000000000000000]-debt=30.94210973710249 [403EF12E1A8E192E]-fx=84.39862659316444 [40551983191D3D42]+debt=31.081471221917234 [403F14DB4C49B31E]+fx=83.68904673158221 [4054EC19577663EC]rung=5;cf=0;mob=0.8 [3FE999999999999A]stab=0.626287693608005 [3FE40A8C7D3DE075]@@ -121,5 +122,5 @@ ctrl{beersheba=owner=israel,state=awaiting_choice,since=1949-01-15,fled=1nazareth=owner=israel,state=annexed,since=1948-07-15ramla=owner=israel,state=awaiting_choice,since=1948-09-15,fled=1-food=2304,768,0+food=2355,785,0arms=12\ No newline at end of filediff --git a/sim/Statecraft.Sim/Cities.cs b/sim/Statecraft.Sim/Cities.csindex 8646b790a..7f8dd8f17 100644--- a/sim/Statecraft.Sim/Cities.cs+++ b/sim/Statecraft.Sim/Cities.cs@@ -45,7 +45,8 @@ namespace Statecraft.Sim/// <summary>R-CTRL-016 (OWNER QUESTION 1 (a) on #799, the starting-city rule): a stayed target joins the player's/// population as one new city: its approved people in units (R-CITY-007), homes equal to them, jobs equal to the/// employed (people times employed_share to the nearest unit), the usual start condition, and no refugees, recruits or- /// craftsmen. Null when added, else the reason with the state unchanged (the id is already a city).</summary>+ /// craftsmen. Its approved people join GameState.Population's annexed group (R-CITY-008). Null when added, else the+ /// reason with the state unchanged (the id is already a city).</summary>internal static string? Annex(Content c, GameState s, SettlementTarget t){if (s.Cities.ContainsKey(t.Id)) return $"{c.SettlementNames[t.Id]} is already a city";@@ -54,9 +55,18 @@ namespace Statecraft.Simvar units = StartUnits(people, r.PeoplePerUnit);var employed = NearestUnit(people * t.Annexation.EmployedShare!.Value, r.PeoplePerUnit);s.Cities[t.Id] = new City(t.Id, units, employed, units, employed, 0, 0, r.HousingStartCondition!.Value);+ // R-CITY-008 (owner on #2608, "Yes, add them (Recommended)"): the city's people are part of the nation's record,+ // so its approved count joins it. Our design, not the ruling: they get their own group, and an initialized gdd-0.3+ // ledger fixture keeps its own record of people (R-POP-001) and is left alone.+ if (!s.PopulationLedger.IsInitialized)+ s.Population[AnnexedGroup] = (s.Population.TryGetValue(AnnexedGroup, out var had) ? had : 0) + (double)people;return null;}+ /// <summary>R-CITY-008, R-CTRL-016: the GameState.Population group an annexed town's residents join. Their own key,+ /// not an aliyah origin, so the record of who arrived from where stays the sourced series.</summary>+ public const string AnnexedGroup = "annexed";+/// <summary>Fills the state's cities from cities.yaml, with no refugees yet and the start housing condition (R-HOUSE-001). Does nothing in the legacy loop.</summary>public static void Init(Content c, GameState s){diff --git a/sim/Statecraft.Sim/Content.cs b/sim/Statecraft.Sim/Content.csindex cd5ceb09e..65d27417c 100644--- a/sim/Statecraft.Sim/Content.cs+++ b/sim/Statecraft.Sim/Content.cs@@ -1274,13 +1274,13 @@ namespace Statecraft.Simpublic List<string> SitesBuilt { get; set; } = new List<string>();}- /// <summary>R-OBJ-004 (D-B4; owner, 18 October 2026, #738, option (a)): once the Jewish population has reached+ /// <summary>R-OBJ-004 (D-B4; owner, 18 October 2026, #738, option (a)): once the population has reached/// <see cref="PopulationAtLeast"/>, the cities' overflow is at most <see cref="OverflowAtMost"/> of the people they house/// and their employed civilians at least <see cref="EmployedAtLeast"/> of their civilians. The population gate keeps the/// start values (already 41% employed, no overflow) from completing it on the first turn.</summary>public sealed class AbsorbCondition{- /// <summary>GameState.TotalPopulation, the national Jewish count, at or above this.</summary>+ /// <summary>GameState.TotalPopulation, the national count with annexed residents (R-CITY-008), at or above this.</summary>public long PopulationAtLeast { get; set; }/// <summary>Overflow (R-HOUSE-002) over the housed people (R-HOUSE-003), at or below this share. Required: 0 is a/// real value here, so a missing key must not read as 0.</summary>diff --git a/sim/Statecraft.Sim/EndReport.cs b/sim/Statecraft.Sim/EndReport.csindex 87a4ee611..e3796fb84 100644--- a/sim/Statecraft.Sim/EndReport.cs+++ b/sim/Statecraft.Sim/EndReport.cs@@ -31,10 +31,11 @@ namespace Statecraft.Sim/// Support), shown without a historical value (Q-END-2).</summary>public double SocialCohesion { get; }public double InternationalSupport { get; }- /// <summary>The Jewish population at the end (<see cref="GameState.TotalPopulation"/>).</summary>+ /// <summary>The population at the end (<see cref="GameState.TotalPopulation"/>): every group, annexed residents included+ /// (R-CITY-008), so no longer the Jewish population alone.</summary>public double Population { get; }- /// <summary>The one comparison with history (Q-END-2, R-END-006): the latest CBS anchor (population.yaml) dated on or- /// before <see cref="Date"/>, with its sources; null when the game ended before the first anchor.</summary>+ /// <summary>The one comparison with history (Q-END-2, R-END-006): the latest CBS anchor of the Jewish population+ /// (population.yaml) dated on or before <see cref="Date"/>, with its sources; null when the game ended before the first anchor.</summary>public PopulationAnchor? PopulationHistory { get; }/// <summary>The prisoners returned in the exchanges (Q-END-3, R-POW-004), in people as Defence shows them/// (<see cref="GameState.PrisonersReturned"/> units times the people per unit); 0 when none went home.</summary>diff --git a/sim/Statecraft.Sim/Objectives.cs b/sim/Statecraft.Sim/Objectives.csindex 230bebc68..4c0f27e8d 100644--- a/sim/Statecraft.Sim/Objectives.cs+++ b/sim/Statecraft.Sim/Objectives.cs@@ -55,7 +55,7 @@ namespace Statecraft.Sim: o.CompletesWhen.SitesBuilt.Count > 0 ? o.CompletesWhen.SitesBuilt.All(id => s.Sites.TryGetValue(id, out var site) && site.BuiltOn != null): s.Sites.TryGetValue(o.CompletesWhen.SiteBuilt, out var w) && w.BuiltOn != null;- /// <summary>R-OBJ-004 (D-B4; owner, 18 October 2026, #738, option (a)): once the Jewish population (the national count,+ /// <summary>R-OBJ-004 (D-B4; owner, 18 October 2026, #738, option (a)): once the population (the national count,/// as it stands when step 11 runs, before the turn's population step) has reached the gate, the cities' overflow is at/// most its share of the people they house and their employed at least its share of their civilians and craftsmen, as/// R-CITY-005 counts them (Cities.EmployedShare; owner, 3 November 2026, #1714: "Both rulesets (Recommended)", sodiff --git a/sim/Statecraft.Sim/PopulationSystem.cs b/sim/Statecraft.Sim/PopulationSystem.csindex 50d2a15bf..2c8e0e921 100644--- a/sim/Statecraft.Sim/PopulationSystem.cs+++ b/sim/Statecraft.Sim/PopulationSystem.cs@@ -4,7 +4,7 @@ using System.Linq;namespace Statecraft.Sim{- /// <summary>Jewish population by origin group. Historical mode takes arrivals from the sourced aliyah series.</summary>+ /// <summary>Population by origin group, plus the annexed residents' own group (R-CITY-008). Historical mode takes arrivals from the sourced aliyah series.</summary>public static class PopulationSystem{public static void Init(Content c, GameState s)diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yamlindex 7ff135df2..2243de26d 100644--- a/unity/Assets/UI/strings.en.yaml+++ b/unity/Assets/UI/strings.en.yaml@@ -547,7 +547,7 @@ end.objective_done: "{0}: completed on {1}; historically {2}"end.objective_open: "{0}: not completed; historically {1}"end.parameter: "{0}: {1}"end.population: "Population: {0}"-end.population_history: "Population: {0}; CBS, {1}: {2}"+end.population_history: "Population: {0}; CBS, Jewish population, {1}: {2}"end.date: "Ended on {0}"cabinet.coalition: "Coalition: {0} of {1} {3} · stability {2}"cabinet.vacant: "(vacant)"diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yamlindex fde650c09..366d7768e 100644--- a/unity/Assets/UI/strings.he.yaml+++ b/unity/Assets/UI/strings.he.yaml@@ -628,7 +628,9 @@ report.workshop_paused_debt: "סדנת נשק ({0}) בהמתנה: תקרת החreport.workshop_arms_n: "סדנאות נשק ({0}) ({1}): תוספת נשק: {1}"report.workshop_paused_debt_n: "סדנאות נשק ({0}) ({1}) בהמתנה: תקרת החוב"# The end screen (#812; D-H4): the sim's end report, formatted only. For the native reviewer (#564).-# The nine end.* keys below: native review: owner, 3 Nov 2026 (HE batch 3: "Approve all as they are").+# The nine end.* keys below: native review: owner, 3 Nov 2026 (HE batch 3: "Approve all as they are"), except+# end.population_history, reworded for #2608 (#2620: the CBS figure is the Jewish population), which waits for the+# native reviewer (#564).end.title: "המשחק הסתיים"end.outcome.mvp_ended: "המשחק הגיע לתורו האחרון."end.outcome.defeat_economy: "הכסף והמזון אזלו."@@ -637,7 +639,7 @@ end.objective_done: "יעד {0}: הושלם ב־{1}; בהיסטוריה ב־{2}"end.objective_open: "יעד {0}: לא הושלם; בהיסטוריה ב־{1}"end.parameter: "{0}: {1}"end.population: "אוכלוסייה: {0}"-end.population_history: "אוכלוסייה: {0}; לפי הלמ״ס {2} ב־{1}"+end.population_history: "אוכלוסייה: {0}; האוכלוסייה היהודית לפי הלמ״ס ב־{1}: {2}"# For the native reviewer (#564): the end screen's end date (#2545).end.date: "הסתיים ב־{0}"