Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Comments: stable references for stale file:line anchors (Refs #2332) (#2361)

Eyal Golan2cf894f857f7
diff --git a/changelog.d/wP-comment-refs.md b/changelog.d/wP-comment-refs.md
new file mode 100644
index 000000000..d468d9d01
--- /dev/null
+++ b/changelog.d/wP-comment-refs.md
@@ -0,0 +1,4 @@
+### Changed
+
+- Sim and UI code comments that cited moved file lines now name the rule, method or balance key they mean, or pin
+ their GDD 0.3 line to the commit it was read at (#2332). No user-visible change.
diff --git a/docs/gdd/training.md b/docs/gdd/training.md
index 87990bb84..3693c1e4b 100644
--- a/docs/gdd/training.md
+++ b/docs/gdd/training.md
@@ -74,7 +74,7 @@ Cancelled retained courses award no unfinished qualification. A course whose slo
- `sim/Statecraft.Sim.Tests/golden/manifest.txt`: `mvp-slice` moved (retired at the cutover); `scenario-mvp-absorb-first` did not. Phase 4 PR 3 moves `hash1950`, `hash1952` and `mvp-end`: the reference player builds the two camps once the yishuv sites are taken (docs/determinism.md).
- Finished recruit cohorts become military units and never fill `City.Recruits` (`R-TRAIN-003`, `R-UNIT-003`); Amir's proposal to replace recruit counts during training is non-operative [S6].
- Unit types, scenario inventory, facilities and training commands require coordinated migration.
-- **Amir's proposal [S6]:** reception beds, teacher housing and proposed military trainee slots would be distinct capacity fields; the owner's 30 October 2026 conflict review did not rule on this, and main has only inactive `gdd-0.3` fixtures for them (`docs/rules/mvp.md:107`, `docs/rules/mvp.md:167`). Reception beds are post-MVP, the teacher lives as an ordinary resident, and every military camp uses `military.camp_capacity` (owner, 1 November 2026, "Keep R-CITY-004 (Recommended)", Q42 and 27M-25) [S11].
+- **Amir's proposal [S6]:** reception beds, teacher housing and proposed military trainee slots would be distinct capacity fields; the owner's 30 October 2026 conflict review did not rule on this, and main has only inactive `gdd-0.3` fixtures for them (`docs/rules/mvp.md:107`, `R-TRAIN-005`). Reception beds are post-MVP, the teacher lives as an ordinary resident, and every military camp uses `military.camp_capacity` (owner, 1 November 2026, "Keep R-CITY-004 (Recommended)", Q42 and 27M-25) [S11].
- Historical army size comes from the sourced `content/map/units_1948.yaml` seed (`Q-START-1`, decided 15 October 2026); only the non-Historical parameter `A` and real reception-facility availability stay deferred in the GDD (owner, 30 Oct 2026) [S6]; the starting centre and reception host is Kiryat Shmuel, Haifa (owner, 1 November 2026, O8 and 27M-25) [S11].
## Done when
diff --git a/sim/Statecraft.Sim.Tests/ArmsWorkshopTests.cs b/sim/Statecraft.Sim.Tests/ArmsWorkshopTests.cs
index 5e14091e2..f8a4d1b09 100644
--- a/sim/Statecraft.Sim.Tests/ArmsWorkshopTests.cs
+++ b/sim/Statecraft.Sim.Tests/ArmsWorkshopTests.cs
@@ -567,7 +567,7 @@ public class ArmsWorkshopTests
static GameState Clear(GameState s) { var x = s.Clone(); x.Workshops.Clear(); return x; }
// R-ARMS-006 (27M-13: "The cost tier follows the worker (novice or ordinary / apprentice / expert)."; gdd03-balance
- // workshop.cost 5/4/3, which docs/GDD.md:370 keeps as "Money per Arms"; OQ1, owner 2 November 2026: "Keep as ruled").
+ // workshop.cost 5/4/3, which the GDD's 1 November 2026 per-unit rates ruling keeps as "Money per Arms"; OQ1, owner 2 November 2026: "Keep as ruled").
[Theory]
[InlineData(SyntheticWorkshopTier.Ordinary, 5)]
[InlineData(SyntheticWorkshopTier.Novice, 5)]
diff --git a/sim/Statecraft.Sim.Tests/Gdd03FoodArithmeticTests.cs b/sim/Statecraft.Sim.Tests/Gdd03FoodArithmeticTests.cs
index fcec32d9c..4934afbbc 100644
--- a/sim/Statecraft.Sim.Tests/Gdd03FoodArithmeticTests.cs
+++ b/sim/Statecraft.Sim.Tests/Gdd03FoodArithmeticTests.cs
@@ -77,7 +77,7 @@ public class Gdd03FoodArithmeticTests
Assert.Equal((result.UnmetShare.Denominator - result.UnmetShare.Numerator)
* result.NextOwnStrengthFactor.Denominator,
result.NextOwnStrengthFactor.Numerator * result.UnmetShare.Denominator);
- // 10 and 100 above are catalogue values: D docs/gdd/balance.md:108,17.
+ // 10 and 100 above are catalogue values: D docs/gdd/balance.md:108,17 at 605277df.
if (own == 0) Fraction(0, 1, result.OwnConsumed);
if (provisions == 0) Fraction(0, 1, result.ProvisionConsumed);
Assert.Equal(result.Consumed * result.OwnConsumed.Denominator * result.ProvisionConsumed.Denominator,
diff --git a/sim/Statecraft.Sim.Tests/Gdd03MilitaryCatalogueTests.cs b/sim/Statecraft.Sim.Tests/Gdd03MilitaryCatalogueTests.cs
index 4d5fe2ad4..eddb597f3 100644
--- a/sim/Statecraft.Sim.Tests/Gdd03MilitaryCatalogueTests.cs
+++ b/sim/Statecraft.Sim.Tests/Gdd03MilitaryCatalogueTests.cs
@@ -14,7 +14,7 @@ public class Gdd03MilitaryCatalogueTests
[Fact] public void ReadsEverySettledNonCombatTermAsAnImmutableSnapshot()
{
var c = Catalogue(); var terms = Gdd03MilitaryCatalogue.Read(c);
- // content/gdd03-balance.yaml:307-354; #1668 balance.md:129-137.
+ // content/gdd03-balance.yaml:307-354; #1668 balance.md:129-137 at 605277df.
// camp_capacity: #1668's 5 places at 10,000 people a unit is 50 units at 1,000 a unit (owner, 1 November 2026:
// "Main's base x 0.3's tiers (Recommended)"; #2112).
Assert.Equal(50, terms.CampCapacity); Assert.Equal(3, terms.BasicTurns);
diff --git a/sim/Statecraft.Sim.Tests/Gdd03ProjectCatalogueTests.cs b/sim/Statecraft.Sim.Tests/Gdd03ProjectCatalogueTests.cs
index 0578dc8cb..951a8f076 100644
--- a/sim/Statecraft.Sim.Tests/Gdd03ProjectCatalogueTests.cs
+++ b/sim/Statecraft.Sim.Tests/Gdd03ProjectCatalogueTests.cs
@@ -28,7 +28,7 @@ public class Gdd03ProjectCatalogueTests
Assert.Equal(3m, c.BuilderSlots.Amount);
Assert.Equal(1m, c.CityStarts.Amount);
Assert.Equal(new[] { 1m, 1.5m, 3m }, new[] { c.OrdinaryOrNoviceRate.Amount, c.ApprenticeRate.Amount, c.ExpertRate.Amount });
- // content/gdd03-balance.yaml:524-667; GDD balance.md:78-84.
+ // content/gdd03-balance.yaml:524-667; GDD balance.md:78-84 at 605277df.
var expected = new[] {
("maabara", 5m, 1m, 0.10m), ("permanent_housing", 15m, 3m, 0.25m),
("industry", 10m, 3m, 0.25m), ("reception_camp", 10m, 3m, 0.25m),
diff --git a/sim/Statecraft.Sim.Tests/Gdd03TrainingCentreFixtureTests.cs b/sim/Statecraft.Sim.Tests/Gdd03TrainingCentreFixtureTests.cs
index 88d3e6ea4..d675e4bd2 100644
--- a/sim/Statecraft.Sim.Tests/Gdd03TrainingCentreFixtureTests.cs
+++ b/sim/Statecraft.Sim.Tests/Gdd03TrainingCentreFixtureTests.cs
@@ -156,7 +156,7 @@ public class Gdd03TrainingCentreFixtureTests
}
// R-TRAIN-005: the pupil limit is the catalogue value; a synthetic 2 admits a second pupil for the same teacher.
- // This only proves the value is read from the catalogue: the GDD allows one pupil per teacher (training.md:31).
+ // This only proves the value is read from the catalogue: the GDD allows one pupil per teacher (training.md:31 at 605277df).
[Fact] public void PupilLimitComesFromTheCatalogue()
{
var c = Catalogue("profession.trainees_per_teacher", Agreed(2)); var s = State(c);
diff --git a/sim/Statecraft.Sim/Gdd03FoodArithmetic.cs b/sim/Statecraft.Sim/Gdd03FoodArithmetic.cs
index b6c40df6f..d2a2e9399 100644
--- a/sim/Statecraft.Sim/Gdd03FoodArithmetic.cs
+++ b/sim/Statecraft.Sim/Gdd03FoodArithmetic.cs
@@ -58,7 +58,7 @@ namespace Statecraft.Sim
internal static class Gdd03FoodArithmetic
{
// Balance scalars are explicit plain inputs, with no defaults or runtime catalogue hookup.
- // Synthetic tests supply pinned docs/gdd/balance.md:52,108,109,17,18 values.
+ // Synthetic tests supply pinned docs/gdd/balance.md:52,108,109,17,18 values at 605277df.
// R-FOOD-001, R-FOOD-002, R-FOOD-003; foundation only, not a replacement for the shipping rule paths.
internal static Gdd03FoodResult Settle(long available, long ownUnits, long provisionDemand,
long ownRation, long cohesionMaximum, long combatSlope,
diff --git a/sim/Statecraft.Sim/Gdd03HousingFormula.cs b/sim/Statecraft.Sim/Gdd03HousingFormula.cs
index 8feb82ed1..ab050fc18 100644
--- a/sim/Statecraft.Sim/Gdd03HousingFormula.cs
+++ b/sim/Statecraft.Sim/Gdd03HousingFormula.cs
@@ -80,7 +80,7 @@ namespace Statecraft.Sim
var unpaid = input.UpkeepDue == 0m ? 0m :
(unpaidPp / 100m) * ((input.UpkeepDue - input.UpkeepPaid) / input.UpkeepDue);
var after = Clamp(input.ConditionBefore - overflow - unpaid);
- // GDD cities.md:31,33. Contribution in displayed points, not indicator storage.
+ // GDD cities.md:31,33 at 605277df. Contribution in displayed points, not indicator storage.
var cohesion = input.OwnPopulation == 0 ? 0m : maxCohesionLoss
* ((decimal)input.CohesionResidents / input.OwnPopulation)
* Math.Max(0m, (cohesionThreshold - after) / cohesionThreshold);
diff --git a/sim/Statecraft.Sim/Gdd03ImmigrationFixture.cs b/sim/Statecraft.Sim/Gdd03ImmigrationFixture.cs
index 3c909c63d..a7b2fa2ed 100644
--- a/sim/Statecraft.Sim/Gdd03ImmigrationFixture.cs
+++ b/sim/Statecraft.Sim/Gdd03ImmigrationFixture.cs
@@ -78,7 +78,7 @@ namespace Statecraft.Sim
case "trained_soldier": role = 3; break;
default: throw Error(at + ".role", "explicit known passenger role required");
}
- // D cutover-resource-layer.md:41,45-47; training.md:11-13,23.
+ // D cutover-resource-layer.md:41,45-47; training.md:11-13,23 at 605277df.
if (s.ReceptionComplete != (role != 0)) throw Error(at + ".reception_complete", "refugees incomplete; all other roles explicitly complete");
if (s.Profession != (role == 2 ? "craftsman" : "none")) throw Error(at + ".profession", "explicit role-compatible profession required");
if (s.Tier != (role == 2 ? "apprentice" : "none")) throw Error(at + ".tier", "explicit role-compatible tier required");
diff --git a/sim/Statecraft.Sim/Gdd03MilitaryCatalogue.cs b/sim/Statecraft.Sim/Gdd03MilitaryCatalogue.cs
index 043b4a125..2e3da8ccc 100644
--- a/sim/Statecraft.Sim/Gdd03MilitaryCatalogue.cs
+++ b/sim/Statecraft.Sim/Gdd03MilitaryCatalogue.cs
@@ -3,7 +3,7 @@ using System;
namespace Statecraft.Sim
{
/// <summary>Immutable catalogue contract for #1699; data only, never a live-loop switch.
- /// Source: content/gdd03-balance.yaml:307-354 (#1668 balance.md:129-137).
+ /// Source: content/gdd03-balance.yaml:307-354 (#1668 balance.md:129-137 at 605277df).
/// No commands, state mutations, combat terms or inferred defaults.</summary>
public sealed class Gdd03MilitaryCatalogue
{
diff --git a/sim/Statecraft.Sim/Gdd03SyntheticMonthContext.cs b/sim/Statecraft.Sim/Gdd03SyntheticMonthContext.cs
index 9a885a893..d95ea0e59 100644
--- a/sim/Statecraft.Sim/Gdd03SyntheticMonthContext.cs
+++ b/sim/Statecraft.Sim/Gdd03SyntheticMonthContext.cs
@@ -130,7 +130,7 @@ namespace Statecraft.Sim
}
}
- /// <summary>Opaque synthetic housing handle, not a regional record. GDD balance.md:100
+ /// <summary>Opaque synthetic housing handle, not a regional record. GDD balance.md:100 at 605277df
/// defines housing.condition_max = 1 (Agreed fraction). No surcharge/decay calculation.</summary>
internal sealed class Gdd03SyntheticHousingSnapshot
{
diff --git a/unity/Assets/Scripts/UI/AdvisorLayout.cs b/unity/Assets/Scripts/UI/AdvisorLayout.cs
index 36b260ae3..509511226 100644
--- a/unity/Assets/Scripts/UI/AdvisorLayout.cs
+++ b/unity/Assets/Scripts/UI/AdvisorLayout.cs
@@ -11,7 +11,7 @@ namespace Statecraft.Game.UI
/// above the minimap. An upright phone (three rows): a sheet from the left column's edge (from the side menu's left
/// edge and under it, where the tight HUD makes the menu a row under the bar) to the window's right edge, under
/// "Decision waiting" and the toast, its foot 12 px above the higher of the info panel and the minimap's label.
- /// Hebrew: the same place (the HUD does not mirror its panels, Statecraft.uss:943-946).</summary>
+ /// Hebrew: the same place (the HUD does not mirror its panels; Statecraft.uss's .lang-he row-reverse rule reverses their rows).</summary>
public static class AdvisorLayout
{
public const float Width = 400f, EdgePx = 16f, GapPx = 12f, DecisionRowPx = 46f, BelowPx = 8f;
diff --git a/unity/Assets/Scripts/UI/AdvisorSignals.cs b/unity/Assets/Scripts/UI/AdvisorSignals.cs
index 67547e96d..b429dece6 100644
--- a/unity/Assets/Scripts/UI/AdvisorSignals.cs
+++ b/unity/Assets/Scripts/UI/AdvisorSignals.cs
@@ -16,7 +16,7 @@ namespace Statecraft.Game.UI
public static readonly IReadOnlyCollection<string> Events = new[] { NewGame, TurnEnded, Opening, AttentionRefused, BudgetUnsubmitted, CityShown, UnitShown };
public static readonly IReadOnlyDictionary<string, Func<AdvisorContext, bool>> States = new Dictionary<string, Func<AdvisorContext, bool>>
{
- // Spec 6's critical warnings and the defeat lines (R-END-001 to R-END-003, docs/rules/mvp.md:377-381).
+ // Spec 6's critical warnings and the defeat lines (R-END-001 to R-END-003).
["city_at_risk"] = ctx => Threats.CitiesAtRisk(ctx.Content, ctx.State).Count > 0,
["exhausted"] = ctx => ctx.State.ExhaustedTurns > 0,
["in_debt"] = ctx => ctx.State.Debt > 0,
diff --git a/unity/Assets/Tests/EditMode/ControlTests.cs b/unity/Assets/Tests/EditMode/ControlTests.cs
index 0a7ced1a0..b9fe6c6dd 100644
--- a/unity/Assets/Tests/EditMode/ControlTests.cs
+++ b/unity/Assets/Tests/EditMode/ControlTests.cs
@@ -381,7 +381,7 @@ public class ControlTests
doc.visualTreeAsset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(UiPaths.GameUxml);
go.SetActive(true);
var root = doc.rootVisualElement;
- // Mirror GameRoot.Begin (GameRoot.cs:244-247): Hebrew uses its own face and layout classes.
+ // Mirror GameRoot.Begin: Hebrew uses its own face and layout classes.
root.Q("root").EnableInClassList(UiLanguage.HebrewClass, lang["ui.lang"] == UiLanguage.Hebrew);
root.Q("root").RemoveFromClassList("loading");
var bridge = new SimBridge(GameSession.New(c, GoldenRun.Seed, Mode.Historical), lang);
@@ -392,7 +392,7 @@ public class ControlTests
// and the GDD column shown at once squeeze the text column to 0 px, and a later layout pass can stack the order
// row over 1300 px tall, so the panel's height depended on how many passes ran before the check.
var info = new InfoPanelPresenter(root, bridge, lang, new Dictionary<string, string>());
- // GameRoot.cs:585: paragraph direction is applied after the presenters have rendered.
+ // GameRoot.Begin / UiDirection: paragraph direction is applied after the presenters have rendered.
var direction = lang["ui.lang"] == UiLanguage.Hebrew ? new UiDirection(root, bridge) : null;
try
{