Repository navigation
Settle and apply the NZ dependent-child benefit-unit rule (G8-u) - #1226
Conversation
Declare the cited age, employment and teen-parent rules in the country spec. Apply them through shared unit construction, resolve dependent-parent chains, refuse dependent reference caregivers, and report CREATE placement counts. Add engine-free fixtures, randomized invariants and spec-variation witnesses. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the benefit_unit_rule.json resource hash and the spec fingerprint change; the new hash equals sha256 of the committed rule file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The packaged NZ spec now declares age_limit_years 18, so activation no longer names it as a gap; assert that it stays settled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # packages/microcosm-build/tests/golden/nz_country_spec.json
The settled NZ unit rule approximates statutory single status (Sch 2 DLM6784713, DLM6784537; s 8) by the co-resident partner pointer, so a young person whose spouse or partner lives elsewhere is treated as single. Disclose that, and MSD's unobserved section 8 determinations, beside the other unapplied limbs. The UnparentedChildPlacement docstring now describes the strict reference rule. NZ golden regenerated for the resource hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rpus The spec pointed at local absolute paths for the Schedule 2 XML and the settlement note. It now cites the pinned axiom-corpus release, file path and sha256, and a new docs/nz-benefit-unit-rule.md records the B8 settlement. The teen-parent branches now say they decide the teen's own dependency; a child of parents in separate units follows parent 1. NZ golden regenerated for the resource hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged by the NZ hub (session local_e407a527) at ce7b8fc with --squash. Gates: |
|
Hub note: this merged at ce7b8fc before CI had registered checks for that commit. The hub's land script treated "no checks reported" right after the push as a repo with no CI, which was a script bug and is now fixed. ce7b8fc changed only spec text (citations and teen-parent wording), added docs/nz-benefit-unit-rule.md and regenerated the golden hash. The hub ran dependent_children (24), nz_spec (72) and country_spec (135) locally, and the previous head 4cd53ce was green apart from one pending engine-us job. Main's CI on the merge commit 001814f is being watched; any failure gets an immediate fix-forward PR. |
|
Follow-up to the note above: main's CI on the merge commit 001814f is fully green. All 10 checks passed: engine-free, engine-uk and engine-us on 3.13 and 3.14, integration-uk, lint, select-countries and wheels. No fix-forward needed. |
Settles the NZ dependent-child rule for benefit units (method card MC7) and makes unit construction apply it. This is package G8-u of #1183.
build/nz/benefit_unit_rule.jsonhadage_limit_years: nullin an "UNVERIFIED proposal", andtransport/compose.pyrefuses a null limit. So no NZ benefit unit could be built on real data.The rule, from the Social Security Act 2018 Schedule 2 (as at 1 April 2026)
The hub read the statute and settled the open cases; that is item B8 of the G8 method addendum. The spec now declares:
usual_weekly_hoursconcept (benefit_unit_rule.json:47).:119).:64).Disclosed, not applied (
:59,:124):Every number lives in the spec. The shared code reads it and stays country-neutral (
transport/cli.py:266,column_kernels.py:134,population_kernels.py:225share one spec parser).Code
microcosm/frame/unit_construction.py::380);:775) and the employment threshold (:785);:820);:609): 16–17-year-olds made independent by hours, teen parents in each branch, non-partnered co-parent households, and children placed with the reference person.The CREATE receipt carries those counts (
population_kernels.py:289).Invariants (tested as Hypothesis properties over random households,
test_transport_dependent_children.py:352,:437)Tests
Hub re-run at this head, one file per run:
The new file has a fixture for each case:
It also has boundary cases, spec-variation witnesses and round-trips. The lane also ran the CREATE and column integration tests (2 + 2), the concept tests (26 + 26) and the unit-construction compatibility test (24).
Mutants, each failing a named test with a passing control:
test_eighteen_year_old_is_an_adult_even_without_work;test_seventeen_year_old_hours_determine_independence[35-hours];test_teen_parent_and_baby_join_the_declared_unit[age16];test_child_without_parent_joins_grandparent_reference_person;test_hours_threshold_is_read_from_spec[threshold10].Also run:
ruff check .,tools/ci_test_plan.py verifyandgit diff --check, all passing. At the current head 4cd53ce (main merged, including #1219), the CI plan verifies 682 files.The NZ golden country spec is regenerated (ef0be9a). Only the
benefit_unit_rule.jsonresource hash and the spec fingerprint change, and the new hash equals the committed file's sha256.How it was built
_GAPSintest_transport_composed_graph.py, which CI had flagged. 951091c and 4cd53ce merged main and regenerated the golden.Review
nz-rulespec-2026-07-25), path and sha256 (ce02ac72…), and the B8 settlement by the new in-repodocs/nz-benefit-unit-rule.md.🤖 Generated with Claude Code