Skip to content

Replicated erasure fixtures exercise isolated write leases - #1077

Merged
zlareb1 merged 2 commits into
mainfrom
fix/replicated-erasure-lease-fixture
Nov 20, 2026
Merged

zlareb1 merged 2 commits into
mainfrom
fix/replicated-erasure-lease-fixture

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

Replicated erasure fixtures need a database-local write lease before fenced memory inserts. Regression tests should catch a missing lease table and a reused KeeperMap root before integration tests run.

Scope and risk

Three unit cases exercise the actual fixture and lease acquisition, refusal when the lease table is missing, and separation from the source schema and other fixture roots. The tests check the fixture already on main, including its KeeperMap path and replicated content tables.

Compatibility, rollout and rollback

No wire, settings, production schema or fixture DDL changes. No operator steps or stored data changes.

Tests

The original regression produced two failures and one passing refusal control before the fixture repair. All three pass against the merged fixture. Scoped Ruff lint and formatting pass. Full exact-head hosted CI remains required.

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

AI assistance in the code

  • AI-generated: Codex wrote the regression. Fresh independent whole review and full exact-head CI are required before merge.
  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full hosted CI passes on the final head.
  • No assertions, lease refusal rules or production deadlines are relaxed.
  • No generated files, migrations or operator steps are required.
  • Commits are signed off.

@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 20, 2026 10:59pm UTC

Request Review

Fenced memory inserts require a lease table in the selected schema. Give each fixture database its own Keeper root while preserving the replicated content checks.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1 zlareb1 changed the title Replicated erasure fixtures provide isolated write leases Replicated erasure fixtures exercise isolated write leases Nov 20, 2026
@zlareb1
zlareb1 force-pushed the fix/replicated-erasure-lease-fixture branch from 20b9880 to f6cab47 Compare November 20, 2026 22:58
zlareb1 added a commit to rahulsjha/loom that referenced this pull request Nov 20, 2026
The fixture repair is on main. Its standalone regression remains in ClickHouse#1077; the feature diff retains its original tests.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
zlareb1 added a commit that referenced this pull request Nov 20, 2026
The fixture repair is on main. Its standalone regression remains in #1077; the feature diff retains its original tests.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
zlareb1 added a commit that referenced this pull request Nov 20, 2026
The fixture repair is on main. Its standalone regression remains in #1077; the feature diff retains its original tests.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
zlareb1 added a commit that referenced this pull request Nov 20, 2026
The fixture repair is on main. Its standalone regression remains in #1077; the feature diff retains its original tests.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
zlareb1 added a commit to rahulsjha/loom that referenced this pull request Nov 20, 2026
The fixture repair is on main. Its standalone regression remains in ClickHouse#1077; the feature diff retains its original tests.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 merged commit 3621bfe into main Nov 20, 2026
48 checks passed
zlareb1 added a commit that referenced this pull request Nov 21, 2026
Related: #455, #1076, #1077

### Changelog category

- Improvement

### Changelog entry

The Postgres authority stores memory heads and revision payloads without fields at their default values, reducing repeated JSON fields while preserving the rows returned to callers.

### Why

Most memory fields hold their defaults. Repeating their names and values in every stored JSON row costs space. Sparse-row readers shipped in v1.2.0 and v1.3.0, so the writer can omit those fields in a later release.

### Scope and risk

`commit_versions` builds the stored form before taking transaction locks and uses it for head and revision JSON. Full encoded rows still supply identity, admission, audit metadata, delivery targets and returned rows. Only fields in `FIRST_VERSION_DEFAULTS` may be omitted. Identity, content, provenance, version, hashes, required timestamps, memory type and confidence stay stored.

The Cell verifier decodes both stored rows before comparing them. Its value, vector, audit, delivery and failure checks remain. Existing usage and redaction updates may store explicit defaults; readers accept either form. The shared replicated-erasure fixture repairs are already on `main`.

### Compatibility, rollout and rollback

- Wire and operator steps: none.
- Deploy beside builds that read sparse rows; released v1.2.0 and v1.3.0 contain those readers.
- A sparse-capable released build reads existing rows after rollback. Reverting the writer requires no rewrite.
- No table, migration, setting, worker or generated-file change is needed.

### Tests

- All five hosted workflows pass on the published head: CI, Docker smoke, CodeQL, plugin scanner and docs. The rollup has 54 successful checks and two expected publication skips. This includes Postgres 16/18 authority, all integration shards, isolation, mixed-version, unit coverage and Cell acceptance.
- The authority integration checks actual sparse head/revision storage, full/sparse point-read equality, list/search/bulk reads, revisions, cross-session defaults, usage and erasure export.
- The verifier regression runs both representations through all original fault cases and assertions. Earlier focused validation produced two sparse failures before the repair and 32 passing cases after it; six related authority cases also passed.
- Scoped Ruff lint/format and the public prose check pass. Local composition test attempts were refused before execution by the resource guard and remain unrun; final-head behavior is qualified by hosted CI.

### AI assistance in the code

- AI-generated: Codex wrote the sparse writer and verifier regression. Independent source reviews checked the full change, published description, released-reader compatibility and current-main composition.
- [x] I can explain every line of this diff and how it interacts with the rest of Loom.

### Checklist

- [x] Required hosted format, lint, type, unit, coverage and integration gates pass on the published head.
- [x] No generated files or migrations change.
- [x] No plugin or frontend behavior changes.
- [x] Architecture documentation describes sparse storage and in-place updates.
- [x] Public text contains no deployment details.
- [x] Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
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