TH04 strict matching
Read AGENTS.md, docs/BUILD_MATCHING.md, docs/ORACLES.md, and the selected
unit/evidence rows.
Gate the work
Require a verified target, reviewed complete extent, explicit ownership, natural source, and attested tool binaries. Do not begin exact promotion from an unattested dump or cached object. An upstream matching/finalized claim supplies no required evidence. Rebuild the candidate locally and rerun the entire required Oracle vector.
Canonical loop
- State the memory model, flags, segment/group declarations, TU order, and link inputs as a falsifiable toolchain hypothesis.
- Cold-build the smallest truthful unit or artifact serially.
- Compare object/map structure, complete extent, relocations, instruction/CFG shape, stack/register/segment behavior, x87, and raw bytes.
- Classify the mismatch before editing: boundary, origin, source semantics, ABI, compiler profile, TU ownership, segment layout, link order, relocation, padding, library/runtime, or overlay.
- Record a reproducible evidence receipt with all tool/input/output digests.
- Promote
exactonly for zero raw differences and all required Oracles. - After shared changes, cold-replay every affected accepted unit.
python3 scripts/compare_artifacts.py exits zero only for raw identity.
Relocation-normalized equality is never eligible for exact promotion.