A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
GDD 0.3: bring back clothing_rationing_1950, reparations_claim and reparations_vote (#2229)
Eyal Golanc8384e00849f
diff --git a/changelog.d/2224-gdd03-restore-3-cards.md b/changelog.d/2224-gdd03-restore-3-cards.mdnew file mode 100644index 000000000..df5c982fb--- /dev/null+++ b/changelog.d/2224-gdd03-restore-3-cards.md@@ -0,0 +1,4 @@+### Changed+- Under the GDD 0.3 rules three cards are back in play: Rationing Clothes and Shoes (1950), the reparations claim+ (1951) and the reparations vote (1951). Foreign currency stays the internal ledger, so their effects load as written.+ Israel Bonds and four other cards stay out (#2224).diff --git a/content/gdd03-events.yaml b/content/gdd03-events.yamlindex 61fa25769..a06e6c519 100644--- a/content/gdd03-events.yaml+++ b/content/gdd03-events.yaml@@ -5,8 +5,6 @@ ruleset: gdd-0.3exclusions:- id: austerity_1949reason: Rationing policy, Food supply readout and foreign-currency effects need approved contracts.- - id: clothing_rationing_1950- reason: Foreign-currency import spending has no approved gdd-0.3 ledger mapping.- id: forex_crisis_1951reason: Foreign-currency debit and aid, with Food supply effects, need authored ledger and stock contracts.- id: iraqi_exodus@@ -15,7 +13,3 @@ exclusions:reason: Foreign-currency bond grants need an approved ledger mapping and authored debt terms.- id: maabarot_policyreason: Maabarot policy and national housing effects need approved facility and population accounting.- - id: reparations_claim- reason: Coupled foreign-currency refusal cost has no approved gdd-0.3 ledger mapping.- - id: reparations_vote- reason: Coupled foreign-currency refusal cost has no approved gdd-0.3 ledger mapping.diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex fa52f8baf..b59167632 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -472,7 +472,7 @@ R-NAT-004: "Low international support" (`low_intl_support`) is a situation on `iR-EFX-001: In legacy and gdd-0.1, an option's effect may target an indicator id from `model.yaml`, `treasury` or `fx_reserves` (game money), or `food`, the national Food stock: the effect moves the stock by whole units (the delta rounds half away from zero) and the stock never drops below 0, so a cut larger than the stock applies only to what is there. Any other target is a load error naming file and field. The Arms stock becomes a target with its pool (#781): `arms` moves it the same way.-Under gdd-0.3 (#1718, first slice landed in PR #1772 on 26 October 2026): only the active event catalogue is simulated. `content/gdd03-events.yaml` is required, read and hashed only for this identity; it explicitly excludes whole cards by id with a reason. Unknown or duplicate exclusions and stranded requirements, variants, rejoin edges or objective cards are errors. All source YAML is still parsed strictly. Eight legacy cards are excluded without changing their source bytes or reviews. There are no replacement amounts. Approved indicator writes and explicit `treasury`, `food`, `arms` effects retain finite checks, stock rounding and bounds. Writable `food_supply`, national `housing`, Attention and city-loss/defeat command targets are rejected before compatibility-indicator acceptance. Under decision D1 and answers Q1 and Q2 (owner, 1 November 2026, "Approve all six (Recommended)" on #1668) the passive budget, the monthly Food refill and the foreign-currency ledger stay, so `fx_reserves` and the budget and Food-refill spellings load under gdd-0.3 exactly as under gdd-0.1: `fx_reserves` moves the ledger, and a budget or refill spelling is accepted only where `model.yaml` defines it, otherwise it is an unknown target. Retired `rationing` and `maabarot` policy writes are errors. Structured `grant_units`, `city_effects` and `unlock_projects` await approved population/facility accounting and are errors in this slice. Explicit Treasury costs continue borrowing with the existing cause under R-MONEY-003; the owner's 26 October 2026 ruling on #1718 overrides the proposal's no-borrowing text. No transaction refusal or new debt limit is introduced.+Under gdd-0.3 (#1718, first slice landed in PR #1772 on 26 October 2026): only the active event catalogue is simulated. `content/gdd03-events.yaml` is required, read and hashed only for this identity; it explicitly excludes whole cards by id with a reason. Unknown or duplicate exclusions and stranded requirements, variants, rejoin edges or objective cards are errors. All source YAML is still parsed strictly. Five legacy cards are excluded without changing their source bytes or reviews (eight until the owner's ruling of 2 November 2026, "Bring back 3, design bonds (Recommended)", restored `clothing_rationing_1950`, `reparations_claim` and `reparations_vote`, #2224). There are no replacement amounts. Approved indicator writes and explicit `treasury`, `food`, `arms` effects retain finite checks, stock rounding and bounds. Writable `food_supply`, national `housing`, Attention and city-loss/defeat command targets are rejected before compatibility-indicator acceptance. Under decision D1 and answers Q1 and Q2 (owner, 1 November 2026, "Approve all six (Recommended)" on #1668) the passive budget, the monthly Food refill and the foreign-currency ledger stay, so `fx_reserves` and the budget and Food-refill spellings load under gdd-0.3 exactly as under gdd-0.1: `fx_reserves` moves the ledger, and a budget or refill spelling is accepted only where `model.yaml` defines it, otherwise it is an unknown target. Retired `rationing` and `maabarot` policy writes are errors. Structured `grant_units`, `city_effects` and `unlock_projects` await approved population/facility accounting and are errors in this slice. Explicit Treasury costs continue borrowing with the existing cause under R-MONEY-003; the owner's 26 October 2026 ruling on #1718 overrides the proposal's no-borrowing text. No transaction refusal or new debt limit is introduced.R-EFX-002: In every ruleset, an option of an event tagged `holocaust`, `terror`, `massacre` or `war-casualties` cannot raise `treasury`, `fx_reserves`, `food`, `arms`, `food_supply`, `morale` or `intl_standing` (Q-EFX-2, decided 15 October 2026: the no-gain rule covers all five resources, with the legacy indicators standing for Food, Social cohesion and International Support; `food` is Food's own target, and Arms joins the rule with its pool, #781). A cost stays allowed. Under gdd-0.3, R-EFX-001 first rejects retired compatibility targets; the remaining Money, Food, Arms and indicator effects keep these no-gain checks. Availability changes do not reset sensitivity tags, review status or human sign-off, and no alias grants an exception (R-EFX-005/007).diff --git a/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.cs b/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.csindex 2383ccb22..af21ee978 100644--- a/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.cs+++ b/sim/Statecraft.Sim.Tests/Gdd03EventRulesTests.cs@@ -6,7 +6,10 @@ public class Gdd03EventRulesTests{const string Manifest = "gdd03-events.yaml";const string Empty = "ruleset: gdd-0.3\nexclusions: []\n";- static readonly string[] Excluded = { "austerity_1949", "clothing_rationing_1950", "forex_crisis_1951", "iraqi_exodus", "israel_bonds", "maabarot_policy", "reparations_claim", "reparations_vote" };+ static readonly string[] Excluded = { "austerity_1949", "forex_crisis_1951", "iraqi_exodus", "israel_bonds", "maabarot_policy" };+ // #2224 (owner, 2 November 2026, "Bring back 3, design bonds (Recommended)"): D1/Q2 keep the foreign-currency ledger,+ // so these three cards, excluded by #1772 for want of a ledger mapping, are active again. israel_bonds stays excluded.+ static readonly string[] Restored = { "clothing_rationing_1950", "reparations_claim", "reparations_vote" };static string Card(string id = "probe", string option = "") =>$"id: {id}\ntitle: Fixture\ntext: Fixture.\nfrom: 1948-05-15\noptions:\n - id: ok\n text: Accept\n historical: true\n" + option;static Dictionary<string, string> Files(bool modern = true)@@ -186,10 +189,10 @@ public class Gdd03EventRulesTests}, Directory.GetFiles(Path.Combine(root, "events"), "*.yaml").Select(p => "events/" + Path.GetFileName(p)));}[Fact]- public void RealCatalogueExcludesExactlyEightWholeCardsAndKeepsOrder()+ public void RealCatalogueExcludesExactlyFiveWholeCardsAndKeepsOrder(){var old = Real(false); var modern = Real(true);- Assert.Equal(39, old.Events.Count); Assert.Equal(31, modern.Events.Count);+ Assert.Equal(39, old.Events.Count); Assert.Equal(34, modern.Events.Count);Assert.Equal(Excluded, old.Events.Select(e => e.Id).Except(modern.Events.Select(e => e.Id)).OrderBy(x => x, StringComparer.Ordinal));Assert.Equal(old.Events.Where(e => !Excluded.Contains(e.Id)).Select(e => e.Id), modern.Events.Select(e => e.Id));Assert.NotEqual(old.Hash, modern.Hash);@@ -300,7 +303,6 @@ public class Gdd03EventRulesTests}// Inventory from the approved plan for #1772, pinned to ef35703; includes valid sibling fields.- // reparations_vote (#1575) joined after the main merge, excluded for the same reason as reparations_claim.static readonly string[] Inventory ={"austerity_1949/impose/set_policy.rationing=1",@@ -308,9 +310,6 @@ public class Gdd03EventRulesTests"austerity_1949/impose/effects.morale=-0.05","austerity_1949/decline/effects.fx_reserves=-8","austerity_1949/decline/effects.food_supply=-0.05",- "clothing_rationing_1950/extend/effects.morale=-0.05",- "clothing_rationing_1950/relax/effects.morale=0.03",- "clothing_rationing_1950/relax/effects.fx_reserves=-8","forex_crisis_1951/request_aid/effects.fx_reserves=-45","forex_crisis_1951/request_aid/effects.fx_reserves=15","forex_crisis_1951/request_aid/effects.intl_standing=-0.01",@@ -330,6 +329,20 @@ public class Gdd03EventRulesTests"maabarot_policy/maabarot/effects.treasury=2","maabarot_policy/keep_camps/effects.housing=-0.03","maabarot_policy/keep_camps/effects.treasury=-4",+ };+ [Fact]+ public void AllTwentyFourAffectedAssignmentsRetainTheirLegacyValues()+ {+ Assert.Equal(Inventory.OrderBy(x => x, StringComparer.Ordinal), Rows(Real(false), Excluded).OrderBy(x => x, StringComparer.Ordinal));+ Assert.All(Real(false).Events, e => Assert.All(e.Options, o =>+ { Assert.Empty(o.GrantUnits); Assert.Empty(o.CityEffects); Assert.Empty(o.UnlockProjects); }));+ }+ // #2224: the restored cards' rows, the same legacy values the #1772 inventory pinned for them (ef35703).+ static readonly string[] RestoredInventory =+ {+ "clothing_rationing_1950/extend/effects.morale=-0.05",+ "clothing_rationing_1950/relax/effects.morale=0.03",+ "clothing_rationing_1950/relax/effects.fx_reserves=-8","reparations_claim/claim/effects.intl_standing=0","reparations_claim/claim/effects.treasury=-1","reparations_claim/refuse/effects.intl_standing=0",@@ -338,15 +351,26 @@ public class Gdd03EventRulesTests"reparations_vote/reject/effects.fx_reserves=-4","reparations_vote/referendum/effects.treasury=-1",};+ static IEnumerable<string> Rows(Content c, IEnumerable<string> ids) => c.Events.Where(e => ids.Contains(e.Id)).SelectMany(e =>+ e.Options.SelectMany(o => o.SetPolicy.Select(kv => $"{e.Id}/{o.Id}/set_policy.{kv.Key}=" + kv.Value.ToString("G", System.Globalization.CultureInfo.InvariantCulture))+ .Concat(o.Effects.Select(fx => $"{e.Id}/{o.Id}/effects.{fx.Target}=" + fx.Delta.ToString("G", System.Globalization.CultureInfo.InvariantCulture)))));+ // #2224: under gdd-0.3 the three restored cards load with their legacy effects and reach the player on the turns+ // EventRetimingTests.EachEventFiresOnItsTurn pins for them in the gdd-0.1 golden run. The reference player is not+ // defined for gdd-0.3 (ReferencePlayer.Commands), so this run gives no orders; the cards' windows still decide the turn.[Fact]- public void AllThirtyFourAffectedAssignmentsRetainTheirLegacyValues()+ public void RestoredCardsLoadWithLegacyEffectsAndFireOnTheirTurns(){- var rows = Real(false).Events.Where(e => Excluded.Contains(e.Id)).SelectMany(e =>- e.Options.SelectMany(o => o.SetPolicy.Select(kv => $"{e.Id}/{o.Id}/set_policy.{kv.Key}=" + kv.Value.ToString("G", System.Globalization.CultureInfo.InvariantCulture))- .Concat(o.Effects.Select(fx => $"{e.Id}/{o.Id}/effects.{fx.Target}=" + fx.Delta.ToString("G", System.Globalization.CultureInfo.InvariantCulture)))));- Assert.Equal(Inventory.OrderBy(x => x, StringComparer.Ordinal), rows.OrderBy(x => x, StringComparer.Ordinal));- Assert.All(Real(false).Events, e => Assert.All(e.Options, o =>- { Assert.Empty(o.GrantUnits); Assert.Empty(o.CityEffects); Assert.Empty(o.UnlockProjects); }));+ var c = Real(true);+ Assert.Equal(RestoredInventory.OrderBy(x => x, StringComparer.Ordinal), Rows(c, Restored).OrderBy(x => x, StringComparer.Ordinal));+ var s = Simulation.NewGame(c, GoldenRun.Seed, Mode.Historical);+ var run = new List<GameState> { s };+ while (s.GameOver == null && run.Count < 1000) { s = Simulation.Step(c, s, Array.Empty<Command>()).State; run.Add(s); }+ Assert.Equal(GameOverCodes.MvpEnded, s.GameOver);+ DateTime? CardDate(string id) => run.FirstOrDefault(x => x.FiredEvents.Contains(id))?.Date;+ Assert.Equal(new DateTime(1950, 7, 15), CardDate("clothing_rationing_1950"));+ Assert.Equal(new DateTime(1951, 3, 15), CardDate("reparations_claim"));+ Assert.Equal(new DateTime(1951, 12, 15), CardDate("reparations_vote"));+ Assert.Null(CardDate("israel_bonds"));}static readonly string[] SourceBytes ={