Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
820f0b1
Declare NZ transport inputs and reference activation
MaxGhenis Nov 1, 2026
c009451
Pin the NZ small-frame matrix to the receipt rows
MaxGhenis Nov 1, 2026
b32593d
Follow the NZ declarations through two stale test constants
MaxGhenis Nov 1, 2026
2b44c12
Declare the NZ transport and entitlement graphs (WIP)
MaxGhenis Nov 1, 2026
362f96e
Merge main into the NZ graph branch
MaxGhenis Nov 1, 2026
311b814
Round benefit nets to cents and carry household regions to persons
claude Nov 1, 2026
246ae91
Run the reg 17 and reg 18 bridge through existing kernels
claude Nov 1, 2026
0e457e9
Gate the AS payment on the engine judgment and apply MC11
claude Nov 1, 2026
15fa011
Compose the packaged NZ graph and refresh its golden
claude Nov 1, 2026
cab751b
Reach the exact-slice refusal in the closed export test
claude Nov 1, 2026
5e14e25
Merge remote-tracking branch 'origin/main' into nzhub/g8w3b-graph
claude Nov 1, 2026
daeafb1
Follow the money tests to the graph that now reads donor money
claude Nov 1, 2026
182cd23
Run the shared AS bridge on its FILTER branch in the toy and spec
MaxGhenis Nov 1, 2026
6edab2a
Merge remote-tracking branch 'origin/main' into nzhub/g8w3b-graph
MaxGhenis Nov 1, 2026
3e2181c
Refresh the NZ golden for the entitlement branch point
MaxGhenis Nov 1, 2026
2c2b467
Merge remote-tracking branch 'origin/main' into nzhub/g8w3b-graph
MaxGhenis Nov 2, 2026
a873b7b
Read the export contract's automatic columns from declared units
MaxGhenis Nov 2, 2026
fe33541
Clear #1440's roster failures and pin the graph builders
MaxGhenis Nov 2, 2026
bac6dc2
Admit Belgian regional and hyphenated RuleSpec paths
MaxGhenis Nov 2, 2026
e1d2707
Merge main (3100f311c, with #1430) into the NZ graph branch
MaxGhenis Nov 2, 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
1 change: 1 addition & 0 deletions changelog.d/nz-transport-graph.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Declare NZ transport and entitlement branches with independent calibration variants and an identity-factor hold-fixed sensitivity. Add a synthetic replay fixture, exact export and gate contracts, and positive-payment comparator inputs. A `money.minor_units@1` node rounds each weekly benefit net half-even to whole cents before its gross-up, and `geography.person_location@1`, in its own module, carries assigned household region codes to persons. The reg 17 base rate runs as one engine counterfactual and the reg 18 cutout as one zero-solve per population. The graph gates the Accommodation Supplement payment on the engine's non-rate judgment, excludes and counts superannuitant units outside S5, and pays them in S5 from NZ Superannuation before tax. Keep the package inactive while engine pins and money quantile producers remain open.
37 changes: 27 additions & 10 deletions docs/transport-entitlement.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,33 @@ comparing it with the hold-out reference. The toy graph
does this with its invented family-credit engine. It supplies no real WFF
inputs or statutory claim.

The committed `build/nz/as_rate_bridge.json` sole-parent declaration rules out
a `solve_zero` recipe for golden-08: no engine input combination reproduces
the harness's single-with-children gross rate paired with the Income Test 3
slope. It instead declares three evaluations, `gross_rate`,
`reduction_at_anchor` and `reduction_after_step`, whose outputs recover the
slope and lower threshold before assembling the cutout. The resource declares
the overrides, anchor, step, composition and refusal conditions. The driver
executes declared kernel calls but does not assemble this nonlinear
composition. The approved executable golden-08 case and evaluation assembly
therefore remain unresolved; no golden-08 result is claimed.
`build/nz/as_rate_bridge.json` declares both NZ bridge outputs as kernel
calls, with no new kernel. On each population that runs the Accommodation
Supplement engine, a `calibration.prepare@1` node writes the family masks the
equality-only bridge masks compare, a `simulate.counterfactual@1` node writes
the reg 18(3)(b) sole-parent Jobseeker Support rate, and a
`simulate.solve_zero@1` node writes the reg 18 cutout: the zero of each
unit's Jobseeker Support residual over weekly income on [0, 5000]. A sole
parent's residual is the sole-parent rate minus the Income Test 3 reduction;
every other unit's residual is its own net payment. The resource keeps the
harness expressions as the statement of equivalence. Each branch runs its own
reg 17 base-rate counterfactual: zero-income Jobseeker Support once for a
single unit and twice for a partnered one, plus the eldest-child family tax
credit over 52 for a unit with a dependent child. The tests in
`test_nz_as_bridge.py` reproduce golden-08's base rate and cutout with a
labelled fixture engine; no real-engine result is claimed.

rulespec-nz's rounded Accommodation Supplement payment never reads the
module's non-rate entitlement judgment, so the NZ graph gates the payment in
the host. Each branch's `positive_payment` node (`calibration.prepare@1`)
holds where the payment exceeds zero and the judgment reads "holds" (code 1;
undetermined fails), and, in every branch but S5, where the unit's receipt
group is not superannuitant (MC11's exclude-and-count). A
`simulate.counterfactual@1` node then writes
`accommodation_supplement_entitled_weekly_payment`, the rounded payment
masked on that indicator, which the dollar comparator, the reporting cells
and the gates read. S5 instead pays superannuitant units from a reg 17 base
rate that takes NZ Superannuation before tax.

The hub can compare approved small cases and sampled-unit outputs without donor
H5 I/O using the declared case format in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def predicate_mask(
part = values.eq(value)
elif operator == "ge":
part = values.ge(value)
elif operator == "gt":
part = values.gt(value)
elif operator == "lt":
part = values.lt(value)
elif operator == "in" and isinstance(value, (list, tuple)) and value:
Expand Down Expand Up @@ -165,6 +167,8 @@ def _validate_input(values: pd.Series, domain: Mapping[str, Any], name: str) ->
_finite_number(value) and value >= 0 and value == int(value)
for value in values.tolist()
)
elif kind == "nonnegative_number":
valid = all(_finite_number(value) and value >= 0 for value in values.tolist())
else:
allowed = domain["values"]
valid = all(
Expand All @@ -178,7 +182,12 @@ def _validate_input(values: pd.Series, domain: Mapping[str, Any], name: str) ->
def _input_domain_kind(domain: Mapping[str, Any], name: str) -> str:
"""Share domain-schema validation between activation and table validation."""
kind = domain.get("kind")
if kind in ("identity", "signed_integer", "nonnegative_integer"):
if kind in (
"identity",
"signed_integer",
"nonnegative_integer",
"nonnegative_number",
):
return kind
if isinstance(domain.get("values"), (list, tuple)) and domain["values"]:
return "values"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"rent_allocation": "reference_unit",
"asset_test": true,
"area_column": "as_area",
"rent_factor": 1
}
Loading
Loading