Goal
Implement permanent REQ-PRODUCTION-001 for M4 by concretizing the ProductionUnit persistent physical/economic state needed by later production work, without pulling Phase-2 planning, labor allocation, production execution, investment execution or lifecycle behavior forward.
Evidence
- Canonical Drive Handoff/05 section 3 extends
ProductionUnitState with investmentInventory, ProductionSignalState, and lastLifecycleReviewTick.
- Handoff/05 section 3 and the master implementation index make
installedCapital the authoritative capacity stock and require nameplate capacity to be derived as installedCapital × recipe.batchesPerCapitalUnit, never serialized as an independently mutable authority.
- The current master already has distinct INPUT/OUTPUT/INVESTMENT live inventories from the M3 settlement work, but
ProductionUnitState has no production signals or lifecycle-review tick and no dedicated derived-capacity/state-validation boundary.
RecipeDefinition.batchesPerCapitalUnit is already validated as a positive finite coefficient; production-unit seed capital/inventory/condition values are validated at genesis.
- There are currently no open PRs and no existing open Issue for
REQ-PRODUCTION-001.
Scope
- Add the M4
ProductionSignalState persistent fields and lastLifecycleReviewTick to canonical ProductionUnitState, with deterministic neutral initialization from scenario genesis.
- Preserve
investmentInventory as a distinct authoritative physical stock and add focused regressions proving INPUT/OUTPUT/INVESTMENT remain distinct.
- Expose a small deterministic
deriveNameplateCapacity boundary using authoritative installed capital and immutable RecipeDefinition.batchesPerCapitalUnit; do not serialize a separate mutable capacity field.
- Add fail-fast validation for the M4 ProductionUnit persistent state introduced/used by this requirement: finite/bounded signals, non-negative installed capital/inventories, and valid lifecycle-review tick; retain existing recipe coefficient validation.
- Add sensitive regressions/negative controls proving the derived-capacity formula, absence of serialized capacity authority, distinct inventory ownership, and rejection of non-finite/out-of-range state.
- Reconcile
docs/spec/implementation_status.csv and generated status only when the requirement's full evidence is earned.
Non-goals
- No Phase-2 production planning or procurement intents (
REQ-PRODUCTION-002).
- No Population labor supply, Phase-3 labor allocation or wages (
REQ-POPULATION-002, REQ-PRODUCTION-003..004).
- No Phase-5 production/extraction or output sale behavior (
REQ-PRODUCTION-005).
- No investment planning/capital formation/depreciation (
REQ-PRODUCTION-006).
- No PLANNED/MOTHBALLED/CLOSING transition behavior (
REQ-PRODUCTION-007).
- No integrated M4 phase orchestration, M5+, fiscal/Clan dynamics, demography/migration or mirror edits.
Acceptance criteria
ProductionUnitState carries the required M4 production signal state and lifecycle-review tick with deterministic neutral genesis initialization.
investmentInventory remains a distinct physical stock from input/output inventory, and a focused regression fails if the three buckets alias or are collapsed.
deriveNameplateCapacity(unit, recipe) equals authoritative installed capital × recipe.batchesPerCapitalUnit; no serialized/mutable capacity field is introduced as authority.
- Invalid/non-finite ProductionUnit state relevant to this slice fails fast, including signal bounds, negative/non-finite installed capital or inventory quantities, and invalid lifecycle-review ticks; invalid/non-finite
batchesPerCapitalUnit remains rejected by DefinitionPack validation.
- Sensitive negative controls prove the formula and validation are load-bearing rather than documentation-only.
- TypeScript typecheck/tests/build, retained .NET build/test, policy/ledger checks and mergeability pass on the exact PR head.
- The final handoff names every changed artifact and exact tested head and stops at the production→judgement boundary for SLOPSTER.
Verification
Run focused ProductionUnit state/capacity tests plus npm run typecheck, npm test, npm run build, retained .NET build/test, and repository policy/ledger checks. Confirm the final diff contains no M5+ or later M4 behavior and no docs/spec/mirror/** changes.
Goal
Implement permanent
REQ-PRODUCTION-001for M4 by concretizing the ProductionUnit persistent physical/economic state needed by later production work, without pulling Phase-2 planning, labor allocation, production execution, investment execution or lifecycle behavior forward.Evidence
ProductionUnitStatewithinvestmentInventory,ProductionSignalState, andlastLifecycleReviewTick.installedCapitalthe authoritative capacity stock and require nameplate capacity to be derived asinstalledCapital × recipe.batchesPerCapitalUnit, never serialized as an independently mutable authority.ProductionUnitStatehas no production signals or lifecycle-review tick and no dedicated derived-capacity/state-validation boundary.RecipeDefinition.batchesPerCapitalUnitis already validated as a positive finite coefficient; production-unit seed capital/inventory/condition values are validated at genesis.REQ-PRODUCTION-001.Scope
ProductionSignalStatepersistent fields andlastLifecycleReviewTickto canonicalProductionUnitState, with deterministic neutral initialization from scenario genesis.investmentInventoryas a distinct authoritative physical stock and add focused regressions proving INPUT/OUTPUT/INVESTMENT remain distinct.deriveNameplateCapacityboundary using authoritative installed capital and immutableRecipeDefinition.batchesPerCapitalUnit; do not serialize a separate mutablecapacityfield.docs/spec/implementation_status.csvand generated status only when the requirement's full evidence is earned.Non-goals
REQ-PRODUCTION-002).REQ-POPULATION-002,REQ-PRODUCTION-003..004).REQ-PRODUCTION-005).REQ-PRODUCTION-006).REQ-PRODUCTION-007).Acceptance criteria
ProductionUnitStatecarries the required M4 production signal state and lifecycle-review tick with deterministic neutral genesis initialization.investmentInventoryremains a distinct physical stock from input/output inventory, and a focused regression fails if the three buckets alias or are collapsed.deriveNameplateCapacity(unit, recipe)equals authoritative installed capital ×recipe.batchesPerCapitalUnit; no serialized/mutablecapacityfield is introduced as authority.batchesPerCapitalUnitremains rejected by DefinitionPack validation.Verification
Run focused ProductionUnit state/capacity tests plus
npm run typecheck,npm test,npm run build, retained .NET build/test, and repository policy/ledger checks. Confirm the final diff contains no M5+ or later M4 behavior and nodocs/spec/mirror/**changes.