Audit trail¶
Auto-Lorebook has no git dependency. The YAML files themselves are the audit trail.
Fields that preserve provenance¶
- Every fact carries
approved_at,created_by_ingest,edited_by_human,edited_at,corrections_applied, andstatus_history(with actor). - Every entity carries
created_at,created_by_ingest,updated_at, andsuperseded_byfor merges. - Every source carries
fetched_atandsession_date. - Every alias record carries
added_by_ingest,added_at, andsource(hand-edited, alias-confirmation, stub-creation, promoted-from-merge). - Every LLM-generated artifact carries an
inputsblock with SHA-256 hashes of inputs and model identity.
See entity model for the full field inventory and staleness for the hash model.
Queries the audit trail supports¶
Because every artifact tags its origin, the audit trail naturally answers questions like:
- "Which facts came from ingest X?" → filter by
created_by_ingest. - "Which facts were extracted against a
.transcription-corrections.yamlpredating correction X?" → comparecorrections_sha256on each fact'sinputsblock. - "What did this ingest add?" → facts and entities tagged with its ID.
- "When did this alias enter the wiki?" →
added_aton the alias record. - "Who approved this status change?" →
byfield instatus_history.
Rejecting an ingest¶
auto-lorebook reject-ingest <ingest_id>
Removes everything attributable to that ingest:
- Removes all facts with matching
created_by_ingestfrom every entity YAML. - Removes all alias records with matching
added_by_ingestfrom every entity YAML. An entity whose canonicalnameis unaffected but whose aliases shrink is still considered modified;updated_atis bumped. - Removes any entity whose own
created_by_ingestmatches and whosefactslist is now empty. Entities that were created by this ingest but have since received facts from other ingests stay (with the rejected facts and aliases removed). - Regenerates affected summaries.
This gives a clean "what did this ingest add" answer: an ingest's net contribution is exactly the facts tagged with its ID plus the entities tagged with its ID.
What the audit trail does not do¶
- Version history of edits. Edits to fact
textupdateedited_atandedited_by_humanbut do not preserve the prior text. If edit history matters, usegiton the wiki repo as an external layer. - Output equivalence. Hashes detect input changes, not LLM output equivalence. Identical inputs can produce different outputs on re-run. See staleness: what this does not catch.