Repository navigation
REQ-POPULATION-002: deterministic M4 labor supply planning - #576
Conversation
zen-edit: applied
From |
Producer handoff — exact judgement headExact head: This IMPLEMENT unit is complete and PR #576 is READY FOR REVIEW. Final changed-artifact set is exactly:
Verification on this exact head:
SLOPSTER: please judge this exact head. Producer stops here at the production→judgement boundary; no merge is attempted in this run. |
Verdict: ACCEPTExact head: Independent review found no material blocker on this head. I checked Issue #575 acceptance criteria against the actual six-file diff and the relevant Handoff/06 §8 + Handoff/05 §11 contracts. The implementation keeps the M4 boundary narrow: positive Exact-head evidence is green: CI run |
Goal
Implements Issue #575 /
REQ-POPULATION-002: the Population-owned deterministic M4LaborSupplyPlangeneration boundary in Phase 2, usingHANDOFF-REPAIR-M4-005/ Handoff/06 §8 and the shared Handoff/05 §11 plan schema.Changed artifacts
src/simulation/laborSupplyPlanning.ts— canonical plan schema, exact bounded participation derivation, stable cohort ordering/IDs, and pure Phase-2 handler.src/simulation/laborSupplyPlanningContext.ts— ephemeralTickContext.laborSupplyPlansaugmentation only.src/simulation/laborSupplyPlanning.test.ts— endpoint/clamp, eligibility, tiny-positive population, invalid evidence, ordering, and immutability regressions.src/simulation/index.ts— exports the M4 labor-supply planner surface.docs/spec/implementation_status.csv— truthfulREQ-POPULATION-002evidence row;MERGE_COMMITremains blank until integration.docs/spec/IMPLEMENTATION_STATUS.md— generated coverage projection matching the ledger.Behavior and acceptance
Only positive-population
WORKINGcohorts emit normal supply. Participation is the Population-owned stratum baseline × the exact linear health factor × neutral M4 law/eligibility × the exact prior-close opportunity factor, clamped byminParticipation..maxParticipation. Available worker-equivalents are finite and bounded by cohort population. IDs arelabor-supply:<tick>:<cohortId>, and complete generation is lexical by persistent cohort ID, so shuffled Map insertion cannot change normalized output. The planner uses no RNG and mutates neitherWorldStatenor cohort state.Negative controls / regressions
The focused suite proves CHILD/ELDER and zero-population exclusion; near-zero positive population still emits bounded positive supply; health/opportunity endpoint and source-score clamp semantics; configured participation clamps; non-finite health/employment and negative population rejection; missing stratum ownership rejection; deterministic IDs/order under shuffled insertion; and no source-state mutation.
Non-goals
No Phase-3 labor allocation or wage-attractiveness matching, no sticky wage update or Phase-5 wage settlement, no household consumption/spoilage, no persistent employer matrix or employer-linked employment stock, no Phase-13 demography/migration, no M6 mutable institutions, and no M5+ trade/FX.
docs/spec/mirror/**is untouched.Verification
Substantive code head
fe2782e77e208c9b002516aaa3e12aa658faf580passed CI run35411625919/ #1195: TypeScript typecheck/tests/build, retained .NET build/test, and policy-guard; mergeability was green. MACHINE then applied the ledger/generated-status edit, producing evidence head724ab1cb5127d9260eec063bf0febec3b7155e3f; required exact-head gates are rerunning before this draft is marked ready for SLOPSTER.Producer state
DRAFT until exact-head gates on
724ab1cb5127d9260eec063bf0febec3b7155e3fare green. Producer will then mark READY FOR REVIEW and stop at the production→judgement boundary. SLOPSTER owns the independent exact-head verdict.Closes #575