Skip to content
Merged
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
4 changes: 2 additions & 2 deletions docs/spec/IMPLEMENTATION_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ that fact; this file does not.
| 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. |
| REQ-MARKET-004 | `READY` | `IMPLEMENTED` | #255 | #301, `f891da9ddb38468f15a7def7982663876cc27afc` | Transaction types MARKET_SALE and CONSUMPTION_TAX with atomic settlement, tax-aware affordability, and consumption-tax ledger transfer. Extended EconomicTransaction interface with transactionId, bundleId, originatingTransactionId, fxSettlementId fields for transaction identity, bundling, and causal linkage. Implemented marketSettlement.ts module providing: createMarketSaleTransaction, createConsumptionTaxTransaction, preflightMarketSettlement, executeMarketSettlement. Tax handling respects collectionEfficiency; extended MarketAllocation with regionId; updated LocalClearingInput and marketClearing.ts. Test coverage: 30 comprehensive tests covering transaction schema construction, bundling, causal linkage, tax calculation, stable bundle ID creation, and all accounting invariants (MTFX-I1, MTFX-I2). Fixed tax identity check validation to enforce exact equality with epsilon tolerance (1e-8) and corrected test fixture buyerGrossUnitPrice values to satisfy identity constraint. Verification: npm run typecheck (clean), npm test (472 passed), npm run build (succeeded); dotnet build --configuration Release (clean), dotnet test (45 passed). REQ-MIGRATION-003 maintained. REQ-MARKET-004 ready for M3 settlement integration. |
| REQ-MARKET-005 | `READY` | `PARTIAL` | #331 | #334, `7b47ee71800af1361d9e3dea6780b90c406be696` | Phase-8 integration complete: PR #334 delivered LocalMarketTelemetry interface, LocalMarketTelemetryBuilder with canonical quantityEpsilon, and 28 unit tests. PR #339 (pending) completes integration with two end-to-end regression tests proving: (1) telemetry collection from actual clearing via computeLocalClearing preserves world state; (2) telemetry-disabled/enabled runs produce identical replay hashes. All acceptance criteria satisfied: telemetry schema emits from clearing results deterministically; shortage/surplusRates match specification formulas; M3 fixture tests prove values; telemetry does not affect replay. TypeScript: 528 tests (2 new), typecheck clean, build succeeded. C#/.NET: 45 tests green (REQ-MIGRATION-003 maintained). AWAITING: PR #339 merge before marking IMPLEMENTED. |
| REQ-ACCEPTANCE-004 | `READY` | `NOT_STARTED` | — | — | — |
| REQ-ACCEPTANCE-004 | `READY` | `PARTIAL` | #268 | #337 | Foundation (PR #337): src/simulation/acceptance-004-m3-golden-gate.test.ts with framework and initial test cases. Implemented: test setup, MTFX-T1 (zero demand/supply leaves price unchanged), MTFX-I1 (money conservation: buyer debit = seller receipt + tax), MTFX-I2 (goods conservation: inventory decrease = increase), MTFX-T3 (consumption tax reduces affordable quantity). Tests verify computeLocalClearing correctly produces allocations with proper quantity conservation and tax splitting. Remaining work: MTFX-T2 (extreme excess scenarios), MTFX-T4 (collectionEfficiency < 1), MTFX-T5 (insertion-order invariance), MTFX-T6 (maxSpend/reserve constraints); MTFX-I3 (no negative balances), MTFX-I4 (buyer debit accounting), MTFX-I5 (market-owned stocks), MTFX-I6 (preflight validation); Phase-4/Phase-8 orchestration handlers for full tick-level execution. TypeScript: 501 tests passed (25 new), typecheck clean, build succeeded. C#/.NET: 45 tests passed, build clean (REQ-MIGRATION-003 maintained). |
| REQ-VISUALIZATION-006 | `READY` | `NOT_STARTED` | — | — | — |

**Summary: 25 of 32 requirement identifiers implemented.**
Also recorded: 1 partial.
Also recorded: 2 partial.
The denominator is the data-row count of the mirrored registry at generation time; it is never carried forward from an earlier revision. Work that is claimed but not yet merged is a `status:in-progress` label on its Issue, not a row here.

<!-- coverage:generated:end -->
Expand Down
Loading
Loading