Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
909fe3c
Merge G8-r2c shared hunks B and C into the integration base
claude Nov 2, 2026
fee9f17
Map NZ wages onto IRD's scaled P1 bands with quantile_map@2
claude Nov 2, 2026
572ee34
Count the 235 activated P1 rows in the NZ precal set
claude Nov 2, 2026
c91a780
Replace NZ's 474 native income rows with 24 coarse stand-in rows
claude Nov 2, 2026
acd5432
Merge E's precal count fix into F
claude Nov 2, 2026
385d596
Apply R2C-19 to four shared tests that pin NZ's pre-E state
claude Nov 3, 2026
232846c
Merge E's R2C-19 test edits into F
claude Nov 3, 2026
8167c42
Apply R2C-19 to the NZ resource list for F's diagnostic file
claude Nov 3, 2026
a52efb7
Key the NZ test's resolved-view cache on the transport graph
claude Nov 3, 2026
c9f5b0c
Apply R2C-22 to two shared tests that pin NZ's national scaling
claude Nov 3, 2026
714e10d
Wire NZ's stand-in income measure, its variants and the pre-fit gate
claude Nov 3, 2026
48806ae
Merge F's R2C-19 and R2C-22 edits into G
claude Nov 3, 2026
75eee5f
Apply R2C-23 to the NZ resource list for G's measurement file
claude Nov 3, 2026
0888bd8
Merge D's fix-round head 4c644db7 into the integration base
claude Nov 3, 2026
ba08d0f
Merge C's fix-round head acfa6b94 into the integration base
claude Nov 3, 2026
3e850e0
Merge the integration base's D and C fix-round heads into E
claude Nov 3, 2026
f5ed82b
Merge E's merge-up of the D and C fix-round heads into F
claude Nov 3, 2026
1c80537
Merge F's merge-up of the D and C fix-round heads into G
claude Nov 3, 2026
50b033a
Carry G's three variants through NZ's scenario-keyed resources and tests
claude Nov 3, 2026
3e5f5ed
Merge D's head 91bf4c0f (R2C-15 EXPAND writers) into the integration …
claude Nov 3, 2026
8ec98c1
Merge the integration base's D head 91bf4c0f into E
claude Nov 3, 2026
623afa0
Merge E's merge-up of D 91bf4c0f into F
claude Nov 3, 2026
4cf8f74
Merge F's merge-up of D 91bf4c0f into G
claude Nov 3, 2026
8c66267
Apply R2C-24 to two shared tests that pin NZ's G counts
claude Nov 3, 2026
a3fe195
Slice the stand-in's NZD column into NZ's calibration problem
claude Nov 3, 2026
423ca43
Apply R2C-25: NZ's roster pins 322 derived rows at G
claude Nov 3, 2026
64ef20a
Test G's S5 reader refusal, nil-band rule and VSI identity
claude Nov 3, 2026
9ae0914
Test G's income stand-in on NZ's toy graph
claude Nov 3, 2026
4ae5810
Test that the toy's rows refuse activation without the stand-in
claude Nov 3, 2026
85d55af
Prove each NZ calibration node's stand-in is its only writer
MaxGhenis Nov 3, 2026
0676099
Test each coarse row's labels against its committed native rows
MaxGhenis Nov 3, 2026
0506c9d
Test each wage cut against its own committed label
MaxGhenis Nov 3, 2026
044440a
Name the stand-in in the declared-scenario scaling test
MaxGhenis Nov 3, 2026
d1d7235
Merge main (4a36edcf) into the E-G fix round
MaxGhenis Nov 3, 2026
20507ad
Expect G's nz_super stage in the holdout stage-guard test (R2C-26)
MaxGhenis Nov 3, 2026
f43e8fb
Keep NZ's interval outputs out of the small-frame column tests
MaxGhenis Nov 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions docs/nz-calibration-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,16 @@ rulings 2, section 1):
$180,000);
- the ordered right-closed cuts give each shared endpoint to the lower band.

`build/nz/reference_intervals.json` holds the two tables: the national table
(237 bands, rows 8–244, each naming its parked count and amount references)
and the age table (183 bands, rows 6–188, no references and no fit rows).
`tools/generate_nz_target_references.py` generates both from the row formulas
and checks every cut against the pinned feed's own band labels. Ageing scales
the national cuts exactly by the selected factor and keeps fractional cents:
under the central factor 1.117109, $100 becomes 11,171.09 cents and $1,000
becomes 111,710.9 cents. Before matrix construction the calibration problem
`build/nz/reference_intervals.json` holds four tables. The national table
(237 bands, rows 8–244) and the age table (183 bands, rows 6–188) are declared
and validated only, with no references and no fit rows. The TY2026 wage table
(235 bands, rows 7–241) supplies the cuts for the P1 wage map (G8-r2c E). The
coarse stand-in table `ird_taxable_income_standin_ty2024` (G8-r2c F) carries
the calibration rows. `tools/generate_nz_target_references.py` generates all
four from the row formulas and checks every cut against the pinned feed's own
band labels. Ageing scales the coarse cuts exactly by the selected factor and
keeps fractional cents: under the central factor 1.117109, the first cut of
$40,000 becomes 4,468,436 cents and $125,000 becomes 13,963,862.5 cents. Before matrix construction the calibration problem
reports, for every cut, the weighted mass within $1, and for every band the
fixed-weight change under the left-closed alternative. These diagnostics never
change a target, and publisher reclassification is unavailable, because the
Expand All @@ -177,8 +179,31 @@ changes on these unfitted records remains G8-r2c/G8-x work.

The income and universe columns (`ird_taxable_income_proxy_cents`,
`ird_taxable_income_proxy_universe_status`) name the d1952 stand-in measure
rather than IRD's definition. No producer exists yet (G8-r2c), no active row
requests them, and all 474 IRD rows stay parked.
rather than IRD's definition.

### I1 coarse stand-in rows (G8-r2c F, R2C-4)

Twenty-four coarse rows replace the 474 native IRD rows in
`build/nz/target_references.json`. The coarse table has no nil band, a first
lower cut of $40,000, cuts at $50k, $60k, $70k, $80k, $100k, $125k, $150k,
$200k, $300k, $500k and $1m, and an open tail: 12 bands, each the sum of whole
native rows 50–244. Each band names one count row (`value_operation: sum`, no
operands) and one amount row (`identity`, measure
`ird_taxable_income_proxy_nzd`), both pinning the band's native labels and
their `expected_member_count` (R2C-17). The `aging_index` profiles scale the
12 amount rows and the coarse table. Every row keeps the prerequisites
`reference_profile:aging_index` and `measurement:ird_taxable_income_ty2027_v1`
and stays `requires_prerequisites`, with no exemption, until composition
proves the measurement's single producer (R2C-1, R2C-15). The table opts into
per-band source-household support (`support_household_entity: household`),
which the `measurement_prefit` gate requires.

The 474 native rows move to the non-executable
`build/nz/income_diagnostic_references.json` (key `diagnostic_references`),
which no compiler, profile or gate reads; the G8-x native-band report compares
each coarse band with them. Records at or below the aged first cut stay
visible as below-first-cut in the boundary diagnostics; IRD's published nil
count stays a displayed comparator, not a target.

## 3. MSD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,14 @@
}
],
"params": {
"engine_ref": {
"binding": "nz_super",
"field": "engine_ref"
},
"period": {
"binding": "nz_super",
"field": "period"
},
"declaration": "{\"columns\":[{\"output_column\":\"nz_super_weekly_amount_before_tax_cents\",\"quantum\":\"0.01\",\"rounding\":\"half_even\",\"source_column\":\"nz_super_weekly_amount_before_tax\",\"source_tax_basis\":\"before_tax\"}],\"entity\":\"person\"}"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4413,6 +4413,102 @@
}
]
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b01_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b01"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b02_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b02"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b03_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b03"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b04_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b04"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b05_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b05"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b06_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b06"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b07_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b07"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b08_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b08"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b09_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b09"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b10_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b10"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b11_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b11"
}
},
{
"entity": "person",
"name": "ird_taxable_income_standin_band_b12_indicator",
"interval": {
"table": "ird_taxable_income_standin_ty2024",
"band": "b12"
}
},
{
"entity": "person",
"name": "age_18_24_indicator",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@
"kind": "legacy_json",
"schema_id": "legacy_json"
},
{
"path": "income_measurements.json",
"kind": "legacy_json",
"schema_id": "legacy_json"
},
{
"path": "income_diagnostic_references.json",
"kind": "legacy_json",
"schema_id": "legacy_json"
},
{
"path": "mass_references.json",
"kind": "legacy_json",
Expand Down Expand Up @@ -227,6 +237,11 @@
"kind": "legacy_json",
"schema_id": "legacy_json"
},
{
"path": "earnings_bands.json",
"kind": "legacy_json",
"schema_id": "legacy_json"
},
{
"path": "entitlement_graph.json",
"kind": "legacy_json",
Expand Down
Loading
Loading