Skip to content

Merged UK spine: final age-tail breaks all six stored NHS identities #770

Description

@MaxGhenis

The UK spine merged in #747 runs etb_services before the final age_tail
stage. ETB derives and persists six NHS visit/spending columns from stage-time
age (packages/microcosm-build/src/microcosm/build/uk_runtime/etb_services.py:117-139,426-436);
age_tail later rewrites top-coded person.age
(packages/microcosm-build/src/microcosm/build/uk_runtime/age_tail.py:151-196);
E6 recomputes NHS from final age and requires equality with the stored values
(tools/verify_uk_identity_stability.py:378-386,431-464).

Fresh reproduction on the merged executable tree, which is byte-identical at
current main: of 400 top-coded people, 189 moved to age 85+ and 67 to age 90+.
identical_under_permutation remained true, but matches_stored_columns was
false and all six NHS columns appeared in stored_column_mismatches.

Acceptance criteria:

  • Make final age and every stored age-derived NHS value obey one coherent
    production contract.
  • Add an age-tail × NHS × E6 integration regression that fails on the merged
    ordering.
  • Re-run E6 on the repaired final-stage artifact and attach an identity-bound
    receipt before relying on or promoting the merged spine.

From the post-merge verification of #747 (round-1 review + fresh reproductions on merged main); full evidence: https://github.com/PolicyEngine/microcosm/blob/review/pr-747-audit/REVIEW-747.md

🤖 Filed by the microcosm owner session with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions