Repository navigation
Conversation
The generator adds the coarse table ird_taxable_income_standin_ty2024 (person, right-closed, no nil band, floor_zero, first lower cut $40,000, cuts at $50k to $1m and an open tail: 12 bands) with count and amount companions on every band and per-band source-household support (support_household_entity: household), which measurement_prefit needs. It writes 24 rows in A's summed form: 12 count rows with value_operation sum and no operands, 12 identity amount rows measuring ird_taxable_income_proxy_nzd (R2C-10, R2C-17), each pinning its band's native labels and expected_member_count. The rows keep the prerequisites reference_profile:aging_index and measurement:ird_taxable_income_ty2027_v1, stay requires_prerequisites and are not exempt. The calibration document allows sum. R2C-4 moves the 474 native rows to the non-executable income_diagnostic_references.json (key diagnostic_references) and drops their exemptions. The national table loses its companions and becomes declared and validated only. The aging_index transform now scales the 24 rows and the coarse table. Invariants: each coarse band is the sum of whole native rows 50-244 (generator check, a feed-gated label audit and a differential that compiles each aged coarse row against its native rows' aged sum); the central first cut is exactly 4,468,436 cents; no native row sits in an executable document; the rows stay parked and unexempt without a producer; the scaled coarse table tiles the positive range for any positive factor (Hypothesis, through scale_interval_table and classify_records). The NZ composition tests add a compile-only measurement producer, as they already add synthetic money producers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
The hub's R2C-19 item 1 lifts the freeze on test_nz_generation_zero_views_come_from_the_country_spec_seam for F: NZ's legacy resources now include income_diagnostic_references.json, the non-executable home of the 474 native IRD rows (R2C-4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
test_nz_transport_declarations memoizes resolved reference views by the content of the documents the resolver reads. A's measurement proof now reads the transport graph too, so a view resolved for a graph without a measurement producer was reused for a graph with one, and the composition tests saw "no proof". The cache key now includes the graph. Checked: the full file passes in one process after the change; before it, the five composition tests failed only when an earlier test in the same process had cached a producer-less view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
R2C-4 moves the 474 native rows out of the executable documents, so the aging_index profiles scale the coarse stand-in table, not the national one. The hub's R2C-22 lifts the freeze for: - test_reference_profiles test_nz_default_factor_receipt_is_compact_and_covers_the_exact_roster: the receipt names ird_taxable_income_standin_ty2024 (12 bands) and 24 companions, whose source carries A's expected_member_count. - test_transport_composed_graph test_declared_scenarios_scale_national_cuts_with_their_own_factor: the per-scenario cut check moves to the coarse table (local name coarse), and the national and age tables must stay unscaled. Mutants: a resolver that also scales the national table turns both tests red (the second at tables[unscaled] == by_id[unscaled]); giving the low profile the central factor id turns the second test red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
Contributor
Author
|
Closing as included: #1478 landed this PR's commits on main in merge commit 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
G8-r2c hunk F (#1183): NZ's 474 native income rows become 24 coarse stand-in rows. Draft, with E (#1475) as its base; G (#1478) stacks on it. Paths as in #1475; tool file:line is at G's head (
64ef20af).Landing (R2C-21a, #1183 comment 6604753490). E, F and G land together. The hub fast-forwards G's branch to the fix rounds' top
f43e8fbb(#1486), retargets G (#1478) to main and lands it with one merge commit, which brings E's and F's commits. This PR never lands alone, and no check gates F by itself.Change
ird_taxable_income_standin_ty2024(tools/generate_nz_target_references.py:1355,_coarse_table): person, main'sird_taxable_income_proxy_centsand_universe_status, right-closed,nil_band: absent,floor_zero,first_lower_cut_cents: 4000000,diagnostics.support_household_entity: household, cuts at $50k ... $1m and an open tail: 12 bands, each withcount_referenceandamount_reference.coarse_band_members,:1260): each native row joins the band whose (lower, upper] holds its own upper cut; the generator refuses a band that doesn't end on a native cut or a set that doesn't tile rows 50-244. Result: b01 50-59, b02 60-69, b03 70-79, b04 80-89, b05 90-109, b06 110-134, b07 135-159, b08 160-209, b09 210-229, b10 230-233, b11 234-243, b12 244, as design §3's table.coarse_income_rows,:1299) in A's summed form (R2C-17): 12 count rows (value_operation: sum, no operands, measurepeople) and 12identityamount rows (measureird_taxable_income_proxy_nzd, R2C-10). Each pins its band's native labels indimension_valuesand itsexpected_member_count, familyincome, prerequisitesreference_profile:aging_indexandmeasurement:ird_taxable_income_ty2027_v1, statusrequires_prerequisites. The 5% tolerance is theincomefamily's incalibration_per_family_fit(within: 0.05, d1376); rows carry no tolerance field, as every NZ row.allowed_value_operationsaddssum(:871)._reference_selectionnever exempts a row with a measurement binding (:1021).N/income_diagnostic_references.json(keydiagnostic_references,executable: false,:896), and their exemptions go. The national table loses its companions (declared and validated only, indicators unchanged), and theaging_indextransform scales the 24 rows and the coarse table (:1591).N/reference_inventory.jsoncounts the diagnostic file;N/country_package.jsonregisters it;docs/nz-calibration-targets.mddescribes the coarse rows.Invariants and tests
test_nz_target_references.py::test_each_coarse_band_lists_exactly_its_native_rows_labelstest_coarse_amounts_equal_the_aged_sum_of_their_native_rowstest_nz_target_references.py::test_the_central_first_coarse_cut_is_4468436_cents,test_nz_reference_intervals.py::test_central_ageing_keeps_fractional_cent_cuts_exactlytest_no_native_ird_taxable_row_sits_in_an_executable_documenttarget_references.jsontest_the_24_coarse_rows_stay_parked_unexempt_without_a_producertest_nz_reference_intervals.py::test_coarse_table_has_12_bands_each_with_companions_and_supportsupport_household_entitytest_property_the_scaled_coarse_table_tiles_the_positive_range(Hypothesis, 80 examples, throughscale_interval_tableandclassify_records)The NZ composition tests in
test_nz_transport_declarations.pyadd a compile-only measurement producer when the graph has none (as they already add synthetic money producers), and the file's resolved-view cache now keys on the transport graph, because A's proof reads it (a52efb77).R2C-21: the one red test at F
test_transport_composed_graph.py::test_packaged_spec_refuses_with_every_activation_gap_namedstays red at F on E's text, as R2C-21 rules: the packaged spec's activation now also lists the 24 parked rows (placeholder reference target_references.ird_taxable_income_standin_…; awaits measurement:ird_taxable_income_ty2027_v1 (0 nodes declaring …)), so the exact count fails. G's producer lifts all 24 and the test passes there on E's text.R2C-19 and R2C-22 shared-test edits
test_spec_engine_country_bundles.py:263(income_diagnostic_references.json, R2C-19 item 1,8167c424)test_reference_profiles.py:1163,:1165,:1171,:1173,:1175,:1187(R2C-22,c9f5b0c2)test_transport_composed_graph.py:2424-2431and:2434-2435(R2C-22; local namecoarse)R2C-22's mutants: a resolver that also scales the national table turns both tests red (the second at
tables[unscaled] == by_id[unscaled]); giving thelowprofile the central factor id turns the second red.Hashes
The hub hashed 42 engine-free transport kernels (no
simulate.*) at each head, each in its own tree: int3e5f5edb, E8ec98c1c, F623afa09and Ga3fe1952, after which G's head64ef20afchanges only two test files. E, F and G hash identically to int, as does the int before D's merge (ba08d0f9), so this hunk moves no kernel hash.909fe3cb3e5f5edb(=ba08d0f9, E, F, G)calibrate.ordered_adam@10d4577effa147ebe0d4577effa147ebecalibration.prepare@1180823901b9a0d99180823901b9a0d99concepts.encode@17815fae8ed573af67815fae8ed573af6concepts.encode_groups@1062f88411ad605ab062f88411ad605abdiagnostics.calibration@130654dfc7038f56030654dfc7038f560export.prepare@1af31fa6e1690b90caf31fa6e1690b90cexport.readback@196be393c760ca76896be393c760ca768gates.battery@1ac050bab09f48dc2ac050bab09f48dc2geography.assign_atomic@1d60f7ec388903678d60f7ec388903678geography.derive@1d60f7ec388903678d60f7ec388903678geography.gate@1d60f7ec388903678d60f7ec388903678geography.person_location@13efcbe3741d044973efcbe3741d04497geography.support_from_facts@1ad0a8e73d20405bead0a8e73d20405begeography.support_import@1d60f7ec388903678d60f7ec388903678measure.combine@1d609832882ffc113d609832882ffc113money.annual_transfers@1c8a067cd750ed2fec8a067cd750ed2femoney.minor_units@1c8a067cd750ed2fec8a067cd750ed2femoney.normalize@1f10fbeeaf87467b6f10fbeeaf87467b6reporting.carry_income_decile@180335f0183c2741080335f0183c27410reporting.income_decile@180335f0183c2741080335f0183c27410reporting.receipt_group@180335f0183c2741080335f0183c27410takeup.assign@1b2a3a50cc376108bb2a3a50cc376108btakeup.bands@11ceca3ba7c7c9b921ceca3ba7c7c9b92takeup.cell_diagnostics@11ceca3ba7c7c9b921ceca3ba7c7c9b92takeup.compare@11605d7e8519f4b0f1605d7e8519f4b0ftakeup.gap@154f79560d896fab454f79560d896fab4targets.compile@1dc91d1479f8f84b1dc91d1479f8f84b1targets.problem@1fe401c736551e351fe401c736551e351transport.boundary@1fc9d10670f6a092ffc9d10670f6a092ftransport.create@1865c21926cee0ac0865c21926cee0ac0transport.create@2865c21926cee0ac0865c21926cee0ac0transport.currency@19c3457ddb908aa969c3457ddb908aa96transport.donor_ranges@162def362139a52e462def362139a52e4transport.donor_receipt@162def362139a52e462def362139a52e4transport.input_closure@123134112061495b723134112061495b7transport.package@1e86be552287a6eb3e86be552287a6eb3transport.quantile_map@1b25bb6538b19dd64b25bb6538b19dd64transport.quantile_map@2b845aac2c57f667b76c81605aa416dc9(moved)transport.scenario_override@1062f88411ad605ab062f88411ad605abtransport.support_bounds@12303c60a7ec6135c2303c60a7ec6135ctransport.unit_attributes@1f50ec74a1bfe35bbf50ec74a1bfe35bbtransport.weights_audit@11f3d4750134561271f3d475013456127transport.quantile_map@2moves only through int's merge of B'stail_estimators.pydocstring fix, which it digests.Tests
Closed list at int
ba08d0f9, E3e850e07and Ff5ed82ba(G at #1478), no--maxfail,-n 2. Counts read passed / skipped / failed. Merges of D's head (91bf4c0f) moved int to3e5f5edb, E to8ec98c1cand F to623afa09, and against each earlier head they change onlyT/compose.py,test_transport_measurement_prefit.pyandtest_transport_measurement_proof.py. The hub reran those two files at each new head (-n 0, with the feed):3e5f5edb8ec98c1c623afa09test_transport_measurement_prefit.pytest_transport_measurement_proof.pyThe E-G review ran F's list at
623afa09and found the same one red. Landing waits for green CI on #1478 against main.The closed list at the earlier heads:
frame/test_transport_donor.pyframe/test_transport_quantile.pytest_country_spec.pytest_nz_as_area_crosswalk.pytest_nz_as_bridge.pytest_nz_axiom_input_closure.pytest_nz_benefit_gross_up.pytest_nz_earnings_bands.pytest_nz_family_reconciliation.pytest_nz_joint_geography.pytest_nz_money_normalization.pytest_nz_msd_benefit_rates.pytest_nz_msd_pre_activation_reconciliation.pytest_nz_reference_aging.pytest_nz_reference_intervals.pytest_nz_spec_package.pytest_nz_target_references.pytest_nz_transport_declarations.pytest_nz_transport_toy_graph.pytest_reference_interval_support.pytest_reference_intervals.pytest_reference_profiles.pytest_reference_summed_bands.pytest_spec_engine_country_bundles.pytest_spec_only_country_packages.pytest_transport_annual_transfers.pytest_transport_binding_identity.pytest_transport_bridge_differential.pytest_transport_codecs_geography.pytest_transport_column_kernels.pytest_transport_composed_graph.pytest_transport_declared_units.pytest_transport_dependent_children.pytest_transport_entitlement_graph.pytest_transport_evidence_kernels.pytest_transport_gate_bindings.pytest_transport_gate_kernels.pytest_transport_graph.pytest_transport_grossup_selectors.pytest_transport_measure_kernels.pytest_transport_measurement_prefit.pytest_transport_measurement_proof.pytest_transport_money_kernels.pytest_transport_population_kernels.pytest_transport_quantile_map_v2.pytest_transport_receipt_v2.pytest_transport_receipt_v2_kernel.pytest_transport_reference_selection.pytest_transport_registry.pytest_transport_reporting_kernels.pytest_transport_run_entry_factors.pytest_transport_run_entry_forms.pytest_transport_source_household_lineage.pytest_transport_takeup_kernels.pytest_transport_target_kernels.pytest_transport_terminal_kernels.pytest_transport_weight_quality.pyuk/test_transport_gate_bindings.pySkips (18 at each head), each needing a source this container lacks:
test_nz_joint_geography.py11 (NZ_AS_AREA_SOURCES and NZ_JOINT_GEOGRAPHY_SOURCES unset);test_nz_as_area_crosswalk.py3 (pinned ArcGIS bytes);test_nz_axiom_input_closure.py2 (Axiom dense engine and a rulespec-nz checkout);frame/test_transport_donor.py2 (pinned real donor not cached). EveryNZ_CHRONICLE_ARTIFACTfeed audit ran, against the artifact I built from Chronicle8f4cfd57(both digests match the pin).Also at each head:
ci_test_plan.py verifyprintsverification=ok; the three source-free NZ builders'--checkandgenerate_nz_target_references.py --check(with the artifact) match; ruff is clean on the changed files.Generated by Claude Code