audit_memory
- Category: intel
- Access: write
- Audience: advanced (ordinary users do not normally call this directly)
Purpose
Runs the persistent self-repair audit over facts, packs, provenance, and sync drift. Call it to detect and reconcile drift, then read list_memory_issues for what remains open.
Arguments
Optional: repair, stale_sync_minutes.
-
repair. Note: Defaults true. When false the scan still records newly found issues but applies no reconciliations. -
stale_sync_minutes. Note: Sync-drift threshold; defaults 120.
Result
Object with audit_version (memory_audit_v2), repair flag, emit_event, open_issue_count, resolved_issue_count, issues array, and a repairs breakdown of five counters.
Boundaries
Operates inside the selected profile boundary. No conductor gate; findings cover facts, packs, provenance, and task materialization visible to the caller.
Lifecycle / side effects
Backfills missing provenance, refreshes contradiction counts, materializes pack summaries, reconciles task materialization, records open issues, marks resolved ones resolved, and emits a run-history event whenever anything was found, resolved, or repaired. All-or-nothing per run.
Errors
Wrong-typed arguments rejected by validation. Backend failures surface as transport errors; scan findings are data, never errors.
Example
{
"repair": true
}
Result shape:
{
"audit_version": "memory_audit_v2",
"open_issue_count": 2,
"repair": true,
"resolved_issue_count": 1
}
See also
list_memory_issues, replay_memory, govern_fact, explain_impact.