TestC2_NoGapDenseLSNEdge asserted that a Realtime NotifyAppend at the
dense edge (cursor=10, head=11, lsn=11) emits EmitKindLive, while the
shipper's 2 ms timer drain was running. When a tick landed between
primary.Write and NotifyAppend, the timer shipped lsn 11 from substrate
first (EmitKindBacklog, debt-first per §6.3) and NotifyAppend took the
idempotent skip, so the test saw kind=1. That is correct product
behavior: the entry ships exactly once at the right LSN, and the kind
tag is observability only (WALKindBacklog vs WALKindSessionLive
counters; the LiveTail probe is marker-only).
- TestC2_NoGapDenseLSNEdge now disables the timer drain and drains the
initial backlog with DrainBacklog, so the Live assertion no longer
depends on scheduling.
- New TestC2_DenseLSNEdge_TimerWinsRace_ShipsOnce pins the other order
deterministically: the timer ships the new entry before NotifyAppend
arrives; NotifyAppend returns nil and does not emit again.
No product change, no timeout changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in cmd/sw-block/chunk.go resolved as the union: the usage
string lists cut|snapshot|snapshots|snapshot-delete|fork|detach|show|
gc|usage|retain, and the switch keeps #140's "gc" case with "usage"
and "retain".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up: the release was a t.Cleanup registered before Start, and
cleanups run LIFO, so the executor shutdown Start registers ran first; a
t.Fatal while the base frame was held would deadlock StopAndWait. A defer
inside the scenario runs before every t.Cleanup, including on t.Fatal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dropForkClaim's write is conditioned on {state, claims} as read; a lost
condition re-reads a fresh copy, so delete metadata is never
overwritten. (With the shared mark path a delete also clears the dead
claim first, which changes the condition on its own.)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 02d0631 (P2): dropForkClaim conditioned its write on the
claims only, so a completed fork's cleanup that read the parent, paused
while an explicit delete marked it, then wrote back its stale copy,
resurrecting an unnamed active snapshot. TestCatalog_ClaimCleanupNever
UndoesADelete fails against the old cleanup condition and the old
(claim-blind) delete mark, restored as stubs: state "active",
deleted_ns gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
markDeleting is the only way an attempt is marked deleting: conditioned
on {state active, gen, no claims}, dead claims cleared first, a lost
condition decided again. Retain keeps a claimed snapshot (fork_held);
DeleteSnapshot refuses it with snapshot_claimed naming the fork
(claude05's ruling, 23:58Z).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude05's ruling (2026-11-15 23:58Z): an explicit DeleteSnapshot of
a snapshot an incomplete fork claims is refused with snapshot_claimed
(409, not retryable, naming the fork volume); a completed or aborted
fork no longer blocks. Controls, failing against the old mark (blind to
claims) restored as a stub: TestCatalog_DeleteRefusesAClaimedParent, the
409 mapping, the real-filer refusal in TestIntegration_RetainHeldSchedules,
and TestFork_IncompleteRetryBoundToOriginalImage, which now expects the
refusal and drops the claim (as a pre-claim fork) to keep testing the
image binding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up. The pre-barrier hold proved in-session delivery and
convergence but no longer the test's point: a newer WAL write for an LBA must
win over an OLDER base frame for that LBA that arrives later.
Drop the production SetPreBarrierHook seam (core/recovery is back to main)
and hold the base lane instead, through the existing WithPrimaryStorageWrap:
staleBaseHold captures the base read of LBA 5 (old value A) and holds it; the
test pushes the same-LBA overwrites (the session cannot seal its recovery cut
while base is held, so they ship in-session: this is also what fixes the
flake), waits until the replica holds B at LBA 5, then releases the stale A
frame. Convergence requires LBA 5 == B: RebuildSession.ApplyBaseBlock must
skip a base frame for an LBA the WAL lane already applied (bitmap).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the separate hold objects with one conditional write on the
parent attempt's own entry (codex01's design):
- Fork adds its claim (target/request) to the entry before using it,
conditioned on {state active, claims as read}; a deleting parent is
refused. It removes its claim once its HEAD exists (or a sweep's
tombstone settles the target).
- Retain marks deleting only conditioned on {state active, gen, no
claims}; a lost condition re-reads and decides again. Claims that
can never matter (target has a HEAD, or its VOLUME is another
request's) are cleared conditionally first; any other claim keeps the
snapshot, with no lifetime. No listing, so no paging.
- A dry run lists attempts a stopped pass left deleting, as apply
frees them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>