Skip to content

The concurrent resolver test seeds distinct values for Undo - #2035

Open
zlareb1 wants to merge 1 commit into
mainfrom
fix/resolver-undo-fixture
Open

zlareb1 wants to merge 1 commit into
mainfrom
fix/resolver-undo-fixture

Conversation

@zlareb1

@zlareb1 zlareb1 commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Related: #1977

Changelog category

CI Fix or Improvement

Changelog entry

None.

Why

The concurrent conflict resolver test seeds four pairs with the same two values. When the writer deletes one value, Loom refuses to restore the same value under a different key in that namespace. The final Undo assertion then fails according to which delete and retirement finish first.

Scope and risk

Seed distinct values for each pair in the concurrent test. The fixture still places the same vectors and starts the same writes, pins, deletes, and Undo calls. The test continues to check user writes, successful Undo, audit records, prompt isolation, erasure and convergence.

Compatibility, rollout and rollback

The change is limited to test data. Reverting restores the former fixture values.

Tests

  • Reproduced the failed Undo for seed 2 on clean main with the same ClickHouse release as the failed job.
  • Ran pytest -q tests/integration/test_conflict_resolver_invariants_ch.py and the relabelled-peer cases in test_conflict_resolver_ch.py.
  • Repeated the seed 2 case three times after the change.
  • Ran make format, make lint and make typecheck.

AI assistance in the code

  • AI-generated with Codex. Reviewed the fixture changes against the observed failure and ran the checks above.

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

Checklist

  • Local format, lint, type checks and focused tests pass.
  • The diff is confined to two test fixtures.
  • Commits are signed off.

Note

Low Risk
Changes are confined to integration test fixtures and default _pair behavior is unchanged for other callers.

Overview
Fixes flaky Undo assertions in the concurrent conflict-resolver integration test by giving each seeded pair unique memory values instead of reusing the same Paris/Rome strings across all four pairs.

The shared _pair helper in test_conflict_resolver_ch.py gains an optional values tuple (defaults unchanged for existing tests). The invariants test passes per-key strings like Earlier {old} fact / Current {new} fact, avoiding Loom’s rule that refuses the same value under another key after a delete—behavior that made Undo outcomes depend on race order (e.g. seed 2).

Reviewed by Cursor Bugbot for commit 5651f25. Bugbot is set up for automated code reviews on this repo. Configure here.

A delete refuses the same value under another key in the namespace. Give each pair its own values so the test can verify Undo after independent deletes.

Signed-off-by: zlareb1 <zlareb1@gmail.com>
@vercel

vercel Bot commented Dec 2, 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 Dec 2, 2026 3:16pm UTC
loom-telemetry Ready Ready Preview Dec 2, 2026 3:16pm UTC

Request Review

@zlareb1 zlareb1 mentioned this pull request Dec 2, 2026
10 tasks done

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