# SF-CONTENT-01 — required measurement validation

This is a technical repair of kit r01, not a new source treatment or visual edit.
The sealed r01 kit and its evidence remain unchanged. The prior technical finding
was reproduced before editing: deleting only the fitting heading's measured width
silently selected a shorter title for each specimen; both returned objects passed
the real render-input schema. The regression suite is run red against the copied,
unmodified helper before the four-line production fix.

## Root cause and fix

The old search evaluated `widths[text] <= maximumWidth`. An absent or NaN width
compared false, indistinguishable from a genuine measured over-width candidate.
Other invalid values could be coerced into fitting widths. The reusable helper
therefore contradicted its documented missing-measurement failure contract.

R02 validates every required candidate measurement before searching: it must be
an own property containing a finite, nonnegative number. Incomplete maps are
rejected even when an earlier candidate already fits. Unrelated extra keys do not
matter. A complete null-prototype dictionary is valid. A complete map with a real
finite over-width measurement still selects the next measured fit; an inclusive
exact fit and the existing ellipsis-only rejection remain intact.

The only changed production module is the `content.mjs` module in the addon’s code directory, with four added
validation lines. Both source specimens retain their full original geometry,
typography, layer hierarchy, pointer exposure, crop and 57-frame timing. No source
pixels or native Resolve output are generated by this repair.

## Regression and replay boundary

`tests/measurement-map.test.mjs` adds 40 tests across both specimens. They cover
missing fitting/first/trailing widths, a selected-only map, inherited entries,
undefined/NaN/infinite/nonnumeric/negative widths, valid measured truncation,
inclusive fits and complete-map ellipsis rejection. The existing 122 portable
tests remain; the extra-board-field fixture now supplies a complete width map so
that it still reaches the board schema assertion rather than failing earlier.

Run `bash run.sh tests` with `FIELDNOTES_PLATES` and `FIELDNOTES_OPTICS` pointing
to the unchanged, separately retained r01 preparation directories. Their manifest
records, PNG hashes, browser/font checks and input hashes remain applicable because
recipe, contents and preparation/exporter code are unchanged. No second set of
36 static plates or 285 optical frames is needed or claimed as newly generated.

`r02-proof.json` binds the unchanged, actual full-Chrome heading measurements
from r01 and read-only checks of both sealed normal-content movies, including all
57 frame clocks and RGB/YUV hashes against the historical replay inventories.
The fixed helper produces exactly the stored normal contents from those complete
measured maps. Recipe, render source and settings
are unchanged. The movies are reused, not copied or re-rendered; this repair does
not claim a new render or fresh heading measurement. No PNG is generated and no dependency is copied or
installed. The unchanged public replay command remains available; use a bounded
supervisor and sufficient declared temporary headroom when running it.

The source-clock, crop, earlier preparation and CPU-assembly reports inherited
from r01 are historical evidence, not repeated native extraction or a new Resolve
check. The CPU assembly remains nonidentical with no waiver. No native Resolve,
source-quality, moving-quality or blind-review approval follows from this repair.
Source/aesthetic critic inputs are not modified or given this technical finding.

`changes.patch` lists the exact textual changes from the sealed kit, excluding the
self-referential checksum file and patch itself. `r02-proof.json` lists changed and
unchanged code/assets; `SHA256SUMS` binds every delivered file except itself.
