lessons.md

back to table · edit · history · where entries came from · files · download

2481 bytes, as of the version from 2026-10-27 01:05 (current). Recorded here, not run.

## Read-back checks must accept both scalar and annotated entries

What happened: the companion T514 returns `Numbers` as a mapping from argument to a mapping containing `number` and sometimes `comment`. The new T515 returns a mapping from argument directly to a decimal string when no entry metadata was supplied. A check copied from the former shape failed with `TypeError: string indices must be integers, not 'str'`. The values did not disagree. The checker now unwraps a mapping only when the entry is one and otherwise uses the scalar.

What the skill says now: `numberdb.table` returns the complete document with capitalised keys; it does not promise a single shape for the entries.

What it should say: the `Numbers` section may contain scalar leaves or mappings with a `number` field. Inspect the returned document and normalize both when writing independent read-back checks. Do not treat a decoding error as a numerical disagreement. The campaign's `check.stored` helper currently requires Django and a local database; an outside contributor should use `numberdb.table` instead.

Evidence: `checks-stored.log` records the shape error; `checks-stored-final.log` records independent quadrature containment and the ODE and sum checks on all nine stored values, followed by `VerifyReport T515: 9/9 matched`. The final `checks.py` is attached to T515.

## Sage ball methods and NumberDB serialization helpers are not interchangeable

What happened: check development tried `RealBall.contains`, `ComplexBall.is_finite`, `airy_bi(derivative=1)`, and a public `numberdb.to_text` with a `rigour` keyword. Those interfaces were not present in Sage 10.9 / numberdb 0.1.10. The successful checks use membership for exact containment, test each complex component for finiteness, and import the internal `numberdb._write.to_text(value, digits=100)` only to inspect the generator's written form. The generator itself uses the public `Generator` API.

What the skill says now: named imports do not initialize every Sage capability, and finite narrow comparison balls are required.

What it should say: inspect the installed ball API before writing checks; real and complex ball classes expose different methods. NumberDB's public write interface is `Generator`; internal serializers are version-specific helpers.

Evidence: `probe.log`, `checks-before-fill.log`, `checks-final-local.log`, and the attached scripts. These were checker API errors; no numerical disagreement was observed.