Books / Law as Code in Practice: French Family Benefits / Chapter 17

Part V · Chapter 17

Audit and Reproduction

3 min read

Full-page risograph illustration: an open folder under a desk lamp, a blue line across its pages to a small red square.
Contents of Law as Code in Practice: French Family Benefits

By the end you can state what replay establishes and what still requires separate review.

Lawyer: distinguish reproducibility from correct interpretation.
Analyst: preserve the question and inputs.
Developer: compare programme, case and result fingerprints.

The family’s question

“Can someone repeat your answer next year?” Predict whether repeating the same answer proves its legal correctness. We return to the fictional Moreau teaching case from Chapter 2: synthetic BMAF €400, base ceiling €30,000, resources at the modelled ceiling €35,841. These are not the published 2025 scale.

The pinned rule

L. 531-2 CSS, in the wording in force since 16 December 2020 and used for this teaching case dated 15 July 2025, includes the condition:

dont les ressources ne dépassent pas un plafond

English gloss: whose resources do not exceed a ceiling. The condition concerns the household or person receiving the birth or adoption grant. Equality is included. Replay repeats the formalisation of that question; a legal reviewer must still assess the chosen text, facts and construction.

The saved fingerprints

This excerpt copies the actual saved answer’s fingerprints; other fields are omitted:

{
  "programHash": "sha256:d7740308956c4a9b279537698f7af3d448a2abb9b54e2f676fc16eacfaaf29aa",
  "caseHash": "sha256:8134b82a55a7e45ccce7732f00c1659c5b1ff91e98abc16a25590339591a9f92",
  "resultHash": "sha256:3b041b7e8d987baafb0425b9fb2c0286f11c4d79c8eaa5519db62a2051e64ac2"
}

The programme fingerprint identifies the executable model; the case fingerprint identifies the presented case; the result fingerprint identifies the evaluated answer. Preserve the request and bundle, not the fingerprints alone. These fields do not replace a separate archive of legal publications: the Moreau answer’s resolved-edition field is empty. The edition is nonetheless identified: each applied rule carries the anchors of the pinned editions of its sources (Chapter 3 shows one, CSS_D531_2_ED2021_04); the resolved-edition field is a separate summary that this version of the tool does not fill.

Check Recorded result
Original amount question €919 established
Replayed amount question €919 established
Programme, case and result fingerprints All three unchanged

Original and replay recorded on 12 October 2026 with law 0.2.1, from the book’s reproduction kit (Appendix D). This is one replayed answer, not a certification of the corpus.

Three columns. Replay: the saved answer of €919 is established again with the same three fingerprints, showing the same model gave the same answer to the same case, not that it is legally right. Declared expectations: the package's scenarios pass, showing they give the declared answers, not the legal review. Legal review: a reviewer assesses the text, facts and construction. Below: changing resources from €35,841 to €35,841.01 makes a new case, not a failed replay.
Three different checks: a replay, the declared expectations and a legal review answer different questions.

Repeat the answer

From a local checkout with law installed, save a new answer directory and replay it:

cd corpus/laws/fr/pf-paje/examples/prime-naissance-moreau
answer_dir="$(mktemp -d)"
law ask . --case PlafondEgal --query-json queries/montant.json --out "$answer_dir"
law eval "$answer_dir"

Compare manifest.programHash, manifest.caseHash and resultHash in the original and replayed JSON. If any differ, inspect inputs, execution and versions before treating the replay as identical.

Change one thing

Changing Moreau’s resources from €35,841 to €35,841.01 changes the case and makes the grant not established in Chapter 2’s neighbouring file. That is a new question with different evidence, not a failed reproduction of the equality case. A changed programme similarly needs a new recorded result.

What this gives the fund

An auditor can repeat a preserved computation and tell whether it used the same model and case. Passing declared expectations checks those scenarios. Legal qualification checks whether the formalisation and decisions are justified. These are three distinct forms of review.

Where Catala stands on this

Catala 1.3.0 provides computation traces for inspecting intermediate steps (Catala book, ch. 2.4), alongside scenario tests and continuous integration (ch. 3.3). Arxo builds saved query bundles and programme/case/result fingerprints into replay; the Catala 1.3.0 book does not describe this built-in query-bundle form. An application can preserve its inputs and outputs. Here the fund can check a specific computation’s identity while leaving legal interpretation open to independent review.

Exercise

  1. Does identical replay prove the law was correctly interpreted?
  2. Are fingerprints alone sufficient to rerun a case?
  3. Is a question after changing resources a replay of the same case?

Contents · PDF · EPUB · Free under CC BY 4.0

Law as Code in Practice: French Family Benefits

Contents

You’re reading · Part V

What the Model Gives the Fund

Reading settings

Text size
Appearance

Preferences and your reading place are saved only in this browser.