The one-time seed-fidelity verifier (Plan 142 P1.7, §9 — CI-runnable).
Purpose
-------
Verify the committed ``oc_chat/roadmap/source/**`` seed against the live v3.38
oracle (Registry Source & Storage Spec V0.22 §9): the source is canonical
(``format --check``); ``regenerate`` is deterministic + idempotent (the
byte-stable source->store property — §9.2); the migration is **lossless** (every
v3.38 item_id appears in the regenerated store, modulo the classified dedup —
zero unclassified drops, §9.4); and it quantifies the §5.6 sub-phase promotions
(§9 3c). The render-based 4-tuple (§9.3) + the §9 (1) renderer-diff + (3b)
ordering are operator-staged precursors (flagged, not self-attested).
Run from the worktree root, preferably as ``python -m tools.verify_142_seed_fidelity``
[roadmap_dir] [source_dir]; the direct ``python tools/verify_142_seed_fidelity.py``
also works via the ``sys.path`` bootstrap below.
Responsibilities
----------------
- ``verify(roadmap_dir, source_dir)`` -> a structured result (CI exit 0/1).
Diagnostics
-----------
Domain: OC_CHAT.MAIN
Levels:
L2 - verification lifecycle
L3 - per-check results
L4 - per-record comparison
Contracts
---------
- Read-only over the committed seed; the oracle + regenerated stores are
worktree-local temporaries; never touches the shared registry.
Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- tools.seed_142_ingest (ingest_oracle and emit_source - builds the v3.38 oracle store and re-emits it for the promotion and dropped-dependency counts)
- oc_chat.registry.regenerate (imported for the contracts bootstrap it runs)
- oc_chat.registry.regenerate.pipeline (regenerate - rebuilds the store twice for the idempotence check)
- oc_chat.registry.source.canonical (format_source_tree - the canonical-source check in report mode)
- oc_chat.registry.source.scanner (scan_source_tree - lists the committed source records)