llm-ingestion-okf/examples
Kjell Tore Guttormsen f65f5fc342 fix(inbox): a segment title is declared, never marked derived
A segment's title comes from the plan, so a human adjudicated it. But
structure derivation runs over the segment body, finds no title key and
no usable heading, falls back to a stem, and adds "title" to derived.
The concept then emitted a stated fact under an inferred marker, and a
consumer that distrusts derived fields would distrust exactly the thing
a human decided. An over-marked field is the same defect class as an
unmarked heuristic: the marker is only worth something if it is
accurate in both directions.

Scoped to title alone, and pinned that way by test: number stays in
derived on a segment, because nothing about segmentation makes an
inferred document number declared. Without a segment a derived title is
still marked, so only a plan makes a title declared.

The SEGMENTED_V1 golden moves, which is the intended consequence and
the only golden that may. The four existing goldens are byte-identical
to baseline 770d8d4, measured against the sha rather than inspected.

Co-Authored-By: Claude <claude-opus-5>
2026-09-01 19:29:46 +02:00
..
ingest-golden-file feat(profiles): DEFAULT stamps commons' O2 generated, V1 executed 2026-08-09 12:29:05 +02:00
ingest-golden-http feat(profiles): DEFAULT stamps commons' O2 generated, V1 executed 2026-08-09 12:29:05 +02:00
ingest-golden-okf-v0-2 fix(okf-v0.2): generated.by is process:okf-ingest — the id commons decided 2026-07-31 20:50:21 +02:00
ingest-golden-segmented fix(inbox): a segment title is declared, never marked derived 2026-09-01 19:29:46 +02:00
ingest-golden-sql feat(profiles): DEFAULT stamps commons' O2 generated, V1 executed 2026-08-09 12:29:05 +02:00
README.md feat(examples): ship the §11 golden fixtures with byte-exact conformance 2026-07-16 20:09:03 +02:00

Golden extractions (ingest-spec §11)

One directory per case, ingest-golden-{source type}/, each containing:

Entry Meaning
manifest.json The manifest under test.
fixture/ The source content (CSV catalogue, sqlite database, or mock payloads).
ingested-at.txt The fixed timestamp, one line, §5 format.
expected-bundle/ The expected materialized bundle, compared byte for byte.

ingest-golden-file and ingest-golden-sql are the conformance MUSTs. The http source type is an OPTIONAL extension point (spec §1); this repository implements it, and ingest-golden-http exercises it against the mock payloads in its fixture/ directory — the conformance suite never opens a socket and runs without credentials (§11). For the sql case, the test sets the OKF_GOLDEN_SQL_DB environment variable to the fixture database path; for the http case, the injected mock transport serves fixture/{query path}.

The suite (tests/test_golden.py) re-materializes each case into a fresh directory and compares the result against expected-bundle/ file by file, byte for byte — the load-bearing golden-regression seam (§11).