Skip to content

Restoration and consolidation enforce the current blacklist - #923

Merged
zlareb1 merged 11 commits into
mainfrom
fix/atlas-blacklist-restoration
Nov 18, 2026
Merged

zlareb1 merged 11 commits into
mainfrom
fix/atlas-blacklist-restoration

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in a release)

Changelog entry

Restoring deleted or retired memories, restoring namespace snapshots, rolling back heads and writing consolidated summaries enforce the target namespace's current blacklist. A refused value cannot return through a restoration retry that repairs its search document.

Why

Historical copies and generated summaries wrote memory rows without the blacklist check used by ordinary writes. This allowed a value refused by the current policy to become live again.

Scope and risk

The guard checks the bytes being copied, including encoded strings and anchored regular expressions. An Undo checks before its acceptance record. Namespace restore checks its complete payload before creating a namespace or grants, then rechecks all values after its own grant writes move the admission generation. Rollback checks every planned live reinstatement in bounded slices before writing its first batch, using one captured policy across the pass. Each write batch still reads current heads; tombstone-only writes remain allowed.

Under Postgres, commits carry the policy generations captured before checking their values. A policy change refuses the commit. Consolidation records a blocked summary as an unsuccessful cluster without embedding it or retiring its sources.

Existing lifecycle unit tests explicitly isolate the refusal component while retaining their field and ordering assertions. Separate regressions exercise the actual guard and policy admission. Snapshot insertion always checks all values and accepts no prechecked policy override.

Compatibility, rollout and rollback

  • Wire: no operation, field or default changes. Matching restoration requests return 422 BLACKLISTED; a policy changed during Postgres admission returns a retryable refusal.
  • Operator steps: none. No migration, backfill or reindex is required.
  • Rollback: reverting removes these guards; no data format changes or cleanup is required.

Tests

  • All 360 Postgres authority unit tests and 53 guard and namespace-restoration tests pass. These include 30 guard cases; the existing erasure, publication, lost-answer, cancellation and ordering assertions remain intact.
  • Regression cases fail before their fixes: missing refusal on both authorities, encoded-value regular expressions, and search-document repair retries. Tests also cover a blocked later rollback batch, refusal before namespace grants or Undo acceptance, allowed neighbours, and policy changes before Postgres publication.
  • Three integration cases use the supported generic SDK call for explicit sensitivity and compare every persisted memory and embedding field across a refused restore for semantic, episodic and high-sensitivity values. They also assert the stored sensitivity. Integration execution is pending in CI.
  • All 27 journal-durability unit tests pass; the caller census classifies blacklist policy reads as guards rechecked by each resulting commit.
  • Changed Python files pass Ruff lint and formatting. The function-length ratchet, both changed Markdown files' formatting and prose checks pass.
  • Focused type checking passes for all nine changed server modules. Both changed documentation pages pass their link checks. Full repository type checking and the remaining gates are pending in CI; no local server was started.

AI assistance in the code

  • AI-generated: Codex wrote the diff and checked the guard ordering, stored value bytes, policy admission and focused regression results.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full CI, type checking and integration tests pass.
  • No generated operation tables, settings, schema, plugin or frontend changes are required.
  • Documentation describes the enforced policy and operator steps.
  • Commits are signed off.

@zlareb1
zlareb1 merged commit 06775eb into main Nov 18, 2026
51 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 18, 2026
6 tasks done
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