Skip to content

Restore fixtures isolate their key-lock clocks - #1051

Merged
zlareb1 merged 3 commits into
mainfrom
fix/restore-key-lock-clock
Nov 21, 2026
Merged

zlareb1 merged 3 commits into
mainfrom
fix/restore-key-lock-clock

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Related: #1076

Changelog category

  • CI Fix or Improvement

Changelog entry

Not required.

Why

A restoration test can spend the fake key lock’s wait budget while acquiring an uncontended local lock, before reaching its restore assertions. These cases check restoration and duplicate visibility independently of CPU scheduling latency.

Scope and risk

Replicated-erasure lease provisioning and its unit regression controls are on main. This branch preserves them unchanged. It also scopes person-query observations to the authorization decision, retaining unbounded-read negative controls. No production authorization, lease or erasure rule changes.

The clock change stays in one unit-test file. The existing fake lock uses a private function loop whose clock advances during selector waits. The loop, key-lock budget, lease timers and fake table share that clock. Each case cancels and drains newly pending tasks and fails if it leaked one. A control verifies that a contended key lock still refuses at its idle deadline and releases its registry entry.

Every existing test body, assertion and deadline value is retained. Product behavior and shared test helpers are unchanged.

Compatibility, rollout and rollback

  • Wire, schema, configuration and operator steps: none.
  • Rollback: revert the fixture change. No persisted data changes.

Tests

This head preserves every preceding concern blob and matches its exact three-way composition with current main. On this head, the restoration clock cases, person-query observation controls and erasure fixture controls pass. Scoped Ruff, Python formatting, committed-range whitespace and public-body prose checks pass. Full required hosted CI and a fresh independent whole review remain required for this exact head.

env LOOM_ENV_FILE= .venv/bin/python -m pytest tests/unit/test_restore_unsupersede.py tests/unit/test_scim_person_query_observation.py tests/unit/test_erasure_replicated_fixture.py -q

AI assistance in the code

  • AI-generated: Codex wrote the fixture change and checked its clock boundaries, cancellation controls and task cleanup.

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

Checklist

  • Existing assertions and deadline values are retained.
  • No production code, generated interfaces, migrations or operator settings change.
  • Commits are signed off.
  • Full exact-head GitHub CI passes.

@vercel

vercel Bot commented Nov 20, 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 3:23am UTC

Request Review

@zlareb1
zlareb1 force-pushed the fix/restore-key-lock-clock branch 5 times, most recently from 8b33a03 to 8c4758c Compare November 21, 2026 02:14
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Shared client schema reads run with an independent context. Record only decision-tagged statements while retaining unbounded decision reads as failures.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit 57327d5)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the fix/restore-key-lock-clock branch from 8c4758c to b0d8d0d Compare November 21, 2026 03:20
@zlareb1
zlareb1 merged commit 8c2d98d into main Nov 21, 2026
49 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