From 0f628e73ee246add6957533b8ef1deeb660662be Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 16 Nov 2026 09:44:09 -0500 Subject: [PATCH] Pin Belgium's Axiom engine at 753ce7d9 and refresh its input surface Belgium's input surface (be.json) is regenerated at rulespec-be 632e1da1, the bindings' RuleSpec pin, and axiom-rules-engine 753ce7d9, New Zealand's engine pin. The refresh used the NZ hub's 753ce7d9 CLI and dense extension (the engine tree matches the commit file for file; wheel sha256 054c9196...). The same setup regenerates main's nz.json byte for byte. No module's bytes, inputs, status or canonical names move, only rulespec.commit and engine.commit: the five rulespec-be country trees are identical at b105e2b3 and 632e1da1. - axiom_rules_bindings.json pins engine commit 753ce7d9 and the wheel's sha256, as nz/axiom_rules_bindings.json does. The surface is now generated at the RuleSpec pin, so the verification note drops its ancestor check, and verified_on moves to 2026-11-16. The period and views notes cite parse_period_kind and parse_dtype at 753ce7d9. - axiom_input_closure.json records the new surface pins and the mapping's new RuleSpec commit, and engine_optional_evidence is re-cited at 753ce7d9. One sentence changes in substance: at 753ce7d9 a RuleSpec document has an inputs block, which gives no input a default (the engine keeps it only for only_related and selected-year checks and for elections), and none of the 116 surface modules has one. The evidence also says that the first row error fails the whole request. The four engine source pins move to 753ce7d9. - axiom_concept_mappings/be.json takes the surface's RuleSpec commit as its engine_version, as test_axiom_concept_mapping.py requires, and five unmapped reasons now say "at 632e1da1". The concept-coverage golden and doc are regenerated. - The engine-pin test now checks that the pin is the surface's and the closure's engine. Belgium's activation test no longer expects the two pin gaps; a benefit-unit rule and a transport graph remain. The country-spec golden moves by two resource hashes and the fingerprint. - The surface README and the refresh tool's docstring say both snapshots record 753ce7d9, build the extension with --locked, and give Belgium's new RuleSpec commit. Belgium stays inactive. Co-Authored-By: Claude Opus 5.5 --- changelog.d/be-axiom-engine-pin.changed.md | 1 + docs/concept-coverage/axiom-be.md | 12 ++++----- .../build/be/axiom_input_closure.json | 18 ++++++------- .../build/be/axiom_rules_bindings.json | 16 ++++++------ .../shared/test_be_axiom_input_closure.py | 26 +++++++++++++------ .../shared/test_be_target_references.py | 7 +++-- .../tests/golden/be_country_spec.json | 6 ++--- .../adapters/axiom_concept_mappings/be.json | 12 ++++----- .../shared/test_axiom_concept_mapping.py | 2 +- .../fixtures/axiom_input_surfaces/README.md | 21 ++++++++------- .../fixtures/axiom_input_surfaces/be.json | 4 +-- .../golden/concept-coverage/axiom-be.json | 12 ++++----- tools/refresh_axiom_input_surface.py | 18 ++++++------- 13 files changed, 83 insertions(+), 72 deletions(-) create mode 100644 changelog.d/be-axiom-engine-pin.changed.md diff --git a/changelog.d/be-axiom-engine-pin.changed.md b/changelog.d/be-axiom-engine-pin.changed.md new file mode 100644 index 0000000000..371952489f --- /dev/null +++ b/changelog.d/be-axiom-engine-pin.changed.md @@ -0,0 +1 @@ +Belgium's Axiom input surface (`be.json`) is regenerated at rulespec-be 632e1da1, the bindings' RuleSpec pin, and axiom-rules-engine 753ce7d9, New Zealand's engine pin. No module's inputs, status or canonical names move: only the two pins do. `be/axiom_rules_bindings.json` now pins that engine commit and its wheel's SHA-256, so the bindings are no longer an activation gap. The input closure's engine citations, the concept mapping's RuleSpec commit and the concept-coverage report move with them. Belgium stays inactive: it still lacks a benefit-unit rule and a transport graph. diff --git a/docs/concept-coverage/axiom-be.md b/docs/concept-coverage/axiom-be.md index 6cb54a65e6..73f180bbb0 100644 --- a/docs/concept-coverage/axiom-be.md +++ b/docs/concept-coverage/axiom-be.md @@ -1,6 +1,6 @@ # Concept coverage: axiom:be -Engine version `b105e2b3a3086ddd2de447d58a9b951346870dd1`; concept schema `5a55669d0447`. Generated by `tools/refresh_concept_coverage.py`; do not edit by hand. +Engine version `632e1da1110ba881c68165e0cd3c2287b5b8ab08`; concept schema `5a55669d0447`. Generated by `tools/refresh_concept_coverage.py`; do not edit by hand. - Engine inputs: 1867 - Fed by a concept: 109 @@ -37,15 +37,15 @@ Engine version `b105e2b3a3086ddd2de447d58a9b951346870dd1`; concept schema `5a556 | Concept | Reason | |---|---| -| `fact:person.sex` | rulespec-be at b105e2b3 has no input that reads sex. No surface input name and no non-test rule text mentions sex or gender. The one sex-dependent provision found, Brussels social-housing child-bedroom pairing, is left out of the module: social_housing_rental.yaml lists 'exact child-room pairing from person-level sex/age arrays' among what it leaves to separate surfaces. It enters only as the supplied Household count brussels_social_housing_child_bedrooms_required. | -| `fact:person.rental_income` | rulespec-be at b105e2b3 has no input that net rental income determines. (1) belgium_pit_net_immovable_income (Person, CIR art. 6) is a net-income category that taxable_income.yaml 'expects ... to have already been determined under the category-specific CIR 1992 rules', and no module derives it. (2) belgium_social_integration_annual_property_rent (RIS art. 26) lives on Household, and no transform puts a person amount on a Household input. (3) belgium_pit_article_17_non_copyright_movable_property_rental_use_or_concession_income is income from movable property, which is outside the concept's land-and-buildings scope. | -| `fact:person.realized_capital_gains` | rulespec-be at b105e2b3 encodes no capital-gains rule: no non-test module mentions capital gains, plus-values or meerwaarden. The nearest inputs are legal net-income categories that realized gains do not determine. One is belgium_pit_net_miscellaneous_income (Person, CIR art. 6 in taxable_income.yaml), which the module takes as already determined under category-specific rules. The others are the TaxUnit belgium_pit_spouse_{a,b}_article_90_items_1_to_4_and_12_income slots in the art. 127 joint-assessment allocation. | -| `fact:person.liquid_financial_assets` | rulespec-be at b105e2b3 takes movable capital only as means-test inputs. belgium_social_integration_movable_capital_amount (RIS art. 27, in regulations/social_integration/resource_calculation.yaml and statutes/social_integration/payable_amount.yaml) lives on Household, and no transform puts a person amount on a Household input; the module also counts it through an owner fraction it takes as two further inputs (belgium_social_integration_movable_capital_numerator_share over belgium_social_integration_movable_capital_account_holder_count). brussels_apa_movable_capital_amount (Person, be-bru/statutes/disability/elderly_care_allowance.yaml; APA order of 28 January 2021 art. 16: 'Pour les capitaux mobiliers, placés ou non, il est porté en compte une somme égale à 6 % des capitaux.') is the one Person-level candidate. It counts all movable capital, invested or not, which is broader than the concept. The APA module also reads it as the movable capital of the beneficiary and the person they form a household with, not the beneficiary's alone: brussels_apa_movable_capital_deemed_annual_income turns it into deemed income at 6 %, and brussels_apa_annual_income_before_disregard multiplies the summed income by brussels_apa_household_income_split_factor, which is 0.5 when the person forms a household and both members are entitled to the allowance (art. 5 § 2: 'il est tenu compte pour chacune des deux personnes de la moitié du revenu du ménage') and 1 otherwise. It is left for a reviewed Belgian binding. | +| `fact:person.sex` | rulespec-be at 632e1da1 has no input that reads sex. No surface input name and no non-test rule text mentions sex or gender. The one sex-dependent provision found, Brussels social-housing child-bedroom pairing, is left out of the module: social_housing_rental.yaml lists 'exact child-room pairing from person-level sex/age arrays' among what it leaves to separate surfaces. It enters only as the supplied Household count brussels_social_housing_child_bedrooms_required. | +| `fact:person.rental_income` | rulespec-be at 632e1da1 has no input that net rental income determines. (1) belgium_pit_net_immovable_income (Person, CIR art. 6) is a net-income category that taxable_income.yaml 'expects ... to have already been determined under the category-specific CIR 1992 rules', and no module derives it. (2) belgium_social_integration_annual_property_rent (RIS art. 26) lives on Household, and no transform puts a person amount on a Household input. (3) belgium_pit_article_17_non_copyright_movable_property_rental_use_or_concession_income is income from movable property, which is outside the concept's land-and-buildings scope. | +| `fact:person.realized_capital_gains` | rulespec-be at 632e1da1 encodes no capital-gains rule: no non-test module mentions capital gains, plus-values or meerwaarden. The nearest inputs are legal net-income categories that realized gains do not determine. One is belgium_pit_net_miscellaneous_income (Person, CIR art. 6 in taxable_income.yaml), which the module takes as already determined under category-specific rules. The others are the TaxUnit belgium_pit_spouse_{a,b}_article_90_items_1_to_4_and_12_income slots in the art. 127 joint-assessment allocation. | +| `fact:person.liquid_financial_assets` | rulespec-be at 632e1da1 takes movable capital only as means-test inputs. belgium_social_integration_movable_capital_amount (RIS art. 27, in regulations/social_integration/resource_calculation.yaml and statutes/social_integration/payable_amount.yaml) lives on Household, and no transform puts a person amount on a Household input; the module also counts it through an owner fraction it takes as two further inputs (belgium_social_integration_movable_capital_numerator_share over belgium_social_integration_movable_capital_account_holder_count). brussels_apa_movable_capital_amount (Person, be-bru/statutes/disability/elderly_care_allowance.yaml; APA order of 28 January 2021 art. 16: 'Pour les capitaux mobiliers, placés ou non, il est porté en compte une somme égale à 6 % des capitaux.') is the one Person-level candidate. It counts all movable capital, invested or not, which is broader than the concept. The APA module also reads it as the movable capital of the beneficiary and the person they form a household with, not the beneficiary's alone: brussels_apa_movable_capital_deemed_annual_income turns it into deemed income at 6 %, and brussels_apa_annual_income_before_disregard multiplies the summed income by brussels_apa_household_income_split_factor, which is 0.5 when the person forms a household and both members are entitled to the allowance (art. 5 § 2: 'il est tenu compte pour chacune des deux personnes de la moitié du revenu du ménage') and 1 otherwise. It is left for a reviewed Belgian binding. | | `fact:person.weeks_worked` | rulespec-be has no input for weeks worked in a year. Its work-history inputs are day or hour counts over windows that run back from a claim. Examples: belgium_unemployment_article_30_countable_work_days_since_prior_admission_in_extended_reference_period (312 work days within a 36-month reference period, admission.yaml), and belgium_health_waiting_stage_assimilated_work_days/_hours (windows of one to 36 months, with the length supplied as the separate input belgium_health_waiting_stage_reference_months, waiting_stage.yaml). These need a claim date, count days rather than weeks, and depend on an assimilated-day classification that the module leaves to separate surfaces. Multiplying weekly hours by weeks (a Product transform) would still give annual hours, not hours inside the claim window. | | `fact:person.educational_attainment` | rulespec-be has no input that reads completed education. No non-test rule text mentions an attainment level, certificate or ISCED level. Every education input describes current enrollment or training: flanders_school_allowance_education_level, study_allowance_is_higher_education, and the Child-entity family-benefit training flags, including wallonia_family_benefits_child_in_qualifying_diploma_training. Where this mapping binds these, it feeds them from education_enrollment. | | `fact:person.enrolled_full_time` | rulespec-be has no input that tests full-time enrollment. The full-time wording in non-test rule text concerns work regimes (parental leave, the work bonus, unemployment admission, the Flemish jobbonus). The one exception is a Flemish school-allowance parameter citing 'voltijds secundair onderwijs', and that module selects it by education level alone. The student statuses the tree does take are supplied legal statuses, and the rules that consume them contain no full-time test: belgium_self_employed_is_student (RD 38 art. 12bis) and the Child-entity family-benefit training and 'qualifying' flags. | | `fact:person.take_up_seed` | rulespec-be computes legal entitlements and has no take-up or participation input. Its only claim-type inputs are eligibility conditions or elections, not decisions to take up the program the rule computes: belgium_social_integration_social_benefit_rights_asserted (a RIS art. 3-4 condition), brussels_apa_required_other_benefit_rights_claimed (an APA eligibility conjunct), and belgium_pit_article_1458_pension_savings_reduction_claimed (a non-cumulation election against the art. 145/7 reduction that also needs pension-savings payments). | -| `fact:household.mortgage_principal` | rulespec-be at b105e2b3 has no input for mortgage capital repayments. The only housing-loan inputs are the interest deductions belgium_social_integration_eligible_annual_mortgage_interest_on_property (RIS art. 25 §4) and brussels_apa_eligible_annual_mortgage_interest (APA art. 15), which this mapping feeds from mortgage_interest. No non-test rule text mentions capital repayment, and the PIT reductions module takes no loan input. | +| `fact:household.mortgage_principal` | rulespec-be at 632e1da1 has no input for mortgage capital repayments. The only housing-loan inputs are the interest deductions belgium_social_integration_eligible_annual_mortgage_interest_on_property (RIS art. 25 §4) and brussels_apa_eligible_annual_mortgage_interest (APA art. 15), which this mapping feeds from mortgage_interest. No non-test rule text mentions capital repayment, and the PIT reductions module takes no loan input. | | `fact:household.source_household_id` | Original donor household lineage is build provenance and weight diagnostic support, not a rulespec-be legal input. | ## Inputs no concept covers diff --git a/packages/microcosm-build/src/microcosm/build/be/axiom_input_closure.json b/packages/microcosm-build/src/microcosm/build/be/axiom_input_closure.json index c6e779469f..4cf63b1d95 100644 --- a/packages/microcosm-build/src/microcosm/build/be/axiom_input_closure.json +++ b/packages/microcosm-build/src/microcosm/build/be/axiom_input_closure.json @@ -7,20 +7,20 @@ "work_package": "PR 4a (Child bindings and input closure); PR 4b adds the graph that runs them", "mapping": { "engine": "axiom:be", - "engine_version": "b105e2b3a3086ddd2de447d58a9b951346870dd1" + "engine_version": "632e1da1110ba881c68165e0cd3c2287b5b8ab08" }, "input_surface": { "fixture": "packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/be.json", - "rulespec_commit": "b105e2b3a3086ddd2de447d58a9b951346870dd1", + "rulespec_commit": "632e1da1110ba881c68165e0cd3c2287b5b8ab08", "engine": { "repository": "TheAxiomFoundation/axiom-rules-engine", - "commit": "04315d94d04efd61e27665ab3aa300d64fdf3a66" + "commit": "753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d" } }, "rulespec_pin": { "commit": "632e1da1110ba881c68165e0cd3c2287b5b8ab08", "method_card_row": "BE-MC0", - "note": "The input-surface generator used b105e2b3a3086ddd2de447d58a9b951346870dd1, an ancestor of the pin 632e1da1110ba881c68165e0cd3c2287b5b8ab08. Each listed module has the same bytes at both commits, and its SHA-256 below matches at both." + "note": "The input surface was generated at the pin, and each listed module's SHA-256 below is its SHA-256 there." }, "rulespec_paths": { "be-bru/statutes/family_benefits/basic_amounts.yaml": "6dab96b7260c8a38d06eee900a8e2192d1ec8654a9f11011ba901f7f76cc27fa", @@ -45,28 +45,28 @@ "The routing bridge's region code defaults to a code outside the four regions, so the bridge pays nothing until a node supplies each child's code. Until then no routing copy of a regional scheme's default changes the bridge's result; most copies keep the reason of the regional module they repeat.", "A flag whose value is fixed wherever its one reader can change a result takes that value, and its reason shows why (the German-speaking no_current_article_9_entitlement, true)." ], - "engine_optional_evidence": "The axiom-rules-engine commit named in input_surface.engine (the engine that generated the committed input surface) gives these modules no optional inputs. A RuleSpec document holds no inputs section at that commit (RulesDocument, src/rulespec.rs:361-374), and none of the twelve modules carries a top-level inputs key at the pin. The engine rejects a rule-level default (RuleSpecError::UnsupportedDefault, src/rulespec.rs:91-94 and src/rulespec.rs:2411-2418), and the dense batch call collects only the inputs the caller supplies (python-ext/src/lib.rs:458-466). A plain read of an absent input fails every row whose evaluation reaches it with EvalError::MissingInput (src/dense.rs:2790-2803). The internal input_or_else node that would read a default (src/dense.rs:2805-2811) never comes from RuleSpec text: formula lowering turns a name that no parameter or rule defines into a plain input read (src/formula.rs:1400-1413), and src/formula.rs names no input_or_else node. So no root input of these modules can be verified engine-optional, and this closure classes none as such: it defaults, with a reason, every input the mapping doesn't encode.", + "engine_optional_evidence": "The axiom-rules-engine commit named in input_surface.engine (the engine that generated the committed input surface) gives these modules no optional inputs. A RuleSpec inputs block gives no input a default: the engine keeps the block only to check only_related and selected-year reads and to read elections, and every other key stays inert (RulesDocument, src/rulespec.rs:664-668; declared_elections, src/rulespec.rs:1569-1611). None of the twelve modules carries a top-level inputs key at the pin, and nor does any other module the committed input surface covers. The engine rejects a rule-level default (RuleSpecError::UnsupportedDefault, src/rulespec.rs:274-277 and src/rulespec.rs:3619-3627), and the dense batch call collects only the inputs the caller supplies (python-ext/src/lib.rs:552-563). A plain read of an absent input fails every row whose evaluation reaches it with EvalError::MissingInput (src/dense.rs:5154-5168), and the first row error fails the whole request (src/dense.rs:1539, python-ext/src/lib.rs:404-409). The internal input_or_else node that would read a default (src/dense.rs:5169-5175) never comes from RuleSpec text: formula lowering turns a name that no parameter or rule defines into a plain input read (src/formula.rs:1833-1851), and src/formula.rs names no input_or_else node. So no root input of these modules can be verified engine-optional, and this closure classes none as such: it defaults, with a reason, every input the mapping doesn't encode.", "engine_source_pins": { "note": "The axiom-rules-engine source files that engine_optional_evidence cites by line, pinned at input_surface.engine.commit so each line citation names one exact file version.", "pins": [ { "repository": "TheAxiomFoundation/axiom-rules-engine", - "commit": "04315d94d04efd61e27665ab3aa300d64fdf3a66", + "commit": "753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d", "path": "python-ext/src/lib.rs" }, { "repository": "TheAxiomFoundation/axiom-rules-engine", - "commit": "04315d94d04efd61e27665ab3aa300d64fdf3a66", + "commit": "753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d", "path": "src/dense.rs" }, { "repository": "TheAxiomFoundation/axiom-rules-engine", - "commit": "04315d94d04efd61e27665ab3aa300d64fdf3a66", + "commit": "753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d", "path": "src/formula.rs" }, { "repository": "TheAxiomFoundation/axiom-rules-engine", - "commit": "04315d94d04efd61e27665ab3aa300d64fdf3a66", + "commit": "753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d", "path": "src/rulespec.rs" } ] diff --git a/packages/microcosm-build/src/microcosm/build/be/axiom_rules_bindings.json b/packages/microcosm-build/src/microcosm/build/be/axiom_rules_bindings.json index 46dc0b8f4b..cd4b572b99 100644 --- a/packages/microcosm-build/src/microcosm/build/be/axiom_rules_bindings.json +++ b/packages/microcosm-build/src/microcosm/build/be/axiom_rules_bindings.json @@ -6,15 +6,15 @@ "repository": "TheAxiomFoundation/rulespec-be", "commit": "632e1da1110ba881c68165e0cd3c2287b5b8ab08", "branch": "main", - "verified_on": "2026-11-13", - "verification": "The commit is on origin/main of rulespec-be (git branch -r --contains). The committed input surface was generated at b105e2b3a3086ddd2de447d58a9b951346870dd1, an ancestor of the pin (git merge-base --is-ancestor). Each of the twelve bound modules has the same bytes at both commits, and its SHA-256 at the pin equals the surface's.", + "verified_on": "2026-11-16", + "verification": "The commit is on origin/main of rulespec-be (git branch -r --contains), and is main's head. The committed input surface was generated at the pin, and each of the twelve bound modules' SHA-256 at the pin equals the surface's.", "method_card_row": "BE-MC0" }, "engine": { "repository": "TheAxiomFoundation/axiom-rules-engine", - "commit": null, - "wheel_sha256": null, - "status": "Not pinned. Belgium's committed input surface records axiom-rules-engine 04315d94d04efd61e27665ab3aa300d64fdf3a66. A follow-up refreshes the surface at the engine commit New Zealand pins and then sets commit and wheel_sha256 here, as nz/axiom_rules_bindings.json does. build_transport_registry refuses a bindings document that lacks either pin, and it also needs the unit entity that entity_names_note describes, so no registry builds from this file before both land." + "commit": "753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d", + "wheel_sha256": "054c9196d5371f13bb7c2b28f8161ac92294e5c8543aeb6e221fde243897ed42", + "status": "Pinned at New Zealand's engine pin (nz/axiom_rules_bindings.json). commit is the axiom-rules-engine commit that Belgium's input surface and input closure record. wheel_sha256 is the SHA-256 of the dense-extension wheel the NZ hub built at that commit (CPython 3.14, macOS arm64), the wheel whose extension generated Belgium's input surface. axiom_engine_ref records both as declared and hashes no installed wheel. build_transport_registry also needs the unit entity that entity_names_note describes, so no registry builds from this file before it lands." }, "entity_names": { "person": "Person", @@ -28,12 +28,12 @@ "end": "2026-01-31" } }, - "period_note": "Every variable these bindings request runs by Month, so the one period label names a month: January 2026, with explicit bounds, because the registry takes no period without them. The kind is calendar_month, the name rulespec-be's own tests give the custom monthly period they run these modules over (for example be-bru/statutes/family_benefits/eligibility.test.yaml). At the surface's engine commit 04315d94d04efd61e27665ab3aa300d64fdf3a66, the Python extension reads any kind other than month, benefit_week and tax_year as a custom period of that name (python-ext/src/lib.rs:583-590). No rule version in the twelve modules starts after 2026-01-01, so each month of 2026 reads the same versions. A graph that needs an annual amount multiplies the monthly output by twelve in a declared transform. No binding requests the modules' Year rules (such as the annual age supplements, the German-speaking annual supplement and the Flemish participation supplement) or any birth or adoption premium.", + "period_note": "Every variable these bindings request runs by Month, so the one period label names a month: January 2026, with explicit bounds, because the registry takes no period without them. The kind is calendar_month, the name rulespec-be's own tests give the custom monthly period they run these modules over (for example be-bru/statutes/family_benefits/eligibility.test.yaml). At the surface's engine commit 753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d, the Python extension reads any kind other than month, benefit_week and tax_year as a custom period of that name (python-ext/src/lib.rs:985-992). No rule version in the twelve modules starts after 2026-01-01, so each month of 2026 reads the same versions. A graph that needs an annual amount multiplies the monthly output by twelve in a declared transform. No binding requests the modules' Year rules (such as the annual age supplements, the German-speaking annual supplement and the Flemish participation supplement) or any birth or adoption premium.", "input_surface": { "fixture": "packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/be.json", - "notes": "The committed input surface was generated at rulespec-be b105e2b3a3086ddd2de447d58a9b951346870dd1. root_input_count is the size of each module's canonical input surface, all of it on Child." + "notes": "The committed input surface was generated at rulespec-be 632e1da1110ba881c68165e0cd3c2287b5b8ab08, the pin. root_input_count is the size of each module's canonical input surface, all of it on Child." }, - "views_note": "Each view's selector is a bool person column that no node produces yet. The selectors block gives each column's meaning; the graph change that follows adds the producers and sets each cut-off. None of the regional modules bound here reads a birth date, and every amount they return is their reform scheme's. Flanders and Wallonia keep an older cohort on the old LGAF-based amounts (Flemish decree article 210, Walloon decree article 120), so those two selectors leave that cohort out, as their meanings say. Brussels and the German-speaking Community adjust amounts instead, which no selector cut-off can express: Brussels ordinance article 35 takes 10 euros off each article 7 base amount for a child born before 1 December 2019, Brussels article 39 keeps the LGAF payment rules where the December 2019 LGAF rate gives more than articles 7 to 13, and German-speaking decree article 111 computes a transition amount from the LGAF benefits one person received for December 2018. rulespec-be encodes the Brussels article 35 deduction and a one-child slice of the Flemish and Walloon old-cohort amounts (first-rank 2025 amounts, chosen by age rather than birth date) in be/statutes/family_benefits/child_benefit_base_2025.yaml, which these bindings don't cover, and encodes neither article 39 nor article 111. A view's root inputs read the person columns of the same names (docs/transport-declared-units.md, Binding-local views), so the closure gives a name one default in every module that reads it. Each outside value is the output's value for a person outside the view: 0.0 for a Money output and 0 for a Count output. At the surface's engine commit 04315d94d04efd61e27665ab3aa300d64fdf3a66, formula lowering reads a rule's dtype through a match that has no Count arm and falls through to Decimal (src/formula.rs:1352-1362). An integer 0 casts without loss to a decimal output and to an integer one, so it holds whichever dtype a later engine pin gives a Count.", + "views_note": "Each view's selector is a bool person column that no node produces yet. The selectors block gives each column's meaning; the graph change that follows adds the producers and sets each cut-off. None of the regional modules bound here reads a birth date, and every amount they return is their reform scheme's. Flanders and Wallonia keep an older cohort on the old LGAF-based amounts (Flemish decree article 210, Walloon decree article 120), so those two selectors leave that cohort out, as their meanings say. Brussels and the German-speaking Community adjust amounts instead, which no selector cut-off can express: Brussels ordinance article 35 takes 10 euros off each article 7 base amount for a child born before 1 December 2019, Brussels article 39 keeps the LGAF payment rules where the December 2019 LGAF rate gives more than articles 7 to 13, and German-speaking decree article 111 computes a transition amount from the LGAF benefits one person received for December 2018. rulespec-be encodes the Brussels article 35 deduction and a one-child slice of the Flemish and Walloon old-cohort amounts (first-rank 2025 amounts, chosen by age rather than birth date) in be/statutes/family_benefits/child_benefit_base_2025.yaml, which these bindings don't cover, and encodes neither article 39 nor article 111. A view's root inputs read the person columns of the same names (docs/transport-declared-units.md, Binding-local views), so the closure gives a name one default in every module that reads it. Each outside value is the output's value for a person outside the view: 0.0 for a Money output and 0 for a Count output. At the surface's engine commit 753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d, formula lowering reads a rule's dtype through a match that has no Count arm and falls through to Decimal (src/formula.rs:1419-1430). An integer 0 casts without loss to a decimal output and to an integer one, so it holds whichever dtype a later engine pin gives a Count.", "selectors": { "brussels_family_benefits_child_candidate": "True for a person the Brussels scheme's modules run on as Child: a person domiciled in the Brussels-Capital Region whom the scheme's age and status rules could reach. The modules decide entitlement. The selector keeps other regions' residents out, and the closure's domicile default relies on that.", "german_speaking_community_family_benefits_child_candidate": "True for a person the German-speaking Community scheme's modules run on as Child: a person domiciled in the German language region whom the scheme's age and status rules could reach. The modules decide entitlement. The selector keeps other regions' residents out, and the closure's domicile default relies on that.", diff --git a/packages/microcosm-build/tests/engine_free/shared/test_be_axiom_input_closure.py b/packages/microcosm-build/tests/engine_free/shared/test_be_axiom_input_closure.py index 9aee65065d..056936bd2f 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_be_axiom_input_closure.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_be_axiom_input_closure.py @@ -72,7 +72,7 @@ #: rely on that: neither the registry nor the adapter refuses a scheme that #: runs behind another's column. The variables are the choice each binding's #: notes state, and an outside value keeps its output's type: 0.0 for Money and -#: 0 for a Count. The surface's engine (04315d94) gives a Count a decimal +#: 0 for a Count. The surface's engine (753ce7d9) gives a Count a decimal #: dtype, which takes either, but ``_outside_values`` refuses a float for an #: integer output, so an integer 0 stays valid if a Count becomes one (the #: bindings' views_note). @@ -553,19 +553,29 @@ def test_each_binding_has_one_child_view_over_its_variables(self) -> None: } assert all(len(text) > 40 for text in payload["selectors"].values()) - def test_the_engine_pins_await_the_surface_refresh(self) -> None: + def test_the_engine_pin_is_the_engine_that_generated_the_surface( + self, + ) -> None: + # The bindings pin the engine commit the committed surface and the + # closure record, so every root input above is the pinned engine's. + # axiom_engine_ref records the wheel digest as declared; no test here + # can hash a wheel. engine = _bindings_payload()["engine"] - assert engine["commit"] is None - assert engine["wheel_sha256"] is None + assert engine["commit"] == SURFACE.engine_commit + assert ( + engine["commit"] == _closure_payload()["input_surface"]["engine"]["commit"] + ) + assert re.fullmatch(r"[0-9a-f]{64}", engine["wheel_sha256"]) assert engine["status"] def test_the_rulespec_pin_names_the_surface_commit_it_was_checked_against( self, ) -> None: - # The surface was generated at an ancestor of the pin. While the two - # commits differ, the verification note must name the surface's, since - # the sha256 values above were compared at both. The byte check itself - # needs a rulespec-be tree, which this test doesn't have. + # The surface is generated at the pin or at an ancestor of it. While + # the two commits differ, the verification note must name the + # surface's, since the sha256 values above were compared at both. The + # byte check itself needs a rulespec-be tree, which this test doesn't + # have. payload = _bindings_payload() if payload["rulespec"]["commit"] != SURFACE.rulespec_commit: assert SURFACE.rulespec_commit in payload["rulespec"]["verification"] diff --git a/packages/microcosm-build/tests/engine_free/shared/test_be_target_references.py b/packages/microcosm-build/tests/engine_free/shared/test_be_target_references.py index f6114d96d8..cfbc541fb6 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_be_target_references.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_be_target_references.py @@ -2186,15 +2186,14 @@ def test_belgium_still_refuses_to_activate(): spec = load_transport_spec(_SPEC) with pytest.raises(ValueError, match="not activated") as error: validate_transport_activation(spec) - # The bindings resource exists now, so its null engine pins are the gaps. + # The bindings resource exists and pins the engine, so neither it nor its + # engine pins is a gap. for missing in ( "benefit_unit_rule.json", - "axiom_rules_bindings.engine.commit", - "axiom_rules_bindings.engine.wheel_sha256", "transport_graph.json", ): assert missing in str(error.value) - assert "axiom_rules_bindings.json" not in str(error.value) + assert "axiom_rules_bindings" not in str(error.value) # The pension surface rows are parked, so each is a named gap. for row in _rows("precal"): parked = row["metadata"]["activation_status"] != "active" diff --git a/packages/microcosm-build/tests/golden/be_country_spec.json b/packages/microcosm-build/tests/golden/be_country_spec.json index dc2a7cfb6b..c2ec161b01 100644 --- a/packages/microcosm-build/tests/golden/be_country_spec.json +++ b/packages/microcosm-build/tests/golden/be_country_spec.json @@ -1,6 +1,6 @@ { "country": "be", - "fingerprint": "d482b2f983feecc744541ac16f3a01e61d45f06614bbbcd09530c2037983ddde", + "fingerprint": "0a013b2a730ff9a37699d23ecee93c771ab643373487efbb5c6c1a3b5dd20b99", "gate_ids": [ "calibration_per_family_fit", "national_and_nuts1_admin_aggregates", @@ -29,8 +29,8 @@ "staging_repo": "policyengine/populace-be-staging" }, "resource_hashes": { - "axiom_input_closure.json": "ea29a2711e05a2699ed365bc3d0d086f8e5f521f232e0f690738be1d0fc2de2e", - "axiom_rules_bindings.json": "0d8c9670cc22761f90fba5df99c27bfea420708dad94926248da7dc1cea3a589", + "axiom_input_closure.json": "bc40cbd6ae199d57b7d20548b2a052deb25ad9892a715dc90effd95d15012ef7", + "axiom_rules_bindings.json": "7b218789d46d64a743d5817fa7e79d1ac6213e290fe9646a5a323b24de8ed8ea", "chronicle_feed.json": "71f3967cefa12d8ad6c4b955547bfc37e33183ee839b3edf3a43e0cb72559030", "country_package.json": "204c8c06934160c856d86a9d6c5305d40e9b3a85713c11c3ab031bebb27fbe89", "gates.json": "9704a0c86b324d4243365a320438b47a9d7d5a6af7ec2adfa1821ecb8d611f68", diff --git a/packages/microcosm-frame/src/microcosm/frame/adapters/axiom_concept_mappings/be.json b/packages/microcosm-frame/src/microcosm/frame/adapters/axiom_concept_mappings/be.json index 58ec00768a..1c871dfdc4 100644 --- a/packages/microcosm-frame/src/microcosm/frame/adapters/axiom_concept_mappings/be.json +++ b/packages/microcosm-frame/src/microcosm/frame/adapters/axiom_concept_mappings/be.json @@ -1881,7 +1881,7 @@ } ], "engine": "axiom:be", - "engine_version": "b105e2b3a3086ddd2de447d58a9b951346870dd1", + "engine_version": "632e1da1110ba881c68165e0cd3c2287b5b8ab08", "entity_correspondence": { "household": "Household", "person": "Person" @@ -1890,14 +1890,14 @@ "input_declaration": "usage_inferred", "structural_inputs": [], "unmapped": { - "fact:household.mortgage_principal": "rulespec-be at b105e2b3 has no input for mortgage capital repayments. The only housing-loan inputs are the interest deductions belgium_social_integration_eligible_annual_mortgage_interest_on_property (RIS art. 25 §4) and brussels_apa_eligible_annual_mortgage_interest (APA art. 15), which this mapping feeds from mortgage_interest. No non-test rule text mentions capital repayment, and the PIT reductions module takes no loan input.", + "fact:household.mortgage_principal": "rulespec-be at 632e1da1 has no input for mortgage capital repayments. The only housing-loan inputs are the interest deductions belgium_social_integration_eligible_annual_mortgage_interest_on_property (RIS art. 25 §4) and brussels_apa_eligible_annual_mortgage_interest (APA art. 15), which this mapping feeds from mortgage_interest. No non-test rule text mentions capital repayment, and the PIT reductions module takes no loan input.", "fact:household.source_household_id": "Original donor household lineage is build provenance and weight diagnostic support, not a rulespec-be legal input.", "fact:person.educational_attainment": "rulespec-be has no input that reads completed education. No non-test rule text mentions an attainment level, certificate or ISCED level. Every education input describes current enrollment or training: flanders_school_allowance_education_level, study_allowance_is_higher_education, and the Child-entity family-benefit training flags, including wallonia_family_benefits_child_in_qualifying_diploma_training. Where this mapping binds these, it feeds them from education_enrollment.", "fact:person.enrolled_full_time": "rulespec-be has no input that tests full-time enrollment. The full-time wording in non-test rule text concerns work regimes (parental leave, the work bonus, unemployment admission, the Flemish jobbonus). The one exception is a Flemish school-allowance parameter citing 'voltijds secundair onderwijs', and that module selects it by education level alone. The student statuses the tree does take are supplied legal statuses, and the rules that consume them contain no full-time test: belgium_self_employed_is_student (RD 38 art. 12bis) and the Child-entity family-benefit training and 'qualifying' flags.", - "fact:person.liquid_financial_assets": "rulespec-be at b105e2b3 takes movable capital only as means-test inputs. belgium_social_integration_movable_capital_amount (RIS art. 27, in regulations/social_integration/resource_calculation.yaml and statutes/social_integration/payable_amount.yaml) lives on Household, and no transform puts a person amount on a Household input; the module also counts it through an owner fraction it takes as two further inputs (belgium_social_integration_movable_capital_numerator_share over belgium_social_integration_movable_capital_account_holder_count). brussels_apa_movable_capital_amount (Person, be-bru/statutes/disability/elderly_care_allowance.yaml; APA order of 28 January 2021 art. 16: 'Pour les capitaux mobiliers, placés ou non, il est porté en compte une somme égale à 6 % des capitaux.') is the one Person-level candidate. It counts all movable capital, invested or not, which is broader than the concept. The APA module also reads it as the movable capital of the beneficiary and the person they form a household with, not the beneficiary's alone: brussels_apa_movable_capital_deemed_annual_income turns it into deemed income at 6 %, and brussels_apa_annual_income_before_disregard multiplies the summed income by brussels_apa_household_income_split_factor, which is 0.5 when the person forms a household and both members are entitled to the allowance (art. 5 § 2: 'il est tenu compte pour chacune des deux personnes de la moitié du revenu du ménage') and 1 otherwise. It is left for a reviewed Belgian binding.", - "fact:person.realized_capital_gains": "rulespec-be at b105e2b3 encodes no capital-gains rule: no non-test module mentions capital gains, plus-values or meerwaarden. The nearest inputs are legal net-income categories that realized gains do not determine. One is belgium_pit_net_miscellaneous_income (Person, CIR art. 6 in taxable_income.yaml), which the module takes as already determined under category-specific rules. The others are the TaxUnit belgium_pit_spouse_{a,b}_article_90_items_1_to_4_and_12_income slots in the art. 127 joint-assessment allocation.", - "fact:person.rental_income": "rulespec-be at b105e2b3 has no input that net rental income determines. (1) belgium_pit_net_immovable_income (Person, CIR art. 6) is a net-income category that taxable_income.yaml 'expects ... to have already been determined under the category-specific CIR 1992 rules', and no module derives it. (2) belgium_social_integration_annual_property_rent (RIS art. 26) lives on Household, and no transform puts a person amount on a Household input. (3) belgium_pit_article_17_non_copyright_movable_property_rental_use_or_concession_income is income from movable property, which is outside the concept's land-and-buildings scope.", - "fact:person.sex": "rulespec-be at b105e2b3 has no input that reads sex. No surface input name and no non-test rule text mentions sex or gender. The one sex-dependent provision found, Brussels social-housing child-bedroom pairing, is left out of the module: social_housing_rental.yaml lists 'exact child-room pairing from person-level sex/age arrays' among what it leaves to separate surfaces. It enters only as the supplied Household count brussels_social_housing_child_bedrooms_required.", + "fact:person.liquid_financial_assets": "rulespec-be at 632e1da1 takes movable capital only as means-test inputs. belgium_social_integration_movable_capital_amount (RIS art. 27, in regulations/social_integration/resource_calculation.yaml and statutes/social_integration/payable_amount.yaml) lives on Household, and no transform puts a person amount on a Household input; the module also counts it through an owner fraction it takes as two further inputs (belgium_social_integration_movable_capital_numerator_share over belgium_social_integration_movable_capital_account_holder_count). brussels_apa_movable_capital_amount (Person, be-bru/statutes/disability/elderly_care_allowance.yaml; APA order of 28 January 2021 art. 16: 'Pour les capitaux mobiliers, placés ou non, il est porté en compte une somme égale à 6 % des capitaux.') is the one Person-level candidate. It counts all movable capital, invested or not, which is broader than the concept. The APA module also reads it as the movable capital of the beneficiary and the person they form a household with, not the beneficiary's alone: brussels_apa_movable_capital_deemed_annual_income turns it into deemed income at 6 %, and brussels_apa_annual_income_before_disregard multiplies the summed income by brussels_apa_household_income_split_factor, which is 0.5 when the person forms a household and both members are entitled to the allowance (art. 5 § 2: 'il est tenu compte pour chacune des deux personnes de la moitié du revenu du ménage') and 1 otherwise. It is left for a reviewed Belgian binding.", + "fact:person.realized_capital_gains": "rulespec-be at 632e1da1 encodes no capital-gains rule: no non-test module mentions capital gains, plus-values or meerwaarden. The nearest inputs are legal net-income categories that realized gains do not determine. One is belgium_pit_net_miscellaneous_income (Person, CIR art. 6 in taxable_income.yaml), which the module takes as already determined under category-specific rules. The others are the TaxUnit belgium_pit_spouse_{a,b}_article_90_items_1_to_4_and_12_income slots in the art. 127 joint-assessment allocation.", + "fact:person.rental_income": "rulespec-be at 632e1da1 has no input that net rental income determines. (1) belgium_pit_net_immovable_income (Person, CIR art. 6) is a net-income category that taxable_income.yaml 'expects ... to have already been determined under the category-specific CIR 1992 rules', and no module derives it. (2) belgium_social_integration_annual_property_rent (RIS art. 26) lives on Household, and no transform puts a person amount on a Household input. (3) belgium_pit_article_17_non_copyright_movable_property_rental_use_or_concession_income is income from movable property, which is outside the concept's land-and-buildings scope.", + "fact:person.sex": "rulespec-be at 632e1da1 has no input that reads sex. No surface input name and no non-test rule text mentions sex or gender. The one sex-dependent provision found, Brussels social-housing child-bedroom pairing, is left out of the module: social_housing_rental.yaml lists 'exact child-room pairing from person-level sex/age arrays' among what it leaves to separate surfaces. It enters only as the supplied Household count brussels_social_housing_child_bedrooms_required.", "fact:person.take_up_seed": "rulespec-be computes legal entitlements and has no take-up or participation input. Its only claim-type inputs are eligibility conditions or elections, not decisions to take up the program the rule computes: belgium_social_integration_social_benefit_rights_asserted (a RIS art. 3-4 condition), brussels_apa_required_other_benefit_rights_claimed (an APA eligibility conjunct), and belgium_pit_article_1458_pension_savings_reduction_claimed (a non-cumulation election against the art. 145/7 reduction that also needs pension-savings payments).", "fact:person.weeks_worked": "rulespec-be has no input for weeks worked in a year. Its work-history inputs are day or hour counts over windows that run back from a claim. Examples: belgium_unemployment_article_30_countable_work_days_since_prior_admission_in_extended_reference_period (312 work days within a 36-month reference period, admission.yaml), and belgium_health_waiting_stage_assimilated_work_days/_hours (windows of one to 36 months, with the length supplied as the separate input belgium_health_waiting_stage_reference_months, waiting_stage.yaml). These need a claim date, count days rather than weeks, and depend on an assimilated-day classification that the module leaves to separate surfaces. Multiplying weekly hours by weeks (a Product transform) would still give annual hours, not hours inside the claim window." } diff --git a/packages/microcosm-frame/tests/engine_free/shared/test_axiom_concept_mapping.py b/packages/microcosm-frame/tests/engine_free/shared/test_axiom_concept_mapping.py index 395fb0319e..c9c4848cea 100644 --- a/packages/microcosm-frame/tests/engine_free/shared/test_axiom_concept_mapping.py +++ b/packages/microcosm-frame/tests/engine_free/shared/test_axiom_concept_mapping.py @@ -128,7 +128,7 @@ def test_the_belgian_liquid_asset_reason_names_real_inputs() -> None: def test_the_belgian_liquid_asset_reason_states_the_apa_household_reading() -> None: # A wording pin: the derived APA rules are not on the committed surface. - # At b105e2b3 the module turns the input into deemed income and halves + # At 632e1da1 the module turns the input into deemed income and halves # the summed income when both household members are entitled, so it reads # the input as the household's capital, not the beneficiary's alone. reason = axiom_concept_mapping("be").unmapped["fact:person.liquid_financial_assets"] diff --git a/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/README.md b/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/README.md index 66b1efee7c..e4dc573b39 100644 --- a/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/README.md +++ b/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/README.md @@ -50,8 +50,8 @@ Run from the repository root. `AXIOM` is the directory holding the `git fetch origin` in each first. Everything is built from `git archive` output in a scratch directory, never inside a checkout. -Each snapshot names its own engine commit: `nz.json` records 753ce7d9 and -`be.json` 04315d94. Set `ENGINE` to the `engine.commit` of the snapshot you +Each snapshot names its own engine commit; both `nz.json` and `be.json` +record 753ce7d9. Set `ENGINE` to the `engine.commit` of the snapshot you regenerate, and `CC` to that snapshot's country. ```bash @@ -60,7 +60,7 @@ AXIOM= ENGINE= CC= NZ=6fe181fc4c65763150fe97501ef3443774e64869 -BE=b105e2b3a3086ddd2de447d58a9b951346870dd1 +BE=632e1da1110ba881c68165e0cd3c2287b5b8ab08 mkdir -p $W/engine $W/rulespec-nz $W/rulespec-be git -C $AXIOM/axiom-rules-engine archive $ENGINE | tar -x -C $W/engine git -C $AXIOM/rulespec-nz archive $NZ | tar -x -C $W/rulespec-nz @@ -69,7 +69,7 @@ git -C $AXIOM/rulespec-be archive $BE | tar -x -C $W/rulespec-be uv venv --python $W/dense-venv # any GIL-enabled CPython 3.14 VIRTUAL_ENV=$W/dense-venv uv pip install maturin (cd $W/engine && PYO3_PYTHON=$W/dense-venv/bin/python \ - $W/dense-venv/bin/maturin build --release --manifest-path python-ext/Cargo.toml \ + $W/dense-venv/bin/maturin build --release --locked --manifest-path python-ext/Cargo.toml \ -i $W/dense-venv/bin/python --out $W/wheels) VIRTUAL_ENV=$W/dense-venv uv pip install $W/wheels/*.whl $W/engine/python SHA=$([ $CC = nz ] && echo $NZ || echo $BE) @@ -83,9 +83,10 @@ uv run --no-sync python tools/refresh_axiom_input_surface.py \ Add `--check` to compare a fresh run with the checked-in file without writing. It exits 1 and summarizes the differences when they differ. -At 04315d94, `maturin build` runs without `--locked` for one reason: -`python-ext/Cargo.lock` there still records the path crate -`axiom-rules-engine` as 0.1.0, and the crate is 0.2.2. At 753ce7d9 the lock -records 0.2.2, and `maturin build --locked` builds the wheel. The extension -must be built for the interpreter that loads it: a wheel built for -free-threaded 3.14t does not import on GIL-enabled 3.14. +At 753ce7d9, `python-ext/Cargo.lock` records the path crate +`axiom-rules-engine` at the crate's version, 0.2.2, so +`maturin build --locked` builds the wheel. (At 04315d94, which no snapshot +records now, the lock still said 0.1.0, so the build there ran without +`--locked`.) The extension must be built for the interpreter that loads +it: a wheel built for free-threaded 3.14t does not import on GIL-enabled +3.14. diff --git a/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/be.json b/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/be.json index f6487abbc8..5634dcc4a3 100644 --- a/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/be.json +++ b/packages/microcosm-frame/tests/fixtures/axiom_input_surfaces/be.json @@ -1,7 +1,7 @@ { "country": "be", "engine": { - "commit": "04315d94d04efd61e27665ab3aa300d64fdf3a66", + "commit": "753ce7d9ac4cfb161f6aa4f281f5a3980e67a57d", "repository": "TheAxiomFoundation/axiom-rules-engine", "surface": "dense_root_inputs", "version": "axiom-rules-engine 0.2.2" @@ -5612,7 +5612,7 @@ } ], "rulespec": { - "commit": "b105e2b3a3086ddd2de447d58a9b951346870dd1", + "commit": "632e1da1110ba881c68165e0cd3c2287b5b8ab08", "repository": "TheAxiomFoundation/rulespec-be" } } diff --git a/packages/microcosm-frame/tests/golden/concept-coverage/axiom-be.json b/packages/microcosm-frame/tests/golden/concept-coverage/axiom-be.json index b064239947..712aed666c 100644 --- a/packages/microcosm-frame/tests/golden/concept-coverage/axiom-be.json +++ b/packages/microcosm-frame/tests/golden/concept-coverage/axiom-be.json @@ -1210,7 +1210,7 @@ } ], "engine": "axiom:be", - "engine_version": "b105e2b3a3086ddd2de447d58a9b951346870dd1", + "engine_version": "632e1da1110ba881c68165e0cd3c2287b5b8ab08", "input_count": 1867, "schema_sha256": "5a55669d0447a686692911a6327ae298f19741dde29559f2654a75807878a141", "structural_inputs": [], @@ -10008,14 +10008,14 @@ ], "unknown_inputs": [], "unmapped_concepts": { - "fact:household.mortgage_principal": "rulespec-be at b105e2b3 has no input for mortgage capital repayments. The only housing-loan inputs are the interest deductions belgium_social_integration_eligible_annual_mortgage_interest_on_property (RIS art. 25 \u00a74) and brussels_apa_eligible_annual_mortgage_interest (APA art. 15), which this mapping feeds from mortgage_interest. No non-test rule text mentions capital repayment, and the PIT reductions module takes no loan input.", + "fact:household.mortgage_principal": "rulespec-be at 632e1da1 has no input for mortgage capital repayments. The only housing-loan inputs are the interest deductions belgium_social_integration_eligible_annual_mortgage_interest_on_property (RIS art. 25 \u00a74) and brussels_apa_eligible_annual_mortgage_interest (APA art. 15), which this mapping feeds from mortgage_interest. No non-test rule text mentions capital repayment, and the PIT reductions module takes no loan input.", "fact:household.source_household_id": "Original donor household lineage is build provenance and weight diagnostic support, not a rulespec-be legal input.", "fact:person.educational_attainment": "rulespec-be has no input that reads completed education. No non-test rule text mentions an attainment level, certificate or ISCED level. Every education input describes current enrollment or training: flanders_school_allowance_education_level, study_allowance_is_higher_education, and the Child-entity family-benefit training flags, including wallonia_family_benefits_child_in_qualifying_diploma_training. Where this mapping binds these, it feeds them from education_enrollment.", "fact:person.enrolled_full_time": "rulespec-be has no input that tests full-time enrollment. The full-time wording in non-test rule text concerns work regimes (parental leave, the work bonus, unemployment admission, the Flemish jobbonus). The one exception is a Flemish school-allowance parameter citing 'voltijds secundair onderwijs', and that module selects it by education level alone. The student statuses the tree does take are supplied legal statuses, and the rules that consume them contain no full-time test: belgium_self_employed_is_student (RD 38 art. 12bis) and the Child-entity family-benefit training and 'qualifying' flags.", - "fact:person.liquid_financial_assets": "rulespec-be at b105e2b3 takes movable capital only as means-test inputs. belgium_social_integration_movable_capital_amount (RIS art. 27, in regulations/social_integration/resource_calculation.yaml and statutes/social_integration/payable_amount.yaml) lives on Household, and no transform puts a person amount on a Household input; the module also counts it through an owner fraction it takes as two further inputs (belgium_social_integration_movable_capital_numerator_share over belgium_social_integration_movable_capital_account_holder_count). brussels_apa_movable_capital_amount (Person, be-bru/statutes/disability/elderly_care_allowance.yaml; APA order of 28 January 2021 art. 16: 'Pour les capitaux mobiliers, plac\u00e9s ou non, il est port\u00e9 en compte une somme \u00e9gale \u00e0 6 % des capitaux.') is the one Person-level candidate. It counts all movable capital, invested or not, which is broader than the concept. The APA module also reads it as the movable capital of the beneficiary and the person they form a household with, not the beneficiary's alone: brussels_apa_movable_capital_deemed_annual_income turns it into deemed income at 6 %, and brussels_apa_annual_income_before_disregard multiplies the summed income by brussels_apa_household_income_split_factor, which is 0.5 when the person forms a household and both members are entitled to the allowance (art. 5 \u00a7 2: 'il est tenu compte pour chacune des deux personnes de la moiti\u00e9 du revenu du m\u00e9nage') and 1 otherwise. It is left for a reviewed Belgian binding.", - "fact:person.realized_capital_gains": "rulespec-be at b105e2b3 encodes no capital-gains rule: no non-test module mentions capital gains, plus-values or meerwaarden. The nearest inputs are legal net-income categories that realized gains do not determine. One is belgium_pit_net_miscellaneous_income (Person, CIR art. 6 in taxable_income.yaml), which the module takes as already determined under category-specific rules. The others are the TaxUnit belgium_pit_spouse_{a,b}_article_90_items_1_to_4_and_12_income slots in the art. 127 joint-assessment allocation.", - "fact:person.rental_income": "rulespec-be at b105e2b3 has no input that net rental income determines. (1) belgium_pit_net_immovable_income (Person, CIR art. 6) is a net-income category that taxable_income.yaml 'expects ... to have already been determined under the category-specific CIR 1992 rules', and no module derives it. (2) belgium_social_integration_annual_property_rent (RIS art. 26) lives on Household, and no transform puts a person amount on a Household input. (3) belgium_pit_article_17_non_copyright_movable_property_rental_use_or_concession_income is income from movable property, which is outside the concept's land-and-buildings scope.", - "fact:person.sex": "rulespec-be at b105e2b3 has no input that reads sex. No surface input name and no non-test rule text mentions sex or gender. The one sex-dependent provision found, Brussels social-housing child-bedroom pairing, is left out of the module: social_housing_rental.yaml lists 'exact child-room pairing from person-level sex/age arrays' among what it leaves to separate surfaces. It enters only as the supplied Household count brussels_social_housing_child_bedrooms_required.", + "fact:person.liquid_financial_assets": "rulespec-be at 632e1da1 takes movable capital only as means-test inputs. belgium_social_integration_movable_capital_amount (RIS art. 27, in regulations/social_integration/resource_calculation.yaml and statutes/social_integration/payable_amount.yaml) lives on Household, and no transform puts a person amount on a Household input; the module also counts it through an owner fraction it takes as two further inputs (belgium_social_integration_movable_capital_numerator_share over belgium_social_integration_movable_capital_account_holder_count). brussels_apa_movable_capital_amount (Person, be-bru/statutes/disability/elderly_care_allowance.yaml; APA order of 28 January 2021 art. 16: 'Pour les capitaux mobiliers, plac\u00e9s ou non, il est port\u00e9 en compte une somme \u00e9gale \u00e0 6 % des capitaux.') is the one Person-level candidate. It counts all movable capital, invested or not, which is broader than the concept. The APA module also reads it as the movable capital of the beneficiary and the person they form a household with, not the beneficiary's alone: brussels_apa_movable_capital_deemed_annual_income turns it into deemed income at 6 %, and brussels_apa_annual_income_before_disregard multiplies the summed income by brussels_apa_household_income_split_factor, which is 0.5 when the person forms a household and both members are entitled to the allowance (art. 5 \u00a7 2: 'il est tenu compte pour chacune des deux personnes de la moiti\u00e9 du revenu du m\u00e9nage') and 1 otherwise. It is left for a reviewed Belgian binding.", + "fact:person.realized_capital_gains": "rulespec-be at 632e1da1 encodes no capital-gains rule: no non-test module mentions capital gains, plus-values or meerwaarden. The nearest inputs are legal net-income categories that realized gains do not determine. One is belgium_pit_net_miscellaneous_income (Person, CIR art. 6 in taxable_income.yaml), which the module takes as already determined under category-specific rules. The others are the TaxUnit belgium_pit_spouse_{a,b}_article_90_items_1_to_4_and_12_income slots in the art. 127 joint-assessment allocation.", + "fact:person.rental_income": "rulespec-be at 632e1da1 has no input that net rental income determines. (1) belgium_pit_net_immovable_income (Person, CIR art. 6) is a net-income category that taxable_income.yaml 'expects ... to have already been determined under the category-specific CIR 1992 rules', and no module derives it. (2) belgium_social_integration_annual_property_rent (RIS art. 26) lives on Household, and no transform puts a person amount on a Household input. (3) belgium_pit_article_17_non_copyright_movable_property_rental_use_or_concession_income is income from movable property, which is outside the concept's land-and-buildings scope.", + "fact:person.sex": "rulespec-be at 632e1da1 has no input that reads sex. No surface input name and no non-test rule text mentions sex or gender. The one sex-dependent provision found, Brussels social-housing child-bedroom pairing, is left out of the module: social_housing_rental.yaml lists 'exact child-room pairing from person-level sex/age arrays' among what it leaves to separate surfaces. It enters only as the supplied Household count brussels_social_housing_child_bedrooms_required.", "fact:person.take_up_seed": "rulespec-be computes legal entitlements and has no take-up or participation input. Its only claim-type inputs are eligibility conditions or elections, not decisions to take up the program the rule computes: belgium_social_integration_social_benefit_rights_asserted (a RIS art. 3-4 condition), brussels_apa_required_other_benefit_rights_claimed (an APA eligibility conjunct), and belgium_pit_article_1458_pension_savings_reduction_claimed (a non-cumulation election against the art. 145/7 reduction that also needs pension-savings payments).", "fact:person.weeks_worked": "rulespec-be has no input for weeks worked in a year. Its work-history inputs are day or hour counts over windows that run back from a claim. Examples: belgium_unemployment_article_30_countable_work_days_since_prior_admission_in_extended_reference_period (312 work days within a 36-month reference period, admission.yaml), and belgium_health_waiting_stage_assimilated_work_days/_hours (windows of one to 36 months, with the length supplied as the separate input belgium_health_waiting_stage_reference_months, waiting_stage.yaml). These need a claim date, count days rather than weeks, and depend on an assimilated-day classification that the module leaves to separate surfaces. Multiplying weekly hours by weeks (a Product transform) would still give annual hours, not hours inside the claim window." } diff --git a/tools/refresh_axiom_input_surface.py b/tools/refresh_axiom_input_surface.py index dae0071b69..1240192052 100644 --- a/tools/refresh_axiom_input_surface.py +++ b/tools/refresh_axiom_input_surface.py @@ -89,8 +89,8 @@ Archive the pinned commits into a scratch directory (never build inside a live checkout), build the CLI and the dense extension from the same engine archive, then run this tool once per country from the repository root. -Each snapshot names its own engine commit: nz.json 753ce7d9 and be.json -04315d94. Set ``ENGINE`` to the one the snapshot records, and run only that +Each snapshot names its own engine commit; both nz.json and be.json record +753ce7d9. Set ``ENGINE`` to the one the snapshot records, and run only that country's command. ``AXIOM`` is the directory holding the three TheAxiomFoundation checkouts, after a ``git fetch origin`` in each:: @@ -98,7 +98,7 @@ AXIOM= ENGINE= NZ=6fe181fc4c65763150fe97501ef3443774e64869 - BE=b105e2b3a3086ddd2de447d58a9b951346870dd1 + BE=632e1da1110ba881c68165e0cd3c2287b5b8ab08 mkdir -p $W/engine $W/rulespec-nz $W/rulespec-be git -C $AXIOM/axiom-rules-engine archive $ENGINE | tar -x -C $W/engine git -C $AXIOM/rulespec-nz archive $NZ | tar -x -C $W/rulespec-nz @@ -107,7 +107,7 @@ uv venv --python $W/dense-venv VIRTUAL_ENV=$W/dense-venv uv pip install maturin (cd $W/engine && PYO3_PYTHON=$W/dense-venv/bin/python \\ - $W/dense-venv/bin/maturin build --release \\ + $W/dense-venv/bin/maturin build --release --locked \\ --manifest-path python-ext/Cargo.toml \\ -i $W/dense-venv/bin/python --out $W/wheels) VIRTUAL_ENV=$W/dense-venv uv pip install $W/wheels/*.whl $W/engine/python @@ -125,11 +125,11 @@ ```` stands for any GIL-enabled CPython 3.14 interpreter. The wrapper pins Python ``==3.14.*``, and the extension must be built for the interpreter that loads it: a wheel built for free-threaded 3.14t does not -import on GIL-enabled 3.14. At 04315d94 ``maturin build`` runs without -``--locked``, because ``python-ext/Cargo.lock`` there still records the -path dependency ``axiom-rules-engine`` as 0.1.0 (the crate is 0.2.2), and -Cargo rewrites only that entry. At 753ce7d9 the lock records 0.2.2, and -``maturin build --locked`` builds the wheel. +import on GIL-enabled 3.14. At 753ce7d9 ``python-ext/Cargo.lock`` records +the path dependency ``axiom-rules-engine`` at the crate's version, 0.2.2, +so ``maturin build --locked`` builds the wheel. (At 04315d94, which no +snapshot records now, the lock still said 0.1.0, so the build there ran +without ``--locked``.) ``--rulespec-git-dir`` checks that every file under ``--rulespec-root`` is byte-identical to the blob at ``--rulespec-commit``. ``--check`` regenerates