Skip to content

Add read-only historical memory provenance audit - #113

Merged
NovasPlace merged 6 commits into
masterfrom
audit/historical-provenance
Sep 18, 2026
Merged

NovasPlace merged 6 commits into
masterfrom
audit/historical-provenance

Conversation

@NovasPlace

Copy link
Copy Markdown
Owner

Summary

Adds a read-only provenance audit before any historical backfill work.

The report measures:

  • total and active memory counts
  • complete effective provenance across all history
  • complete effective provenance for active memories
  • rows with any provenance gap
  • missing counts for each required provenance field
  • source_session_id using the same top-level session_id fallback used by bridge provenance
  • explicit unknown model IDs
  • existing default model-ID placeholders, including active counts

The existing scripts/csm-audit.ts now prints the report.

Safety

  • no schema changes
  • no historical row updates
  • no backfill
  • no retrieval/governance behavior changes
  • PostgreSQL and SQLite query generation are both covered by tests

This gives us the blast-radius data needed before deciding how to repair legacy provenance or the current source_model_id = "default" fallback.

@NovasPlace
NovasPlace merged commit 00b3110 into master Sep 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant