Skip to content

Capture backfill SQL trap, GC rollback caveat, backup contract - #508

Merged
sysread merged 1 commit into
mainfrom
claude/conversation-forking-8ntvpq
Aug 20, 2026
Merged

Capture backfill SQL trap, GC rollback caveat, backup contract#508
sysread merged 1 commit into
mainfrom
claude/conversation-forking-8ntvpq

Conversation

@sysread

@sysread sysread commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Doc-only amendment from the third data-safety review pass: M1 gains a SQL sketch of the collision-safe backfill (the prose spec has a silent trap - computing the per-thread max in the same subquery that filters to NULL rows aggregates over only the NULLs, coalesces to 0, and re-numbers from 1, reintroducing the deploy-blocking collision; the two-CTE shape is now written out); the M3 rollback note gains its honest caveat (GC-collected threads are permanently gone on revert - the outcome the user requested, deferred one sweep); and the data-safety section records the one-way contract with the backup/restore tool in development outside the repo (pre-M1 restores depend on the backfill's NULL-only idempotence and per-thread-max offset; re-verify when the tool lands).


Generated by Claude Code

Third data-safety review pass. Three captures:

M1 gains a SQL sketch of the collision-safe backfill, because the
prose spec has a silent implementation trap: computing the
per-thread max in the same subquery that filters to NULL-position
rows aggregates over only the NULLs, so the max coalesces to 0 and
the backfill re-numbers from 1 - exactly the deploy-blocking
collision the offset exists to prevent. The two-CTE shape (max
over all rows, joined to the NULL rows) is now written out.

The M3 rollback note gains its honest caveat: threads the GC
already collected are permanently gone on revert - which is the
outcome the user asked for when they deleted them, deferred one
sweep, not a loss.

The data-safety section records the contract with the
backup/restore tool currently in development outside the repo:
pre-M1 restores depend on the backfill's NULL-only idempotence and
per-thread-max offset (restored and replica-role-inserted rows
land with NULL positions and get swept), so weakening either guard
silently breaks restores. Re-verify when the tool lands.
@sysread
sysread merged commit 90c248f into main Aug 20, 2026
1 check passed
@sysread
sysread deleted the claude/conversation-forking-8ntvpq branch August 20, 2026 16:16
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.

2 participants