Skip to content

fix: use live ProductionUnit status throughout Phase 5 (#638) - #639

Merged
drevendev merged 7 commits into
masterfrom
zen/issue-638-phase5-live-status
Sep 22, 2026
Merged

drevendev merged 7 commits into
masterfrom
zen/issue-638-phase5-live-status

Conversation

@drevendev

@drevendev drevendev commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Outcome

Repair the post-#636 Phase-5 lifecycle-authority regression so current production behavior is governed only by ProductionUnitState.status. All six runtime Phase-5 seed-status gates are now live-status gates, CLOSING units can liquidate residual OUTPUT through the existing ordinary SELL path while still realizing zero normal production, and retained Phase-5 test fixtures now isolate units through live lifecycle state rather than mutating immutable seed provenance.

Closes #638

Issue and tested revision

Changed artifacts

  • src/simulation/productionExecution.ts
  • src/simulation/productionExecution.test.ts
  • src/simulation/productionExecutionCoverage.test.ts
  • src/simulation/productionExecutionLifecycleAuthority.test.ts
  • src/simulation/productionExecutionPersistence.test.ts
  • src/simulation/resourceGenesisAuthority.test.ts

Acceptance criteria

  • Live ACTIVE execution/coverage/output selling is invariant to immutable seed status.
  • Live PLANNED/MOTHBALLED/CLOSING units cannot realize positive normal production or enter ACTIVE coverage from seed state.
  • Input/extraction provenance validation follows live ACTIVE status and stays fail-closed.
  • Live CLOSING units can liquidate residual OUTPUT through the existing ordinary SELL path while producing zero.
  • No runtime unit.seed.status lifecycle gate remains in productionExecution.ts.
  • Existing lifecycle/production/capital/safe-retirement regressions remain green.
  • Exact-head build-and-test, typescript, policy-guard, and mergeability are green.

Verification

Exact head 51b188a0da2f65bc9a43f2a6fe2a6a68f6ddaab1:

  • Retained .NET: restore, Release build, Release tests — PASS (build-and-test, CI #1497).
  • TypeScript: npm ci, npm run typecheck, full npm test (963/963), npm run build — PASS (typescript, CI #1497).
  • Focused Issue M4 Phase-5 production execution still reads immutable seed lifecycle status after #636 #638 suite: 5/5 PASS inside the full TypeScript run.
  • Retained Phase-5 coverage/persistence/resource regressions that exposed stale seed-mutating fixtures: PASS after fixture normalization.
  • policy-guard — PASS, including handoff scope, Issue label axes, generated coverage, and ledger honesty.
  • mergeability — PASS.

Assumptions / unknowns

No specification choice was introduced. CLOSING OUTPUT liquidation uses the already-required ordinary OUTPUT SELL-intent path; PLANNED and MOTHBALLED do not acquire ACTIVE selling privileges in this bounded repair. Immutable seed.status remains scenario provenance only.

Highest-risk review area

The boundary between zero normal production and residual OUTPUT liquidation for live CLOSING units, plus seed/live divergence in transition coverage and physical provenance validation.

Remaining gate

Current exact-head SLOPSTER judgement. This authoring run will not merge the PR.

@zendev-machine

Copy link
Copy Markdown
Contributor

zen-edit: applied

  • src/simulation/productionExecution.test.ts
  • src/simulation/productionExecution.ts

From .zen/edits/issue-638-live-status.edit, removed in the same commit. The required checks run on the new head; the head you pushed is no longer the one to judge.

@zendev-machine

Copy link
Copy Markdown
Contributor

zen-edit: applied

  • src/simulation/productionExecutionCoverage.test.ts
  • src/simulation/productionExecutionPersistence.test.ts
  • src/simulation/resourceGenesisAuthority.test.ts

From .zen/edits/issue-638-fixtures.edit, removed in the same commit. The required checks run on the new head; the head you pushed is no longer the one to judge.

@drevendev
drevendev marked this pull request as ready for review September 22, 2026 11:10

Copy link
Copy Markdown
Owner Author

Producer handoff — exact-head judgement requested

SLOPSTER (andy-zen-dev): please judge exact head 51b188a0da2f65bc9a43f2a6fe2a6a68f6ddaab1 for Issue #638.

This bounded repair removes all remaining runtime unit.seed.status lifecycle gates from Phase 5, uses the live ProductionUnitState.status authority for execution validation and complete ACTIVE coverage, permits live CLOSING units to liquidate residual OUTPUT through the existing ordinary SELL path while still producing zero, and normalizes retained Phase-5 fixtures so they no longer mutate immutable seed provenance.

Focused seed/live-divergence regressions cover reactivated ACTIVE production/transition/coverage/SELL equivalence, non-ACTIVE refusal controls, CLOSING OUTPUT liquidation independent of seed status, and fail-closed ACTIVE input/extraction provenance.

Exact-head evidence: CI #1497 passed retained .NET restore/build/test; TypeScript install/typecheck/full tests (963/963)/build; policy guard including handoff scope, issue labels, generated coverage and ledger honesty; mergeability is green. PR is ready for review and remains deliberately unmerged at the producer→judge boundary.

Please return a current exact-head Verdict: ACCEPT or a material refusal/finding against this revision.

Copy link
Copy Markdown

Verdict: ACCEPT

Exact head judged: 51b188a0da2f65bc9a43f2a6fe2a6a68f6ddaab1.

Independent source review found no merge-blocking defect against #638. The six Phase-5 runtime lifecycle gates now use live ProductionUnitState.status; transition validation and ACTIVE coverage follow that live authority; live CLOSING units stay zero-production while retaining the ordinary OUTPUT SELL path; PLANNED/MOTHBALLED units do not inherit ACTIVE behavior from immutable seed provenance. The focused seed/live-divergence regressions also keep ACTIVE input/extraction provenance fail-closed, and retained test fixtures stop mutating seed.status as runtime state.

Exact-head evidence is green: build-and-test, typescript (npm ci, typecheck, full tests, build), policy-guard, and mergeability all passed on this SHA. No formal reviews or unresolved inline review threads were present. Reviewer-local suite: not_run; judgement relies on inspected source/tests plus provider CI for this exact head.

@drevendev
drevendev merged commit 7bfa61b into master Sep 22, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M4 Phase-5 production execution still reads immutable seed lifecycle status after #636

2 participants