Skip to content

Bind Brussels and Flemish post-18 education flags to enrolment - #1611

Merged
MaxGhenis merged 1 commit into
mainfrom
be/pr4a2-post18-enrolment
Nov 15, 2026
Merged

MaxGhenis merged 1 commit into
mainfrom
be/pr4a2-post18-enrolment

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Ready. #1602 (PR 4a) merged as e555b4d, and this PR targets main: its one commit, 941b8e3, is 5aab210 moved onto main, with the same patch (git patch-id). It changes what Belgium's closure feeds, so it needed a Subfleet hard-tier review before merge; that review approved it (see Verification). CI on main: run 43751784209 passed all 12 jobs after one rerun; engine-free (3.13) had first failed on a wall-clock assert in test_precalibration_ancestry_composed_stage_scan_is_linear, a synthetic test this PR doesn't touch (2.13 s against 1 s; the test's exact-count assert passed). NZ's #1629 removes that timer.

What this changes

Brussels and Flanders pay family benefits past 18 to a child in education, up to 25:

  • Brussels ordinance article 25 §2(b): brussels_family_benefits_child_in_qualifying_education_training_or_stage.
  • Flemish Groeipakket decree article 8 §2 item 3: flanders_family_benefits_child_is_pupil_student_intern_or_school_leaver.

PR 4a defaulted both flags to false. That was a lower bound that paid nothing to anyone aged 18 or over in either region. Wallonia's and the German-speaking Community's flags were already bound to fact:person.education_enrollment. This PR binds the Brussels and Flemish flags the same way. Each flag gets a person_role predicate binding over the six enrolled ISCED bands (early_childhood to tertiary), with relation approximate. Each flag is bound in its scheme's eligibility module and in be/statutes/family_benefits/regional_routing.yaml, which reads the regional roots through its imports.

PR 4a This PR
axiom:be bindings 105 109
Closure roots encoded 35 39
Closure roots defaulted 242 238
be-bru eligibility (roots, encoded, defaulted) 19, 4, 15 19, 5, 14
be-vlg eligibility 23, 2, 21 23, 3, 20
regional routing 107, 12, 95 107, 14, 93

Defaults whose reasons changed

No default changes value. Six reasons change because the new bindings made them stale or incomplete. The formulas at rulespec-be 632e1da1 are in be-bru eligibility.yaml (the article 25 gate and the article 4 exclusion) and be-vlg eligibility.yaml (the article 8 age and status windows and the two exclusions).

  • flanders_family_benefits_child_in_month_turning_25 (false). Its old reason said the flag changed nothing while the student flag stayed false. The student flag now reads enrolment, so false ends an enrolled child's window at the age the frame reports, before the end of the birth month. This is a lower bound.
  • brussels_family_benefits_child_has_foreign_study_training_volunteer_or_au_pair_stay_authorization, flanders_family_benefits_child_has_excluded_study_training_volunteer_or_au_pair_residence_right and flanders_family_benefits_child_raised_or_studies_outside_belgium (all false). Each exclusion still removes nobody, so each default overstates entitlement for the children it should exclude. That overstatement used to cover children under 18. It now also covers enrolled children aged 18 to 24. Each reason names the saving clause or exemption that keeps some of those children entitled: a Brussels right that was open on 31 August 2025, a Flemish child of a study, training, volunteer or au-pair permit holder, or a Flemish Government exemption. The routing bridge's copy of flanders_family_benefits_child_raised_or_studies_outside_belgium keeps Add Belgium's Child rules bindings and Axiom input closure (PR 4a), still inactive #1602's wording, which says the bridge's region default (99) routes no child, so this PR changes only that name's eligibility-module entry.
  • brussels_family_benefits_child_is_apprentice and brussels_family_benefits_child_prepares_higher_education_thesis (false). Each lower bound now misses only the children whom the enrolment fact doesn't count, as the Walloon apprentice reason already says.

The Flemish binding note says the enrolment fact doesn't record where a child studies, so a child taught abroad reads as enrolled. Article 8 §3's exclusion (flanders_family_benefits_outside_belgium_exclusion_applies) reads a separate input. That input stays uncovered and the closure defaults it to false, so nothing in the model applies the exclusion.

Also regenerated

  • docs/concept-coverage/axiom-be.md and packages/microcosm-frame/tests/golden/concept-coverage/axiom-be.json, via tools/refresh_concept_coverage.py --engine axiom-be. Concept-fed inputs go from 105 to 109 and uncovered inputs from 1,762 to 1,758.
  • packages/microcosm-build/tests/golden/be_country_spec.json (the closure's hash and the fingerprint).
  • changelog.d/be-post18-enrolment-bindings.changed.md.

docs/concept-schema-transport-adr.md counted all of Belgium's group bindings (46 of 105) as deferred. ConceptMapping.encode runs person_role bindings on the person table, though (is_executable reports them as executable). The ADR now says that encode runs Belgium's 39 person_role bindings and that its 11 other group bindings, out of 109, stay deferred.

Tests

test_be_axiom_input_closure.py takes the new counts. It also gains test_the_post_18_education_flags_read_one_enrolment_predicate, which pins three things for all four regions' post-18 education flags:

  • each flag is bound in exactly its scheme's eligibility module and in the routing bridge;
  • every one of those bindings is a person_role, approximate binding that reads the same predicate over the same six bands;
  • the closure encodes every entry for each flag.

Verification

Independent review (Subfleet hard tier, job 20261113-190022-be-pr4a2-review-sf, at 8890611): approve, with nothing at P0 to P2 and three P3 notes. Two are taken: the Flemish residence-right reason now names the age groups before its exception, and this body credits encode, not is_executable, with running the bindings. The third (the new test's closure check compares a set of pairs, so it can't see one missing entry) needs no change: two existing tests catch that case.

Rebased on c90f5c9. #1602's round-2 fixes (5fd86ad and before) move three defaults (the routing region code to 99, and the German-speaking extension's months used and its Article 9 flag), and c90f5c9, which answers its second review, rewords 22 reasons, the closure description and its judgment policy. The only one of those entries that carries one of this PR's names is the routing bridge's copy of flanders_family_benefits_child_raised_or_studies_outside_belgium, which now keeps #1602's bridge wording. The closure was rebuilt from this PR's rulings plus #1602's round-2 and round-3 scripts, not merged by text. Against c90f5c9 it changes the same eight names in 15 entries (two each, but one for that name), and the closure description only in its counts (35 to 39 encoded, 242 to 238 defaulted). The other six files' changes are line for line as before.

Locally, on b81ac72c6 plus this change (as first pushed, 8890611), with Python 3.14.7:

  • tools/refresh_concept_coverage.py --engine axiom-be --check, a regeneration check of be_country_spec.json, and a rebuild of the closure from its rulings all report no drift.
  • 12 of 13 test files pass:
    • test_be_axiom_input_closure.py (19)
    • test_axiom_concept_mapping.py (15)
    • test_concept_mapping.py (287)
    • test_axiom_adapter.py (20, 25 skipped)
    • test_axiom_graph_adapter.py (165, 5 skipped)
    • test_country_spec.py (144)
    • test_spec_source_citations.py (138)
    • test_spec_engine_country_bundles.py (22)
    • test_spec_only_country_packages.py (37)
    • test_gate_battery.py (30)
    • test_be_target_references.py (156, 32 skipped)
    • test_transport_holdout_separation.py (51)
  • test_spec_engine_reemission.py passes 7 of 8 tests. The eighth stops on duplicate installed distribution identity: microcosm-emitter-interface, before any hash check, because the local path carried three copies of that package. PR 4a's local run hit the same error, and CI passed the file for Add Belgium's Child rules bindings and Axiom input closure (PR 4a), still inactive #1602 at this PR's base. CI only runs on pull requests into main, so this one got its first run, in a clean environment, when it retargeted.

At 941b8e3 (on main at e555b4d, whose Belgian files equal c90f5c9's): the closure rebuilt from the rulings, the regenerated be_country_spec.json and the coverage check all show no drift. The earlier rebase, 2d8247b, passed the citation guards in test_spec_source_citations.py and, at 0a08144, which differs from it only by 15 commit pins, the closure test's 19 other tests. Local test runs wait until host load drops below 100; CI on main is the test run.

Two in-session review passes checked the rows, each reason against its formula, and the counts. They don't replace the independent review this PR still needs. The first pass found stale reasons, a missing relation assertion and the ADR's deferred count. The second found only wording fixes. Every upheld finding is in this diff.

What this can't check yet

Nothing runs these modules yet. The engine pins are null, no node produces a selector column, and Belgium has no transport graph (see #1602). The bindings are approximate. The enrolment fact doesn't observe the minimum study intensity, programme list or registration conditions that each region's government sets.

🤖 Generated with Claude Code

@MaxGhenis
MaxGhenis force-pushed the be/pr4a2-post18-enrolment branch 3 times, most recently from 2d8247b to 5aab210 Compare November 15, 2026 15:24
Brussels article 25 §2(b) and Flemish article 8 §2 item 3 pay family
benefits to a child in education up to 25. PR 4a defaulted both flags to
false, a lower bound that paid nothing from 18 on. This binds each flag,
like Wallonia's and the German-speaking Community's, to a person_role
predicate over fact:person.education_enrollment's six enrolled bands, in
its scheme's eligibility module and in the regional routing bridge.

The closure goes from 35 encoded and 242 defaulted roots to 39 and 238.
Six defaults keep their values and get reasons that say what the new
bindings change; the Flemish residence-right reason names the age
groups before its exception. A new test pins all four regions' post-18 flags to one
enrolment predicate. The coverage and country-spec goldens are
regenerated, and the transport ADR now says encode runs Belgium's
person_role bindings and defers only its 11 other group bindings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis changed the base branch from be/pr4a-child-closure to main November 15, 2026 19:19
@MaxGhenis
MaxGhenis force-pushed the be/pr4a2-post18-enrolment branch from 5aab210 to 941b8e3 Compare November 15, 2026 19:19
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 15, 2026 23:01
@MaxGhenis
MaxGhenis merged commit c4ad232 into main Nov 15, 2026
22 of 24 checks passed
@MaxGhenis
MaxGhenis deleted the be/pr4a2-post18-enrolment branch November 15, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant