Skip to content

Namespace retention preserves audit records - #1092

Open
zlareb1 wants to merge 2 commits into
mainfrom
fix/audit-retention-independent
Open

zlareb1 wants to merge 2 commits into
mainfrom
fix/audit-retention-independent

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 21, 2026

Copy link
Copy Markdown
Member

Related: #1056

Changelog category (leave one):

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

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Namespace retention no longer expires audit records. Audit deletion follows only the dedicated audit retention setting, which defaults to keeping records indefinitely.

Why

A namespace's memory lifetime also controlled its audit evidence. A short memory-retention window could therefore remove the record of a deletion or a retirement reversal. Audit evidence needs its own retention decision.

Scope and risk

The retention builder ignores namespace deletion windows for audit_log while preserving namespace warm-tier moves and explicit deployment audit retention. Reconciliation removes an inherited audit TTL or replaces it with the dedicated audit window. Documentation and generated settings descriptions state that boundary.

Compatibility, rollout and rollback

  • Wire: no operations, fields or defaults change.
  • Operator steps: none. The retention leader reconciles the existing table. Already expired rows cannot be recovered by this change.
  • Rolling upgrades: both builds use the same schema. The corrected retention leader must run before relying on this policy.
  • Rollback: an older retention leader can apply namespace audit deletion again.

Tests

  • Focused Linux checks: 338 passed, including real ClickHouse-local TTL application and removal, documentation links, public copy and the storage layout.
  • Regression cases cover no audit expiry, explicit audit expiry, inherited TTL removal and preserved namespace warm tiering.
  • Full Linux unit suite: 46,187 passed; offline benchmark unit tests: 251 passed.
  • Formatting, lint, generated settings checks and strict type checks pass.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Codex; independent review checked retention composition, inherited TTL removal, tiering, callers, tests and generated settings.

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

Checklist

  • Full required checks pass.
  • Generated settings outputs are regenerated from their source.
  • Documentation describes the resulting retention policy.
  • Repository text contains no operational incident details.
  • Commits are signed off.

Audit evidence follows its dedicated deployment retention window. Keep namespace warm tiering while removing inherited namespace deletion TTLs.

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 21, 2026 12:41am UTC

Request Review

Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>

This branch has not been deployed

No deployments
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