Skip to content

Analysis isolation waits for setup publication - #1155

Merged
zlareb1 merged 2 commits into
mainfrom
fix/analysis-erasure-publication-current
Nov 22, 2026
Merged

zlareb1 merged 2 commits into
mainfrom
fix/analysis-erasure-publication-current

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 22, 2026

Copy link
Copy Markdown
Member

Related: #1122
Related: #1074

Changelog category

  • CI Fix or Improvement

Changelog entry

Not required.

Why

The analysis-isolation test starts erasure when a new row becomes readable. With the Postgres authority, that read can precede publication acknowledgement. Erasure then waits for the outstanding publisher and can outlast the test client's deadline.

Wait for the exact setup revision to finish publication before requesting erasure. The full identity, memory ID and version must match committed rows, and the revision must have no delivery row. A retained settled delivery still blocks.

Scope and risk

One integration fixture changes. The existing write, visibility check, request deadline and isolation assertions remain. The ClickHouse-authority path opens no Postgres connection. No production erasure, lease or publisher bounds change.

Compatibility, rollout and rollback

  • Wire, generated files and migrations: unchanged.
  • Operator steps: none.
  • Rollback: revert the fixture correction.

Tests

  • Existing inert controls: five tests passed; the original fixture produced seven failures.
  • Native Postgres 16 and 18: 12 helper/SQL controls passed on each, including exact identity and version matching, retained deliveries, delayed acknowledgement, the unchanged 15-second polling deadline, read errors and connection cleanup. Each private database was removed. These controls qualify the helper and SQL, rather than the full erasure pipeline.
  • Scoped Ruff format, lint, whitespace and PR-prose checks passed. This test-only change touches none of the server, SDK or extractor paths selected by the type gate.
  • The existing isolation case exercises the complete request sequence in CI: python -m pytest tests/integration/test_analysis_isolation.py -k an_erased_user_is_gone_from_the_next_statement -q against the configured authenticated test server.
  • Full integration and unit suites run in CI; no hosted result is claimed here.

AI assistance in the code

  • AI-generated: Codex wrote the fixture correction and checked revision matching and request order.

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

Checklist

  • Local format, lint and focused checks pass; the type-gate paths are unchanged. Full suite results remain pending in CI.
  • No generated files, migrations, plugin, frontend or wire changes.
  • Commits are signed off.

A Postgres first write answers at commit. Its ClickHouse row can be visible before publication is acknowledged, leaving erasure to wait for an active publisher beyond the fixture request deadline. Wait for the exact setup revision delivery to disappear before erasure, preserving the deadline and all assertions.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Wait for the exact setup revision delivery acknowledgement before erasure. Preserve the client deadline, all isolation assertions and production publisher safety bounds.

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

vercel Bot commented Nov 22, 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 22, 2026 11:19am UTC

Request Review

@zlareb1
zlareb1 merged commit a738a44 into main Nov 22, 2026
51 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