Repository navigation
Add opt-in declared tax-unit partitions and validated binary Axiom relation bindings, with NZ benefit units as a declared unit kind - #1438
Conversation
Add a versioned MultiUnitRule list with registered benefit and tax membership kinds, so a country can declare several unit partitions beside its households. transport.create@1 lifts the unchanged NZ rule and transport.create@2 reads the versioned list. Tax membership requires an explicit non-null boolean per person. Both eligible reciprocal partners pair; everyone else stays a singleton. Add frozen binary relation manifests to the Axiom adapter, with source and compiled tuple checks, related-input enumeration and identity-ordered native batches. A binding without relations keeps its identity and its legacy native call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sol's review of 76a137c found three defects, and an end-to-end test found a fourth: - A row mask could drop a relation member yet leave every unit populated, so no partition check saw it and the engine got partial data. Every rules kernel now refuses a node whose slices don't deliver its relations whole. - A related-input override on another entity wrote a column no batch reads, so it changed nothing. It now refuses, and a real root input of that name stays overridable. - transport.create@1 accepted non-family units. It keeps its old refusal, and transport.create@2 carries the wider domain. - Composition required id and membership columns in slices, which compile_graph refuses, so no relation node could compile. Tables always carry those columns, so only data columns need a slice. Composition and the rules kernels now share missing_relation_inputs. frame/kernels.py moves simulate.rules@1's hash, so the simulate parity pin is re-recorded with tools/graph_parity_repin.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The NZ source-citation test pinned the old one-line lift. The parser now binds the rule first, to keep the family-only refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ready for hub review This report comes from the NZ hub's cloud review. It isn't NZ's OK: the NZ hub reads it and answers Belgium. VERDICT: APPROVE Base: Hunk reproduction. The 12-file diff is 2,188 lines. Its SHA-256 is Environment. Python 3.13.18. One venv built with FindingsNone. I found no NZ input that S1, or S1 merged onto Two notes for the NZ hub. Neither is a request to Belgium.
Items1. CREATE@1 across commits: byte-identical. I ran
For each case I compared the person, household and family tables (columns, dtypes and full-precision CSV, index included), Result: 392 cases built units and were identical in every part. The other 310 refused at both commits with the same message: a dependent reference person, or co-resident parents in different units. No case built at one commit and refused at the other. The digests of the full result files match ( Why it holds:
2. Family-only refusal: unchanged, and keyed only on S1 also applies the check in 3. Unit attributes: same names, dtypes, nulls and values on NZ's rule. At both commits: Person row order, 4. At S1, 5. 6. Relation checks: no NZ node trips them, today or in the H23/H24 shapes.
What supplies the dependencies: the hand-kept The runtime and compose checks read the manifest, but a manifest that disagrees with the compiled artifact can't get past registry build, which runs in 7. Slices: no NZ slice names an entity id or membership column. I scanned every NZ resource. The only At 8. Hashes. I recomputed them with no engine, using the registration sequence of NZ uses 18 of the moved kernels, so NZ node keys re-key. No NZ resource or NZ test pins a hash or node key. On NZ inputs, behaviour holds:
9. Partitions. No NZ resource at 10. Merged tree.
No test passes on w3b and fails merged. I compared the junit outcomes of all 1,948 test IDs. The set of IDs and the failure assertions are the same on both trees; the only difference is the iteration order of a set. The five failures known on w3b, the same on both trees:
Skips:
S1 tests run for items 1 to 9:
Hash tableEngine-free implementation hashes (first 12 hex characters). The
Totals: 22 moved, 14 held, 1 added. 18 of the moved kernels sit in NZ's Generated by Claude Code |
Main adds #1441, which touches transport/entitlement.py and its tests. Nothing conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan steps S1 and S2a of the Belgian transport port, in
~/reviews/belgium-2026-10-12/transport-port/PLAN.md.WIP. The S1 lane stopped at its six-hour limit before it finished verifying, so I committed its work as it stood, and CI passed 10 of 10 at 9ecfa87. Before this leaves draft it needs CI at the merged head, Sol's agreement on that head, and NZ's OK.
What changes
frame/unit_construction.pygains a versionedMultiUnitRulelist with registered benefit and tax membership kinds.transport/unit_declarations.pyholds the CREATE refs and the one parser.transport.create@1lifts the unchanged NZ rule, andtransport.create@2reads the versioned list.frame/adapters/axiom.pygains frozen binary manifests, source and compiled tuple checks, related-input enumeration and identity-ordered native batches. A relation here links a declared group partition to its person members. Cardinalityonemeans exactly one selected member per root, andmanyallows none. A pure-Python injected adapter can't claim native relation execution.build/calibration_columns.pyinto the unit framework, with the contract unchanged.missing_relation_inputs. A node must declare each related data column, and no row mask may touch a dependency's entity. A mask can drop a member and leave every unit populated, so no partition check sees that loss.transport.create@1keeps its family-only refusal, andtransport.create@2carries the wider domain.No file under
build/be/orbuild/nz/changes, and no country activates anything.Invariants
test_every_declared_partition_nests_and_preserves_identity(Hypothesis)test_tax_partition_membership_changes_population_identity(Hypothesis)test_unit_weights_inherit_household_once(Hypothesis)test_a_nonreciprocal_or_self_pointer_never_forms_a_pair(Hypothesis)test_related_rows_order_by_identity_and_preserve_equal_values(Hypothesis)test_extra_manifest_and_undeclared_relation_refusetest_a_node_passes_only_with_every_relation_dependency_whole(Hypothesis),test_every_rules_entry_point_refuses_a_partial_relation,test_graph_refuses_a_row_mask_that_drops_a_relation_membertest_bridge_override_on_another_entity_refused,test_bridge_root_input_sharing_a_related_name_stays_overridabletest_absent_relation_identity_and_call_are_unchangedtest_bridge_aliased_related_input_override_refused,test_bridge_unaliased_related_input_override_reaches_native_batchtest_relation_inputs_must_be_explicit_graph_dependencies(Hypothesis)create@1refuses what it always refusedtest_legacy_create_keeps_its_family_only_domainDifferential tests.
test_nz_create_alias_is_byte_identical_to_declared_createcompares partitions, IDs, roles, inventories and inherited weights across the two CREATE versions.test_calibration_kernel_roster_framework_matches_previous_kernelcompares against a frozen copy of the helper at 09a2fce.What moves
transport.create@2added, and 14 held. The fix commit also editsframe/kernels.py, which movessimulate.rules@1. No production registry binds that ref, and the simulate parity pin is re-recorded withtools/graph_parity_repin.py.Executed
The lane ran these with real Axiom CLI 0.2.2, build e0bda64:
The lane killed the mutants in its table, apart from one that a later check masked. It added a direct regression for that one. Its file-by-file table reads 2,469 passed and 27 skipped across 28 files. The lane marked that report as in progress, so CI's result replaces it.
Review. Sol reviewed 76a137c and requested three changes, each with an executed reproduction. All three are in a395c1e. Writing the end-to-end test then exposed a fourth defect: composition required ID and membership columns in slices, and
compile_graphrefuses those, so no relation node could compile. The new check needs a slice only for data columns.Sol then agreed at a395c1e. Since that review, 9ecfa87 changes one citation test, and ecec60c merges main, which adds S3, w3a, #1422 and #1436. The merge conflicted in one place, the import block of
transport/cli.py, and both imports stay. The shared hunks match 9ecfa87's apart from one context line in that block. Merged with main 11c1f4e, every Belgian dump matches main byte for byte, and on a 33-ref check 19 kernel hashes moved, 14 held andtransport.create@2joined.eccd804 then merges #1441, with no conflict. The shared diff keeps the same SHA-256 as at ecec60c, and NZ gave its OK at that head.
Fix mutants. I removed each of the ten new guards in turn and ran both test files that reach them. All ten failed.
Limits
🤖 Generated with Claude Code