Skip to content

Add source-only New Zealand Axiom pilot - #508

Draft
MaxGhenis wants to merge 4 commits into
mainfrom
nz/axiom-pilot
Draft

Add source-only New Zealand Axiom pilot#508
MaxGhenis wants to merge 4 commits into
mainfrom
nz/axiom-pilot

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #507

Adds the source-only integration slice of #506. The broader NZ population/release/scoring work remains open.

Scope

  • Add opt-in NZ dataset and Axiom TaxBenefitModelVersion classes through the shared Simulation surface; no pe.nz bundle, new country-model package, or US/UK pin changes.
  • Consume Microcosm's actual entity-table HDF5 codec, including exact Decimal and nullable-boolean inputs, with explicit NZ tax-year dates.
  • Resolve effective person/family weights through Frame from household weights; validate membership, substantive inputs, and formula-owned exclusions.
  • Execute the real Axiom official-budget module, preserve source files, and retain input/runtime hashes and the unresolved fiscal-comparability bridge in output receipts.
  • Preserve direct NZ model/dataset JSON round-trips; reject saved model identity drift. Generic Simulation base-type JSON behavior is documented and unchanged.
  • Include an executable source-artifact example and focused regression tests.

Dependencies and limits

Depends on PolicyEngine/microcosm#821 and TheAxiomFoundation/rulespec-nz#117. The latter still needs signed Treasury corpus publication/activation.

This pilot does not construct or certify a calibrated NZ population, impute missing family inputs, implement fiscal/payment/debt bridges, or publish national scores. Annual entitlement changes must not be attached as completed Treasury budget-score replications.

Verification

  • make format and make lint pass.
  • 36 focused tests pass under both pandas 2.3.2 and pandas 3.0.5 with actual Microcosm HDF5 writer/reader and native Axiom execution. Regression coverage includes exact large integers and string missing-value semantics through columns, indices, and categories. A separate pandas 3.0.5 source-only review run passes 35 with one opt-in runtime test skipped.
  • Verified native Axiom core bb4b568 and rulespec-nz 3b663b3; the executable records source/binary hashes, not a wrapper version as proof of the native version.
  • Real-runtime test uses two synthetic families with nonuniform household weights. It verifies integration, not a national estimate.
  • Independent re-review approved all changes after fixes to saved identity, Decimal padding, JSON precision, and pandas 3 string missing-value preservation. The final 36-case real-runtime runs pass against Microcosm 9f7deadd after its upstream-root-authority merge. The pandas 3 correction addresses the two JSON round-trip failures found by full CI; the full remote suite is rerunning on the new commit.

Leave this PR draft. It is the bounded source-only adapter tracked in #507, not completion of #506.

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.

NZ source-only Axiom transport and entitlement smoke

1 participant