Repository navigation
Conversation
The generator adds the TY2026 wage interval table ird_wage_salary_national_ty2026 (rows 7-241, right-closed, no nil band, negative wages refused, open tail over $1,000,000) from the pinned feed's labels, and activates the 235 P1 precal rows, which drops their exemptions. The transport builder writes earnings_bands.json: for each aging_index profile, every edge is cut_cents x P1 factor / 100, computed in Fraction and rounded once to binary64, with the factor id, its receipt SHA-256 and the wage table's SHA-256. nz.earnings.map (transport.quantile_map@2, grouped_pareto_mle@1 on rows 231-241) rewrites person.employment_income beside nz.money.normalize, and nz.earnings.cents writes employment_income_cents half-even, both before nz.encode.person. Each calibration variant repeats them with its own profile (V1 low, V2 high). R2C-6 adds person.employment_income to the export contract and both slices. Three wage labels repeat the previous upper endpoint ($20,000, $50,000, $80,000: rows 27, 57, 87); the generator pins them and the right-closed cuts give each endpoint to the lower band. Invariants: every edge equals cut x factor exactly for every profile (example test, plus a builder --check that refuses a hand-edited edge, a stale factor receipt, a stale table and a changed tail); the edges stay contiguous and increasing for any positive factor (Hypothesis); the scaled-edge map equals the unscaled map x f within 2^-49 relative (measured at most 4.3e-16); the toy's @2 support row is quantile_mapped with 0 records outside. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
test_nz_spec_package pins the active row count per reference set. G8-r2c E activates the 235 wage rows, so precal's active count moves from 80 to 315. The calibration and hold-out counts stay as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
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 lifts the freeze for these tests on E. Each edit follows from what E changes in NZ's own resources: - test_spec_engine_country_bundles: NZ's legacy resources include earnings_bands.json. - test_transport_composed_graph: _GAPS no longer names the person.employment_income quantile-map gap, which nz.earnings.map closes. - test_transport_evidence_kernels: the roster gains one quantile_mapped row (R2C-6), and derived rows miss only rent and liquid assets; the per-row assertion over every derived row stays. - test_transport_quantile_map_v2: _spec_with_map first removes the packaged nz.central producer of employment_income, so the kernel under test stands alone; that spec without a map still reports a central wage gap; the packaged spec reports none. Both accepted kernels and the transport.currency@1 refusal stay. Mutant run: with _money_producer_gaps accepting any kernel, test_composition_accepts_v2_as_the_quantile_mapped_money_producer goes red (the currency@1 refusal finds no gap). 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
- income_measurements.json (written by the transport builder) holds C's measure.combine@1 declaration for ird_taxable_income_ty2027_v1 from design 80's component table: person, floor 0, scale 100 (R2C-10), rental income as the add-back, outputs ird_taxable_income_proxy_cents, _nzd and _universe_status. A VSI sibling drops the four transfer addends. The document also holds the omission register (every size "unknown": the design's percentages have no repo source), VSI's review triggers and the R2C-8 wage-earner diagnostic, none of them gates. - nz.income.standin (measure.combine@1, measurement_id ird_taxable_income_ty2027_v1) runs after nz.benefits.annual_transfers and before nz.targets.prepare on every calibration branch. A's proof names it as the measurement's only producer for nz.calibrate, which lifts the 24 coarse rows' measurement prerequisite. - calibration_bindings.json binds the coarse table's 12 band indicators by interval; prepare reads the measure and universe columns, and the problem reads them plus household.source_household_id, which targets.problem@1's per-band support needs (target_kernels.py:994-1002, reference_intervals.py:1137-1160). - R2C-2: the S5 stage nz.precal.nz_super lists NZS eligibility and the before-tax weekly amount, with the cents as a derived output; nz.gross_up.super_cents names the nz_super engine_ref and period. - Scenarios VSI (income_measure vsi), VEX (exposure.central "0.75", a declared judgment, R2C-7) and VPT (earnings_tail_anchor vpt) with their knob domains; both cell-support gates require them, and the structural-zero superannuitant cell lists them. - gates.json adds measurement_prefit with R2C-3's frozen numbers and R2C-18's six evidence aliases, none wired, so the gate refuses for missing evidence until G8-x. R2C-20: the NZS sharing input keeps its default; the binding needs a new transform kind, which the hub carries as H1 and H2. Invariants: A's proof finds exactly nz.income.standin and refuses a second declaring producer; without the stand-in the 24 rows refuse activation by name; VSI omits exactly the four transfer columns; each declaration's digest is its canonical text's; the prefit entry equals R2C3_PREFIT_THRESHOLDS; the S5 guard refuses a reader of a non-public nz_super column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
The hub's R2C-23 extends R2C-19 item 1 to G: test_nz_generation_zero_views_come_from_the_country_spec_seam lists income_measurements.json, the new home of C's declaration. As R2C-23 asks, E's earnings_bands.json moves to its sorted place between currency_bridge.json and entitlement_graph.json; F's and G's lines sit in theirs. The test passes (22 of 22). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
G's closed list showed NZ resources and tests that pin the scenario set or the pre-G state: - reporting_classifiers.json's baseline_cell_contract lists VSI, VEX and VPT, so every scenario has a baseline cell contract. - VEX's knob is the number 0.75 (central 1), as NZ's scenario contract wants for a non-list domain; the builder writes it into the annual-transfers declaration as the exact decimal text "0.75". - NZ tests: the scenario list and structural-zero cells include the three variants; the active-or-exempt check accepts the coarse rows as active once A's proof holds; the family-reconciliation check prepares without G's person interval outputs; the MSD rate check strips super_cents' S5 provenance selections, which name the stage and not the rounding, because the shared helper prepares only two bindings. Checked: the 59 tests that failed or touch these lines pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
The hub's R2C-24 lifts the freeze for two lines on G: - test_transport_weight_quality test_adopted_cell_targets_are_flagged_and_never_block: 43 * 10 becomes 43 * 13, because both cell-support gates now require 13 scenarios (main's 10 plus VSI, VEX and VPT). - test_transport_evidence_kernels test_the_nz_roster_classes: derived 307 becomes 321. G adds 14 derived rows: the stand-in's measure and universe columns and the 12 coarse band indicators. The per-row assertion stands; all 321 rows miss exactly rent and liquid assets. Both tests pass at this commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
The 12 coarse amount rows measure ird_taxable_income_proxy_nzd, and targets.problem@1 refuses any target whose measure its node doesn't slice (T/target_kernels.py _compiled_problem: "every reference must name columns the node slices"). G wired the measure and universe columns and the source households but not this one, so a real run would have refused the 12 amount rows. Every calibration branch's problem now reads it. The test now checks that the problem slices every income row's measure. With the builder and resources reverted it goes red; with them it passes. This adds one derived row to the support roster (322), so test_the_nz_roster_classes' R2C-24 count of 321 goes red; the hub rules on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6Fwj4yUEPsD3wfNstU
a3fe195 adds person.ird_taxable_income_proxy_nzd to the problem inputs of every calibration branch, so the unit column joins the support roster as a derived row. R2C-25 amends R2C-24's second line in test_the_nz_roster_classes from 321 to 322. The per-row assertion stays as it was: every derived row still misses exactly household.rent and person.liquid_financial_assets. I ran the test at this head and it passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6J45cyZzJWT9gGBLYB
Three G items had no test. The S5 guard now has a test that refuses a reader of each nz_super rules output once the stage stops listing it (design 80 section 6 G). Every prepared table on the stand-in's income and universe columns must declare no nil band, because C excludes every record at x <= 0 (R2C-14, brief item 7); declared-only tables keep IRD's. A Hypothesis property runs the packaged central and VSI declarations through combine_measure and checks that VSI equals the market sum with the rental add-back, that central less VSI equals the four transfers, and that each status is included exactly when x > 0. The new tests pass at this head. Their mutants are in #1478's body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6J45cyZzJWT9gGBLYB
Give the synthetic NZ toy its own counterpart of each piece G packages: a measure.combine@1 stand-in node with measurement_id, its declaration (floor 0, scale 100, rental as the one add-back), a cents node for the mapped wage, a three-band coarse table with no nil band, six summed rows (sum counts, identity amounts) over invented native member facts, a scale_money_and_intervals ageing profile resolved against a pinned toy feed, the prepare and problem inputs (the problem slices the unit column, R2C-25), target_profile_coverage and a diagnostic measurement_prefit entry with the packaged required_evidence list. Invariants, each checked by a new toy test: the six rows enter the problem matrix once with nonzero support; target_profile_coverage passes with income required; measurement_prefit's only failures are one evidence line per unwired alias (R2C-18); each coarse value equals its declared members' sum (times the ageing factor for amounts). A Hypothesis property checks the band membership of any toy incomes. Two existing toy tests count the new rows: n_targets moves from 4 to 10, and the compiled-row test reads the effective (profile-resolved) view. The full toy file passes (30 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FpF7dJcTwxa1pX54W
The drop-the-node mutant made the toy fixture itself refuse, so no toy test asserted the reason. This test removes nz.income.standin from a copy of the toy spec and checks that activation names each of the six coarse rows and measurement:toy_income_standin_v1, as A's proof requires (R2C-1). The toy file passes in full (31 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FpF7dJcTwxa1pX54W
compose's _check_measurement_proofs runs on the transport skeleton, before the scenario extensions append their branches, so it checks R2C-15 for nz.calibrate only and never sees the eight variant calibrations (nz.v.<V>.calibrate). The new test composes NZ's packaged graph and, for each of the nine calibration nodes, asserts that exactly one compiled ancestor declares ird_taxable_income_ty2027_v1, that it is that branch's stand-in, and that no other ancestor writes any of the proof's columns as an output or an EXPAND cell. A cached helper composes the graph once per process for this test and the existing compile test. Mutants, each restored after its run: - Removing nz.v.VSI.income.standin from scenarios.json fails the new test's declarer assertion (the test helper substitutes nz.v.VSI.synthetic_measurement), while the existing compile test passes. - Dropping that stand-in's measurement_id, or adding an undeclared second writer of a proof column to VEX, makes composition refuse the graph with two owners of one column, before the new test's assertions run. No NZ scenario declares an EXPAND node, so no mutant reaches the EXPAND-cell clause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The E-G review's fix 3. Only the Chronicle feed, which CI doesn't load, checked R2C-16's membership, so a coarse row that lost a member label passed every feed-free test. The new test reads the committed income_diagnostic_references.json: each coarse row's labels equal, in order, the labels of the native rows its metadata.native_rows names, its selector otherwise equals theirs, and each measure's rows tile 50 to 244 once. Without the feed, the review's b05 member drop turns this test red and no other in test_nz_target_references.py, test_nz_reference_intervals.py or test_nz_spec_package.py (1 failed, 1237 passed, 42 skipped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The E-G review's fix 4. Only the feed checked the wage table's cents against their labels, so a $1 change to one upper_cent passed every feed-free test, even after the builder rewrote earnings_bands.json to match. The new test reads each band's committed label as the right-closed band (a - 1, b] dollars, so the cut below it is 100(a - 1) cents and its upper_cent is 100b. A label whose lower endpoint repeats the previous band's upper one starts at that cut, and the test pins those rows to 27, 57 and 87. Without the feed, the review's row_107 mutant turns this test red and no other in test_nz_transport_declarations.py or test_nz_earnings_bands.py (1 failed, 63 passed, 2 skipped). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Belgium's hub asked for this rename when it cleared E to G's shared test lines: since F, the test checks the coarse stand-in table, not the national one. Only the name changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stack last met main at D's head (91bf4c0). Since then main has landed eleven PRs whose content the stack lacks: #1432, #1442, #1410, #1428, #1051, #1444, #1471, #1479, #1472, #1477 and #1463. #1472 brings the holdout test whose pinned NZ stage set the next commit extends (R2C-26). git merge-tree resolves the merge without conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G's nz.precal.nz_super (R2C-2) adds the nz_super binding to NZ's precalibration stages. At main + G, this test failed on its pinned set alone, and the stage guard itself accepts the stage: test_packaged_precalibration_stages_pass_the_stage_guard[nz] Hub ruling R2C-26 lifts the freeze for this one line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
G's 714e10d adds twelve stand-in income band outputs to NZ's calibration_bindings.json, each an "interval" entry. The tests in test_calibration_columns.py call prepare_calibration_columns on that file without the effective interval document, so the check at packages/microcosm-build/src/microcosm/build/calibration_columns.py:106-107 refuses them with "Interval outputs need the effective interval document." Brief 214 counted 17 such failures at 891cb9f. The prepare kernel passes the document (packages/microcosm-build/src/microcosm/build/transport/target_kernels.py:679); these tests call the function directly. _bindings() now drops the interval entries, and a new test pins the refusal: NZ's packaged bindings declare interval outputs, and prepare_calibration_columns refuses them without the document. The file's interval tests still cover interval outputs on their own fixture. With the fix the file gives 106 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Closing this probe before #1478 lands. It ran CI for the E–G stack with its fix round (f43e8fb) against main. #1478 now carries the same head to main, and its run 41729696579 tested f43e8fb merged with main 79a533c (merge commit dcf8841). If this PR stayed open, GitHub would mark it merged once f43e8fb reaches main. The branch stays: it's #1488's base until #1488 retargets. 🤖 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.
This PR exists only to run CI on the G8-r2c E-G stack (#1183). It's a draft; don't merge it.
This repo's workflow runs only on pushes to main and on PRs into main, so no CI has run on the stacked E-G PRs (#1475, #1476, #1478, #1483 and #1486). Brief 214 found 17 failures in
test_calibration_columns.pyat main plus G (#1183 comment 6601256348). That file sits outside G's 58-file closed list, so the hub's runs never reached it. This PR's head is the fix round's branch,nzhub/g8r2c-g-fix1, now at20507ad8. So CI runs the whole suite on main merged with E, F, G, the toy tests and the fix round. The hub fixes what CI finds on that branch (ruling R2C-28, comment 6601354890), and each push reruns CI here.The hub closes this PR once G lands through #1478.
🤖 Generated with Claude Code