docs: clarification 133, review log part 17, and the tools in README, CHANGELOG and CLAUDE.md

What the coding and an independent reader found in clarifications 126 to
133, the reproduction of the made-up reference files, the measured time for
the 42 rows, and the changed hypothesis in CLAUDE.md and CHANGELOG.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-11-13 22:01:25 +01:00
commit 11f312f1ac
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
5 changed files with 186 additions and 4 deletions

View file

@ -113,11 +113,24 @@ carousel, Python code, and a Claude plugin (own repo, later).
`Dimensjonering`) and of `regn_program` (`paaslag`, `diskontering`, `skattekostnad`); with them off every
figure is unchanged to the last digit. The four rows of the ownership forms go through
`kjoring.eierformer_paa_trinnet(..., rad=Eierrad...)`, which also gives the state's cash flow next to M6
(clarification 123). The low and the high path of the carbon price are passed in by the caller. The tools
of chapter 12 are not coded.
(clarification 123). The low and the high path of the carbon price are passed in by the caller.
The tools of chapter 12 (clarifications 126 to 133): `grunnlag.py` holds everything a run needs besides
the model code (`Grunnlag`: the sets per draw, the drawn values and their status, M5, the EEA assessment,
the carbon paths, the mark «frosset», «endret» or «oppdiktet»); `fra_fil` reads a made-up basis file,
`fra_frys` builds it from the freeze and stops before it reads anything until the EEA assessment per
ownership form is written down in the text (missing before part 6). `datafiler.py` builds and writes the
six files of the main run (`dommer.json`, `tidslinje.json`, `eierformer.json`, `terskler.json`,
`folsomheter.json`, `innhold.json`; fixed field order, no rounding, `null` for no value) and compares two
folders (`sammenlign_mapper`: «identisk», «innenfor toleranse» at relative 1e-9, «endret»). `verktoy.py`
is the command line: `hovedkjoring`, `kontroll`, `scenario`, `folsomhet`, `terskel`, `sammenlign`,
`arbeidskopi`; every command that computes takes `--grunnlag FIL` or `--frys`, with no default. `kart.py`
generates `modell/kart.md`, the map from S-number to function (`SAMMENSATT` lists the numbers that are put
together over the years or the draws).
- `data/trekninger.npy` and `data/trekninger.json`: the 10 000 draws of the 91 drawn quantities, in the parameter
file's units. `data/aarshendelser.npy` and `.json`: one uniform number per draw and year 2028–2100 for the
export rule (own seed). Committed; every later computation reads them.
- `tests/oppdiktet/`: `grunnlag.json` (a made-up basis, 200 draws, written by `lag_grunnlag.py`) and `fasit/`,
the six files the main run writes from it on the ladder 1, 2, 5. Committed; `kontroll` reproduces them.
- `tests/`: unit tests per equation, the loader, the draws, and `test_fasit.py` (known answers from Argonne,
NOU 2026: 4, Epoch and NVE with the sources' own assumptions). Build-out, power system and cash flow are tested
on the made-up set of values in `tests/conftest.py`, and so are the levelised cost, ownership, scale and
@ -134,6 +147,8 @@ carousel, Python code, and a Claude plugin (own repo, later).
search for the price threshold, the threshold in a quantity, the surfaces and the Sobol estimator, by hand.
`test_folsomheter.py` holds the rows of the sensitivity list through the run and the table on invented
outcomes; `test_folsomheter_modell.py` and `test_folsomheter_naaverdi.py` the switches of the model code.
`test_grunnlag.py`, `test_datafiler.py` and `test_verktoy.py` hold the tools on the first draw of the
made-up basis; `test_kart.py` holds the map against the specification and the code.
A condition can only count with enough draws to show an effect (none can with ten), so the tests of the
conditions use forty.
- `requirements.txt` (numpy, scipy) and `requirements-dev.txt` (pytest, ruff, mypy) pin exact versions;
@ -149,6 +164,12 @@ carousel, Python code, and a Claude plugin (own repo, later).
- **Pre-registration:** the criteria in `FORHANDSREGISTRERING.md` are approved by the operator and fixed before
anything is computed. Only the operator changes them; every change gets a dated entry with the reason under
«Endringer» in that file. Parameters are frozen in their own commit before the first result run.
- **The hypothesis was changed by the operator 2026-11-13**, before any result (pre-registration, «Endringer»):
it is that AI data centres owned in principle by the state can become a source of income for Norway as oil
has been. A dedicated nuclear plant per data centre is one of the power solutions, compared on equal terms:
the report says how often each of the five comes out best, with no verdict of its own on A. M1 to M6 and the
thresholds are unchanged. Part II and M7 in the pre-registration, the specification, the code and the data
files still give A its old special status until part 5H rewrites them; nothing is computed before that.
- **Frozen parameters:** `modell/parametere.json` is not edited after the freeze. A change is a deviation: new
commit, new checksum, and a dated entry with the reason under «Endringer» in the pre-registration.
- **Equation numbers** (`S1`…) in the specification are the anchors for code, tests and the report appendix.
@ -162,7 +183,7 @@ carousel, Python code, and a Claude plugin (own repo, later).
the measured deviation and the cause if known, and is reported in the review log.
- **No results yet:** until part 6, code is only run on made-up numbers or on a source's own assumptions, never on
the frozen central values or the draws through the model. `regn_program` and `kjoring.kjor` are only called
with made-up sets.
with made-up sets, and the tools only with `--grunnlag` and a made-up basis file, never `--frys`.
- **Neutrality:** vendors and companies are data sources, cited neutrally, never recommended. Nothing here
advertises a business. "Business case" means profitability for Norway, not something for sale.
- **Sadhguru** is mentioned in exactly one sentence, as inspiration, in the report's foreword and in README; never
@ -175,6 +196,9 @@ carousel, Python code, and a Claude plugin (own repo, later).
- Set up: `uv venv --python 3.13 .venv && uv pip install --python .venv/bin/python -r requirements-dev.txt`
- Tests: `.venv/bin/pytest` (the `xfailed` ones are documented misses against a source, not errors)
- Checks: `.venv/bin/ruff check . && .venv/bin/ruff format --check . && .venv/bin/mypy`
- Reproduction (made-up, about six minutes): `PYTHONPATH=src .venv/bin/python -m tokenfabrikker.verktoy kontroll
--grunnlag tests/oppdiktet/grunnlag.json --fasit tests/oppdiktet/fasit --prosesser 8` must print `identisk`.
Map: `PYTHONPATH=src .venv/bin/python -m tokenfabrikker.kart kontroll` (`lag` rewrites `modell/kart.md`).
- Draws: `PYTHONPATH=src .venv/bin/python -m tokenfabrikker.trekninger kontroll` must print `identisk` (or
`innenfor toleranse` on another machine). `lag` rewrites the file and is only run after a deviation from the freeze.
The same two commands exist for the event stream: `-m tokenfabrikker.hendelser kontroll`.