Repository navigation
Make Belgium's gate rows pass the transport gate registry - #1626
Merged
Merged
Conversation
Five of Belgium's ten gate rows failed TRANSPORT_GATE_REGISTRY's validators. Nothing ran them, because Belgium has no transport graph yet, and only NZ's manifest is checked in a test. PR 4b's battery node would refuse the manifest on configuration before any gate ran. - calibration_per_family_fit lacked hard_within, min_hard_family_share and min_family_size. It is now not applicable, awaiting d1902, as NZ's fit rows were before their ruling: the method card's fit tolerances are proposed, not ruled. Its notes give the proposal as parameters. - commune_fiscal_income_fit declared report_worst_fit, which no binding routes, and lacked default_rtol. Belgium has no commune-grain reference or commune tolerance, so it is not applicable, and the worst-25 intent moves into its notes. - demographics_vs_statbel declared surface, which no binding routes. It now selects families [demography]; its 2% tolerance is unchanged. - nonnegative_columns now lists the source manifest's non-negative outputs, household_weight and age. - formula_owned_export now lists the 16 variables Belgium's Axiom bindings request, until an export contract lists the exclusions. test_be_gate_manifest.py runs both validators on Belgium's manifest and pins the column lists and the two not-applicable rows to their sources. TestBelgianCompatibility now accepts a declared not-applicable row. The country-spec golden moves only by the gates.json hash and fingerprint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Subfleet hard-tier review (20261115-142458-be-gate-rows-r1) approved 9fecb6e with two P2s and seven P3s. P2-1: only the per-family row waits for d1902, but the two aggregate_admin rows carry BE-MC6's unruled 5% and 2%. They stay applicable on purpose: demographics_vs_statbel is Belgium's live fit grading while the per-family row waits, and the national row binds once a country-level reference activates (until then it fails on its country level). Both rows' notes now say so and that a d1902 ruling moves all three rows. The test keeps both rows applicable and pins the national row's default_rtol to the non-demography references' fit_tolerance, as it already pins demography's. P2-2: the d1902 tripwire read every reference's method_card_status, which all card rows share, while the card lets d1902 rule row by row. It now reads the BE-MC6 references' status and says the generator writes one status for every row today. P3s: the fit row's notes describe NZ's two d1376 rows and evidence_absent_blocks correctly; the commune row's reason and test key on commune fiscal income, not any commune reference; a Belgian twin of NZ's bound-or-declared test catches a dropped binding, with macro_realism_nbb named as the one unbound applicable row. The fit row's notes also say NZ's rows list their families. The other P3s are PR-body wording. An independent check of this commit (executed mutants and a round-diff read) found no P0 to P2; its P3s are folded in here: the tripwire refuses an empty BE-MC6 set, the commune test's name says fiscal income, and the national row's case is stated as above rather than as grading it does not yet do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
be/gate-rows-registry
branch
from
November 15, 2026 23:02
9fecb6e to
f575cd9
Compare
MaxGhenis
marked this pull request as ready for review
November 16, 2026 03:50
This was referenced Nov 16, 2026
MaxGhenis
added a commit
that referenced
this pull request
Nov 16, 2026
Main brought nine first-parent merges since c4ad232: #1626 (Belgium gate rows), #1628 (NZ B8 reference teen heads), #1621 (County Files household measures sidecar and schema manifest tools), #1540 (L0 release practice docs), #1609 (gate battery shared scopes), #1619 (ACS partnership_income kept at zero where SEMP holds it, #1387), #1629 (untimed composed stage-scan test), #1594 (withdraw a release build) and #1541 (Microcosm name sweep). Main changed nothing under packages/microcosm-fit or packages/microcosm-graph. Four pin files conflicted; each block took main's text plus this branch's own comment lines, placed after main's #1387 sentence: - docs/evidence/spec-engine/us-f0-coverage.json: five digest blocks, main's side (the branch has no comment there). - packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py: main's #1387 comment, then the branch's #1543 sentence, then the digests. - packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py: main's #1387 comment, then the branch's fit-input-checks sentence, then the golden. - packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py: main's #1387 comment, then the branch's #1543 line, then spec_sha256. No code or test file conflicted, and no other file was changed by both sides. The tools then wrote every value on the merged tree: - tools/repin_us_spec_engine_contracts.py: EXPECTED_HASHES seed_map d5898b93 and seed_protocol 206be396, the loader golden b7c843a1 and the multispine pool spec_sha256 4062e22e (its first pass moved the coverage tool test's covered_item_count to 40; its second pass restored 41, so that file equals main's). - tools/spec_engine_coverage.py: us-f0-coverage.json's eight digest lines (42395/42395 configuration fields; 41/41 inventory checks). - fit.qrf/pins.json keeps the branch's values: the merged fit sources equal the branch's and the kernel's implementation hash reproduces, so tools/graph_parity_repin.py was not run. The repinner's quote style was then reformatted with ruff format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Nov 16, 2026
The BE column of the "Two postures, one executor" table in docs/gate-battery-contract.md still counted nine entries, eight blocking and one diagnostic. #1602 added release_input_coverage, so be/gates.json declares ten: nine release-blocking and one diagnostic. #1626 made two of them (calibration_per_family_fit and commune_fiscal_income_fit) not applicable, which the entries row now says. The review of the count fix noted that the incumbent-posture cell read as if external oracles already replace self-parity. be/gates.json's policy text leaves their implementation (EUROMOD-BE baselines and Federal Planning Bureau reform scores) to microcosm#264, so the cell now says they are planned there. Review: Subfleet 20261116-091127-be-gate-contract-count-r1 approved 08b8548 with no in-scope finding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ready. Round 1 of the Subfleet hard-tier review (20261115-142458-be-gate-rows-r1) approved 9fecb6e with two P2s and seven P3s; f575cd9 takes up all nine. Round 2 (20261115-180257-be-gate-rows-r2, a full review of c4ad232..f575cd9) approved with no findings and found all nine closed. The branch is rebased onto
mainat c4ad232 (#1611). CI at f575cd9: run 43772590109 passed all 12 jobs. The NZ hub OK'd the sharedtest_gate_battery.pyhunk at 9fecb6e; its blob (sha256 429a4da1…) is unchanged.Why
Five of Belgium's ten
be/gates.jsonrows failedTRANSPORT_GATE_REGISTRY's validators (validate_gate_parametersandvalidate_required_gate_parameters).test_transport_gate_bindings.py,TestNewZealandManifest).gates.battery@1node runsvalidate_gate_parameterson the whole manifest (transport/gate_kernels.py:911at e555b4d), so it would refuse on configuration before any gate ran.PR 4a's second independent review (#1602) found the first two failing rows. Checking each row on its own turned up the other three, because each validator stops at its first refusal.
What changes
calibration_per_family_fitwithin0.1,min_family_share0.8; lackedhard_within,min_hard_family_share,min_family_sizecommune_fiscal_income_fitreport_worst_fit25, which no binding routes; lackeddefault_rtoldemographics_vs_statbelsurface: demography, which no binding routesfamilies: [demography];default_rtol0.02 unchangednonnegative_columnscolumns[household_weight, age], the source manifest'snonnegative_outputsformula_owned_exportformula_owned_columnsnational_and_nuts1_admin_aggregateskeeps its parameters; only its notes change (below).Only the per-family row waits for d1902. BE-MC6 proposes three fit tolerances: each calibration target within 5%, demography within 2%, and administrative aggregates within 5%. All three sit in Max's parked decision d1902.
aggregate_adminrows keep the card's unruled 5% and 2%, which they already carried. That is deliberate. NZ (at 2fc0502) and Armenia made their aggregate rows not applicable as well, so this differs from both.demographics_vs_statbelis Belgium's live fit grading while the per-family row waits: the 18 NUTS1 demography references are the only active ones.national_and_nuts1_admin_aggregatesgrades nothing yet beyond those demography anchors, at 5%. It stays applicable so it binds as soon as a country-level reference activates. Until then it fails on any calibrated surface, because itscountrylevel selects no active reference.The per-family row's notes give the proposal in parameter form. NZ's ruled d1376 wrote its two tolerances as two
per_family_fitrows, each withevidence_absent_blockstrue: one at 5% over its calibration families, anddemography_per_family_fitat 2%. Belgium's 2% already lives indemographics_vs_statbel, so on activation this row takeswithin=hard_within= 0.05, both family shares 1,min_family_size1 andevidence_absent_blockstrue. A demographyper_family_fitrow at 0.02, as NZ has, is the other option. NZ's rows also list their families, so a missing calibration family fails the row; withoutfamilies,target_profile_coveragecatches a missing family.The commune row has nothing to select. Belgium's 60 target references sit at the country and NUTS1 levels only. The reference generator leaves commune fiscal income to a later commune spine gate, and no ruling sets a commune tolerance.
report_worst_fithas no counterpart in the transportaggregate_adminbinding (its keys aredefault_rtol,familiesandgeography_levels). So the row's worst-25 intent moves into its notes, with an activation recipe.surfaceis an artifact argument, not a parameter._aggregate_admintakes the calibrated surface as itssurfaceargument (transport/gate_bindings.py:634-636, bound to thesurfaceartifact at:1954), andFunctionBinding.evaluatewrites that artifact over any declaredsurfacekey (gate_battery.py:337-341). The validator refuses the unrouted key before any run (gate_kernels.py:911). Had the key been routable, the old row would have graded every anchor at 2%. Reading it as the demography family is an inference;families: [demography]makes it explicit.formula_owned_columnsis a lower bound. It lists every variable a binding inaxiom_rules_bindings.jsonrequests. That is the bindings' share of the composer's non-exportablescratchset, which also takes the money-normalize outputs it doesn't rewrite and the money-bridge andreporting.*outputs (transport/compose.py:1848-1873). NZ's real list comes from its export contract and carries one name beyond its bound outputs. Belgium's switches to its export contract at B4c.Tests
test_be_gate_manifest.py(six tests):macro_realism_nbbnamed as the one exception (the validators skip unbound rows, so a dropped binding would otherwise pass unseen);columnsto the source manifest andformula_owned_columnsto the bindings;method_card_status: it must take parameters when they stop beingproposed_pending_d1902. The generator writes one status for every card row today, so ruling BE-MC6 alone needs per-row statuses there first;aggregate_adminrows applicable, and pinsdemographics_vs_statbel's 0.02 to the demography references'fit_toleranceand the national row's 0.05 to the others'. The national pin ties BE-MC6's administrative-aggregate 5% to its per-target 5%; they coincide today, and a ruling that splits them changes the pin;TestBelgianCompatibility(test_gate_battery.py) now acceptsnot_applicablewhen its reason equals the row's declaration. The other gates must still beevidence_absent,shippablestays false andenforcestill blocks.be_country_spec.jsonmoves only byresource_hashes["gates.json"]and the fingerprint.Verification
At 00a5c09e4 (on e555b4d), with pytest one file at a time (
-n 0):test_be_gate_manifest.py: 6 passed.test_gate_battery.py -k Belgian: passed.test_country_spec.py(golden, Belgian and fingerprint tests): passed. The golden is regenerated fromload_country_spec("be")and rendered withcanonical_json_bytes, as the golden test renders it.test_spec_source_citations.py, Belgian guards: passed.ruff checkandruff format --check(0.15.16, the lockfile's version) pass.The rebase onto c4ad232 changed nothing but two lines of
be_country_spec.json: outside that file, both commits keep their patch-ids (git patch-id --stable). The golden ismain's with the newgates.jsonhash and a fingerprint recomputed bytrace.compute_composition_fingerprint's rule (sha256 of the sorted resource hashes, newline-joined). That rule reproduces 00a5c09e4's golden exactly. No pytest ran after the rebase (the host was under a disk write-stop); CI is the test run.An independent check of the round-1 commit (executed mutants against every changed test, and a round-diff read of every finding and body claim) found nothing above P3. Its P3s are folded in.
At 9fecb6e, CI passed all 12 jobs (run 43752237313).
Shared file
test_gate_battery.pyis shared. The NZ hub OK'd its one hunk at 9fecb6e (blob sha256 429a4da1…), after checking that a not-applicable outcome carries the row's declared reason (gate_battery.py:702-707). From now on, a shared PR that adds a required parameter to a gate Belgium binds also failstest_be_gate_manifest.py, as it already fails NZ's twin. That holds for applicable rows only:validate_required_gate_parametersskips not-applicable rows (transport/gate_bindings.py:2110-2112), so the parameter recipes in the fit and commune rows' notes can go stale without a test failing. A shared PR that adds a transport binding formacro_realismalso fails the new bound-or-declared test, by design:macro_realism_nbb'sbandsthen need checking against that binding's vocabulary.Open PR #1609 (US hub) also edits
test_gate_battery.pyand the gate contract doc. The hunk here changes only the assertion insideTestBelgianCompatibility, so it applies by content.docs/gate-battery-contract.mdstill counts nine Belgian entries ("8 blocking + 1 diagnostic"); #1602 made it ten. I left that row for after #1609, which rewrites the same table.Open items for PR 4b
gate_battery.py:439) and never blocks (:539-552). Until d1902 rules and the row takes parameters, it grades nothing.macro_realism_nbbhas no transport binding, so it resolves to absent evidence (gate_battery.py:709-714), which blocks a release candidate;target_profile_coverageandnational_and_nuts1_admin_aggregatesfail on a demography-only calibration (next item).national_and_nuts1_admin_aggregatesneeds an active country-level target, and none is active yet.target_profile_coveragerequires five families (transport/gate_bindings.py:789-823), and only demography is active.be/gates.jsonhas none, and W3 owes them before the first calibrated candidate.nonnegative_columns, the node must setweight_entityto household and slice personage.Belgium stays inactive.
🤖 Generated with Claude Code