Add Belgium pilot: Axiom rules engine over populace-be entity tables - #448
Conversation
2bebb23 to
2bde0b0
Compare
|
Rebased onto current
Checks: Still a pilot, still deliberately not for merge as-is; refreshed so it runs against today's core ahead of the CAPE/BEAMM Brussels sessions (8/24) where it's the integration-surface demo. Note: rulespec-be#118 (couple PIT pipeline fix) is in flight and will change the worker→couple composition this pilot points at once merged. |
The first non-policyengine-core country channel: an Axiom-backed TaxBenefitModelVersion outside the certified-release machinery, running the rulespec-be composed worker pipeline (employee SSC and PIT before withholding) over populace-be person/household tables with calibrated weights. Includes a populace-style two-entity dataset class, a population example scored against ONSS/SPF facts, and tests that skip cleanly when the source-only dependencies are absent. Fixes #447 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The composed pipeline now computes the ONSS work-bonus amounts from law (the a/b supplied inputs are gone; the reference-wage input bridges 0 to worker remuneration), and the ordinary-contribution concept nets the bonus. Update the supplied defaults, exercise the phase-out in the test fixture (wiped at 20k, partial at 30k, statutory 13.07 percent by 60k), and label the example aggregates accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Keep the shared household-weight validator authoritative on the populated-data path. Refs #447.
2bde0b0 to
521a66b
Compare
|
Addressed the approved in-memory weight finding (C1) in
Validation before and after rebasing onto main
The push used an exact expected-head lease against the actual PR repository/branch. The PR description now states the Microcosm API and observed checks. A subsequent isolated run with real Microcosm The refreshed CI run has now completed with ten green checks and two failed Python test jobs. Each test job reports 7 failed, 816 passed, 4 skipped: seven deterministic Belgian tests still depend on a developer-local RuleSpec checkout despite their runtime/provenance mocks. This is separate from the native sign test, which is skipped in CI. A self-contained temporary test-fixture correction is proposed; the production file-existence check will not be weakened. Both additional test-only fixes are awaiting approval. The PR remains draft until the real-stack test and refreshed CI pass. These checks do not establish legal/parity validation or population certification. |
Approved S2/S3 test-only follow-upPushed Refreshed CI is running with no failures at this update. The PR remains draft pending completion. |
Fixes #447
Summary
Add a Belgium pilot that connects PolicyEngine's dataset/model interfaces to the Microcosm Frame adapter and the Axiom rules engine. It executes the configured Belgian worker SSC/PIT module; it does not implement a second set of tax formulas in PolicyEngine.
microcosm.frameandAxiomEngine(..., rulespec_roots=(rulespec_root,))with an explicit RuleSpec root. Retain the existingPopulaceBelgiumDatasetpublic class name for compatibility.Validation
The approved test-only follow-up produces the current head,
910bd210e41267e02b6bc611727b04c1d72faf15:RULESPEC_BE_ROOTpoints to an absent path.ba73e2f43c6f1dcb3533faeab26ecc18260bd712, Axiombb4b5684870547756078a62f1866a77c5b56f7f3, and RuleSpec-BEb105e2b3a3086ddd2de447d58a9b951346870dd1, with CPython 3.14.4 and the native extension.The follow-up commit changes only
tests/test_be_axiom_pilot.py. Controlled-runtime tests now create and explicitly receive a temporary RuleSpec root. The native test checks the signed net-tax contract encoded by the pinned companion fixture: the refundable work-bonus credit can make the selected PIT output negative at low remuneration. It retains finite-result, zero-income, ordering, content-identity, provenance, weight, period, and non-mutation checks. The production RuleSpec file-existence check, runtime code, and tax formulas remain unchanged.Remaining gate and scope
Keep this PR draft for review. The refreshed CI run completed successfully: all 12 checks passed at current head
910bd210e41267e02b6bc611727b04c1d72faf15.The pinned RuleSpec output definition and companion fixture establish the tested negative net-tax behavior within this software model. They do not independently validate Belgian law.
This pilot is outside the certified-release path. These checks do not certify Belgian population data, fiscal estimates, legal coverage, or EUROMOD parity. The follow-up adds no calibration targets, dependencies, lockfile changes, RuleSpec changes, formulas, datasets, or publication actions.