Proves a ggen_igniter generation unit is a deterministic, pure function
of (ontology, query, template) -- by actually regenerating it into a
scratch path and byte-diffing against the checked-in output -- instead
of a one-time narrated "I deleted it and regenerated it and it matched"
claim.
Real, confirmed motivation (ERRC cluster c3, 2026-09-09 deep-search
workflow): ggen's Rust core (~/ggen) generates its own quality/status
artifacts (CONSTITUTION.md, VERIFICATION.md) as checked-in, admitted,
provable output. ex4pm's own docs/PRD-v26.9.10.md states its
determinism claim for generated files is "proven manually (delete,
regenerate, diff byte-identical)" -- not wired into mix verify or any
sync script. This task closes that gap.
Usage
mix ex4pm.ggen.verify_determinism --ontology priv/ontology/ex4pm.ttl \
--query admitted=priv/ggen/queries/admitted_standing_codes.rq \
--template priv/ggen/templates/standing_coded.ex.eex \
--out lib/ex4pm/standing_coded.ex
mix ex4pm.ggen.verify_determinism --all
mix ex4pm.ggen.verify_determinism --all --manifest priv/ggen/manifest.json--all reads every unit from priv/ggen/manifest.json (or
--manifest PATH) and verifies each, printing a summary table. If the
manifest doesn't exist, --all no-ops with a clear message (exit 0)
rather than failing -- so mix verify can call this unconditionally
without requiring every consumer repo to have a manifest yet.
Exit behavior
Exits 0 with "deterministic: <out>" per matching unit. Exits 1 naming
the exact unit and a real diff summary on any mismatch -- never silently
passes a divergent unit.