Sequence Drift

cursor windows under uncertain sequence

Cursor Behavior

stable window: starting_after and ending_before remain symmetric.

curl -G https://api.meme.repair/v1/conversations \
  -H "Authorization: Bearer {token}" \
  -d starting_after="s4WycXedwhQrEFuM" \
  -d limit=10

Sequence Drift

[entry_0301]
source: external
status: partial

same cursor
different neighborhood
ordering changed while reading
[corruption_log]

- page boundary moved without write event
- ending_before returned future segment
- drift ratio: 0.13 → 0.21

Conflict Response

inverted cursor window (after newer than before) returns 409 Conflict.

{
  "error": {
    "code": "sequence_conflict",
    "message": "Cursor window is misordered: `after` occurs later than `before`.",
    "request_id": "req_5c31d0a8",
    "integrity": 0.61
  }
}

Recovery

[recovery_note]
freeze to smallest reliable window
cross-check against /messages
advance only after sequence stabilizes