Books / Law as Code in Practice: French Family Benefits / Chapter 18
Part V · Chapter 18
Migrating a Rulebook: Other Tools' Tests as Acceptance

Contents of Law as Code in Practice: French Family Benefits
By the end you can prepare a migration register without claiming an unexecuted comparison.
Lawyer: qualify the legal grounds of a difference.
Analyst: map inputs and result components.
Developer: preserve external expectations and record both executions.
The family’s question
“Another calculator has a test for our benefit. Can you use it to check this model?” Predict whether a matching rate is enough to make two scenarios comparable. We keep the separate Moreau teaching card from Chapter 2; its synthetic amounts are useful for learning the mapping method.
This chapter covers the method. No Catala or OpenFisca numerical comparison is accepted here, and no foreign code is presented as executed.
Start with the legal premise
L. 531-2 CSS, in the pinned wording used in the Moreau case, says:
dont les ressources ne dépassent pas un plafond
English gloss: whose resources do not exceed a ceiling. The equality boundary suggests a scenario worth preserving. Correspondance des entrées → input mapping; attendu → expectation → the original external test’s declared answer.
An actual local equality test ends with these statements; the preceding given facts are omitted:
evaluate truth(fr.pf.paje::droit_prime_naissance(entity_ref("urn:law:examples:fr:moreau:menage"), entity_ref("urn:law:examples:fr:moreau:enfant")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
Those expectations belong to Moreau. Do not rename them as a foreign test or use its synthetic BMAF as a published scale.
A migration register
| Field | Preserve before execution |
|---|---|
| Original identifier | System, test ID and source reference |
| Version and date | Model release, legal date and retrieval date |
| Inputs | Household, units, period, resources, geography and provenance |
| Construction | Parameter edition, rounding, selected reading and defaults |
| Original expectation | Unchanged value, component and meaning of status |
| Local execution | Mapped case, question, answer and saved grounds |
| Difference | Input mismatch, scope, arithmetic, reading or legal-basis question |
| Acceptance | Named reviewer, evidence and unresolved question |
No new numerical comparison is claimed by this register. Moreau’s local equality and missing-input questions were run on 11 October 2026 with law 0.1.12, as recorded in Chapters 2 and 5. This chapter demonstrates the migration method using a local teaching case. It does not establish acceptance of a Catala or OpenFisca comparison. Before publishing a match count, preserve the external source, input mapping, both execution records and the review of each difference.
Change one thing
Replace an annual resource field with a monthly one. Before comparing results, record the conversion and the reference period; twelve times a monthly amount is not automatically the legal annual resource base. Likewise, a formula component cannot be compared with a net transfer merely because both are money.
Keep the original expectation when a difference appears. First compare facts, effective editions, defaults and rounding. For a difference involving article 31 of the housing-aid order of 27 September 2019, record the applicable edition and an open question about the legal basis. Leave the issue unresolved until reviewed; do not classify it as a confirmed implementation error.
What this gives the fund
A migrated test can retain its origin and meaning rather than becoming a fresh expectation tailored to the new model. The register makes disagreements reviewable and names the evidence still needed for acceptance.
Where Catala stands on this
Catala provides assertion and output tests and clerk test (Catala book, ch. 3.3). Arxo adds case/query records with proof-bearing responses. The Catala 1.3.0 book does not describe a built-in register binding a migrated external scenario to these answer records; teams can maintain one around either system. For the fund, the shared discipline is preserving the test’s original expectation and investigating differences before accepting a migration.
Exercise
- May you adjust the original expectation to obtain a passing migration?
- What must be checked before comparing two money values?
- What would permit publishing a numerical match count?