Skip to content

Commit 31df27d

Browse files
schicklingclaude
andcommitted
docs(vrs): the claim sequence is floor-aware, and the sidecar and its residual are on the record
The spec now states the shipped algorithm — a claim mints one above max(on-disk sequence, .harness-state.seq floor) — and documents the sidecar file and the accepted both-files-damaged residual instead of asserting a plain on-disk-plus-one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1242ab1 commit 31df27d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

docs/vrs/05-harness-state/spec.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ Field rules, matching `src/harness_state.rs`:
7676
- `incarnation` is the writing session's token and `seq` its monotonic
7777
ownership sequence. A claim is a WRITTEN act under the record lock: the
7878
session starting up writes an exitless `ended (superseded)` takeover
79-
record carrying its token and the on-disk sequence plus one — racing
79+
record carrying its token and a sequence one above the highest this seat
80+
has seen — the maximum of the on-disk record's sequence and the
81+
`.harness-state.seq` floor sidecar, a sibling file (written
82+
stage-and-rename under the same lock on every claim) that keeps claims
83+
monotonic even when the record itself is unreadable. Racing
8084
claimers therefore mint distinct sequences, and a predecessor's
8185
still-fresh live record is superseded at relaunch, where the
8286
pty-name-based probe cannot tell sessions apart; the seat reads
@@ -90,6 +94,11 @@ Field rules, matching `src/harness_state.rs`:
9094
Sibling writer processes of one session share the claimer's exported
9195
token and sequence; records predating either field decode with an empty
9296
token and sequence zero, which no session owns and any claim supersedes.
97+
The residual: with the record unreadable AND the floor sidecar missing or
98+
damaged, a claim restarts at sequence one and a lingering predecessor
99+
holding a higher sequence could fence it — accepted, because it takes
100+
both files independently damaged, and refusing the claim instead would
101+
wedge the seat permanently.
93102
Every landed write carries a strictly monotonic per-record stamp (never
94103
inherited from beyond the future-skew trust bound) so it stays
95104
byte-distinct even against a same-millisecond predecessor.

0 commit comments

Comments
 (0)