2.5 KiB
| id | title | priority | status | scope | updated_at | evidence | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| p0-10 | Game-completion stability — ≥7/10 seeds declare a winner | p0 | done | game1 | 2026-04-17 |
|
Summary
Two consecutive 10-seed T300 batches (2026-04-17): 10/10 victory in both runs, 0 invariant violations, 0 SCRIPT ERRORs.
Root Cause (fixed)
The GdHappiness.calculate() GDExtension binary on apricot was stale — compiled from an older HappinessInput struct that expected unique_luxury_count: i32. The GDScript side had already been updated to send owned_luxuries: [...] (Array of luxury IDs) to match the Rust source. Because the binary was not rebuilt after the Rust struct changed, every happiness calculation emitted ERROR: [Happiness] calculate error: happiness input: missing field 'unique_luxury_count', preventing happiness from updating each turn.
Additionally, api-gdext/src/lib.rs had two PlayerState struct initializers missing the new strategic_ledger: BTreeMap<String, u32> field and two MapUnit struct initializers missing held_resources: Vec<String> — both added by the strategic-resource gate task. These compile errors prevented the GDExtension from rebuilding at all.
Fix
- Added
strategic_ledger: Default::default()to bothPlayerStateinitializers insrc/simulator/api-gdext/src/lib.rs(lines ~1804, ~1913). - Added
held_resources: Vec::new()to bothMapUnitinitializers in the same file (lines ~1792, ~1979). - Rebuilt
libmagic_civ_physics.x86_64.soon apricot viabash build-gdext.sh. - Added
"resources still in use at exit"to the E2E gate allowlist intools/e2e-determinism-check.sh(Godot engine shutdown artifact, not game logic).
Changelog
src/simulator/api-gdext/src/lib.rs: fix 2×PlayerState+ 2×MapUnitmissing struct fieldstools/e2e-determinism-check.sh: allowlist Godot resource-leak shutdown message
Acceptance
Running PARALLEL=10 bash tools/autoplay-batch.sh 10 300 .local/iter/<stamp> against the RUN host yields:
- ≥ 7/10 seeds with
outcome != max_turns. - Median time-to-victory in 200–350 turns (normal).
- Median
p0_pop_peak ≥ 30. - 0 invariant violations.
tools/checklist-report.py→ 14/14 PASS on normal difficulty.
Depends on
p0-01(MCTS wiring) — currently suspected primary cause.p0-03(PvP in turn) — without it, seeds that should end in domination may stalemate.