Skip to content

REQ-PRODUCTION-001: concretize persistent ProductionUnit state and derived capacity #558

Description

@drevendev

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

  1. ProductionUnitState carries the required M4 production signal state and lifecycle-review tick with deterministic neutral genesis initialization.
  2. investmentInventory remains a distinct physical stock from input/output inventory, and a focused regression fails if the three buckets alias or are collapsed.
  3. deriveNameplateCapacity(unit, recipe) equals authoritative installed capital × recipe.batchesPerCapitalUnit; no serialized/mutable capacity field is introduced as authority.
  4. 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.
  5. Sensitive negative controls prove the formula and validation are load-bearing rather than documentation-only.
  6. TypeScript typecheck/tests/build, retained .NET build/test, policy/ledger checks and mergeability pass on the exact PR head.
  7. 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.

Activity

  1. added
    priority:highImportant and time-sensitive; schedule ahead of normal work
    type:featureNew simulation capability or observable behavior
    status:in-progressClaimed work with an active branch or pull request
    on Sep 18, 2026
  2. drevendev commented on Sep 18, 2026

    @drevendev
    OwnerAuthor

    Claim: EndlessZen primary delivery worker. Bounded scope: REQ-PRODUCTION-001 persistent ProductionUnit state only — production signals, live installed-capital authority, distinct investment inventory proof, derived nameplate capacity, and fail-fast state regressions. Branch: zen/issue-558-production-unit-state. No Phase-2 planning, labor, production execution, investment execution, lifecycle transitions, M5+, or mirror edits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:productionpriority:highImportant and time-sensitive; schedule ahead of normal worktype:featureNew simulation capability or observable behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions