Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/spec/IMPLEMENTATION_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ that fact; this file does not.
| REQ-VISUALIZATION-002 | `FROZEN` | `NOT_STARTED` | — | — | — |
| REQ-VISUALIZATION-003 | `READY` | `IMPLEMENTED` | #42 | #45, `d27a94e63580a2d7d0da005a245ae36fec5560fd` | `src/diagnostics/m0Preview.test.ts` — asserts `docs/m0-preview.json`'s legacy baseline seed/turns/hash match `docs/spec/LEGACY_BASELINE.md` exactly, its canonical-scaffolding flag matches the real `toolchainStatus()` in `src/index.ts`, and `docs/index.html` fetches the static artifact without referencing any canonical or legacy runtime module path. Manual build/render smoke check (headless-Chromium screenshots at 1280×1000, 360×900, and a full-page 1100×1900 capture) against a local static server, described in `docs/spec/M0_PREVIEW.md`; 7 files / 16 tests passed and both runtime suites green at merge commit `d27a94e63580a2d7d0da005a245ae36fec5560fd`. Actual production GitHub Pages deployment was explicitly out of AUTHOR scope in #45 and has not been independently re-verified by this reconciliation, which is bounded to `gh pr list` and the merged pull request's own body per `AUTHOR_RUNBOOK.md` section 1. |
| REQ-VISUALIZATION-004 | `READY` | `IMPLEMENTED` | #160 | #220, `f199c8677e99256c4b9ca46d68772b80ef7aa1b3` | M1 Milestone Preview (REQ-VISUALIZATION-004): deterministic JSON snapshot of canonical world-gen overview without exposing mutable domain objects. src/diagnostics/m1Preview.ts generates typed M1Preview interface exposing scenario ID/seed/configVersion, world topology counts (stateCount, regionCount, currencyCount, etc.), and arrays of State/Currency/Region/Clan details. src/diagnostics/m1Preview.test.ts (12 tests) generates docs/m1-preview.json from baseline-multistate-v1 scenario and seed 42; asserts M1Preview schema completeness, non-zero entity counts, deterministic generation invariance, and that docs/index.html references m1-preview.json without runtime imports. Smoke test: generated artifact is deterministically serializable, contains 4 states (State Alpha/Beta/Gamma/Delta), 24 regions, 4 currencies, 8 clans, 216 cohorts, 172 production units. All acceptance criteria met: M1 preview JSON generated deterministically from baseline scenario; GitHub Pages displays world-gen topology via static artifact (no mutable WorldState exposure); one-way read-only diagnostic output; TypeScript 231/231 tests passed, typecheck clean, build succeeded; C# 45/45 tests passed, build clean (REQ-MIGRATION-003 maintained). |
| REQ-VISUALIZATION-005 | `READY` | `IMPLEMENTED` | #243 | #244, `5777e08957350dc610790f7e8cd59a0e5a70476d` | M2 Milestone Preview (REQ-VISUALIZATION-005): deterministic JSON snapshot of canonical M2 tick orchestration and zero-flow reconciliation without exposing mutable domain objects. src/diagnostics/m2Preview.ts generates typed M2Preview interface exposing scenario ID/seed/configVersion, world topology counts, phase trace (0-15 proof with no phase 16), tick counter (firstTick/lastTick/ticksExecuted = 1/101/101), and reconciliation health (passedTicks=101/failedTicks=0/tolerance=1e-9). src/diagnostics/m2Preview.test.ts (13 tests) generates docs/m2-preview.json from baseline-multistate-v1 scenario and seed 42 executing 101 no-op ticks; asserts M2Preview schema completeness, phase trace exactly 0-15 (no phase 16), tick counter preservation, reconciliation passes (all 101 ticks pass with zero unmatched deltas within tolerance 1e-9), deterministic generation invariance, and that docs/index.html references m2-preview.json without runtime imports. Smoke test: generated artifact is deterministically serializable, phase sequence correct (16 phases/tick * 101 ticks = 1616 total phases), tick range 1-101, reconciliation status clean (passedTicks=101, failedTicks=0). All acceptance criteria met: M2 preview JSON generated deterministically from baseline scenario; 100+ ticks (101 executed) maintain zero-flow reconciliation; phase trace proves 0-15 without phase 16; GitHub Pages displays tick/phase/reconciliation health via static artifact (no mutable WorldState exposure); one-way read-only diagnostic output; TypeScript 287/287 tests passed, typecheck clean, build succeeded; C#/.NET 45/45 tests passed, build clean (REQ-MIGRATION-003 maintained). |
| REQ-VISUALIZATION-005 | `READY` | `IMPLEMENTED` | #243 | #244, `5777e08957350dc610790f7e8cd59a0e5a70476d` | M2 Milestone Preview (REQ-VISUALIZATION-005) + Pages rendering regression evidence (issue #359): foundation PR #244 delivered deterministic JSON snapshot of canonical M2 tick orchestration and zero-flow reconciliation without exposing mutable domain objects. PR #354 added HTML fetch/render wiring for M1/M2 previews but lacked rendering regression tests. PR #362 (issue #359) adds comprehensive Pages rendering regression test suite (src/diagnostics/pagesRender.test.ts, 12 focused tests) verifying: M1/M2 preview fetch URLs are present and required in HTML; DOM structure properly configured for content injection; preview JSON artifacts contain required scenario/phase/reconciliation data; rendering does not reference mutable simulation modules; regressions: removing fetch calls or DOM update code breaks tests; responsive layout CSS supports desktop (1280px) and narrow (375px) viewports. All smoke acceptance criteria met: M2 preview JSON generated deterministically from baseline scenario; 100+ ticks (101 executed) maintain zero-flow reconciliation; phase trace proves 0-15 without phase 16; GitHub Pages displays tick/phase/reconciliation health via static artifact (no mutable WorldState exposure); one-way read-only diagnostic output; Pages rendering path exercises fetch/DOM population wiring; TypeScript 548/548 tests passed (added 12 regression tests), typecheck clean, build succeeded; C#/.NET 45/45 tests passed, build clean (REQ-MIGRATION-003 maintained). Evidence PRs: #244 (M2 artifact), #354 (HTML wiring), #362 (regression tests). |
| REQ-MARKET-001 | `READY` | `IMPLEMENTED` | #246 | #248, `6c4dafba8a3cc65055ffc540f9bf69b8ac0e9a7a` | Ephemeral MarketIntent contract and budget commitment ledger for M3 local market procurement (sections 5-6 of MARKETS_TRADE_FX_CONTRACTS.md). src/simulation/marketIntent.ts defines: MarketIntent interface (id, actor, regionId, goodId, side, purpose, quantities/budgets, inventory buckets); comprehensive validation covering all specification constraints (non-negative/finite quantities, BUY maxSpend, SELL minimumReserveQuantity, ProductionUnit bucket routing [INPUT/OUTPUT/INVESTMENT for specific purposes], actor ownership validation); BudgetCommitmentLedger interface tracking actor+currency+envelope commitments with commitment tracking, overcommitment prevention, and reusable-envelope release. src/simulation/marketIntent.test.ts: 35 comprehensive tests covering valid MarketIntent creation for all actor types (Clan, State, ProductionUnit) and purposes (CONSUMPTION, INPUT, INVESTMENT, PUBLIC_PROCUREMENT, INVENTORY_REBALANCE); validation rejection of non-finite/negative values; budget ledger operations (creation, commitment accumulation, envelope isolation, overcommitment prevention, partial/full release, reusability handling); ProductionUnit-specific bucket routing and validation. src/simulation/tickOrchestrator.ts extended: TickContext now includes budgetLedger field (initialized empty per tick); phase handlers in M3+ can manage budget commitments through the ephemeral ledger without mutation of persistent WorldState. All acceptance criteria met: MarketIntent schema fully defined with all required/optional fields; validation rejects non-finite/negative quantities and invalid constraints; BUY maxSpend and SELL minimumReserveQuantity validated; budget ledger prevents overcommitment within envelope limits; ProductionUnit intents use explicit INPUT/OUTPUT/INVESTMENT buckets; static-fixture test suite covers all constraint classes with 35 tests. TypeScript verification: 322 tests passed (28 files), typecheck clean, build succeeded. C#/.NET: 45 tests passed, build clean (REQ-MIGRATION-003 maintained). |
| REQ-MARKET-002 | `READY` | `IMPLEMENTED` | #270 | #316, `e3b747ef310957b99904977ad88ae5035ed5ef25` | Foundation (PR #250): Phase-6 price formation with persistent market expectations (Handoff/04 section 9): repriceGoodInPhase6() bounded log-space repricing formula, updateMarketExpectations() EMA updates. Specification ownership: Handoff/03 section 4 defines canonical market baseline values. PR #250 implemented formula and EMA mechanics correctly but used non-canonical defaults. Fix (PR #316, Issue #270): Corrected five market configuration defaults in src/config/simulationConfig.ts to match Handoff/03 section 4: shortageSignalWeight (0.5 → 0.65), inventorySignalWeight (0.5 → 0.35), basePriceAdjustmentSpeed (0.1 → 0.12), maxAbsoluteLogPriceMovePerTick (0.1 → 0.18), expectationAlpha (0.2 → 0.25). Added six regression tests in src/config/validation.test.ts verifying each default matches specification. All acceptance criteria met: Phase-6 repricing formula unchanged, all five defaults now match specification exactly, canonical baseline targetInventoryCoverageTicks (1.0) preserved. Verification: TypeScript 481 tests passed (including new canonical-market-defaults suite), typecheck clean, build succeeded; C#/.NET 45 tests passed, build clean (REQ-MIGRATION-003 maintained). |
| REQ-MARKET-003 | `READY` | `IMPLEMENTED` | #251 | #293, `bf526b33abcd7caf6188237dad4756273850266e` | Deterministic proportional local clearing primitive with MarketAllocation schema, stable residual correction, and two-pointer concrete matching for atomic transaction bundle production. src/simulation/marketClearing.ts implements proportional clearing for one region+good+pass, preventing floating-point rounding errors via stable-ID correction, and produces identical allocations regardless of input insertion order. src/simulation/marketClearing.test.ts: 19 comprehensive tests covering proportional splits, excess supply/demand, zero-flow edge cases, shuffled-insertion determinism, tax-aware pricing validation, and stable ID ordering. Acceptance criteria verified: seller/buyer fills sum to cleared quantity within tolerance; no fill exceeds constraints; residual correction stable-ID ordered; shuffled intent insertion produces identical normalized allocations; all specification constraints verified. TypeScript: 439 tests passed, typecheck clean, build succeeded. C#/.NET: 45 tests passed, build clean (REQ-MIGRATION-003 maintained). REQ-MARKET-003 ready for M3 market-phase integration. |
Expand Down
Loading
Loading