Skip to content

fix(json): resync snapshots after legacy missing groups - #6819

Closed
kixelated wants to merge 1 commit into
mainfrom
codex/json-legacy-gap
Closed

kixelated wants to merge 1 commit into
mainfrom
codex/json-legacy-gap

Conversation

@kixelated

@kixelated kixelated commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A snapshot reader could receive a valid catalog and then stop permanently on a dropped group over Lite 05/06. Those drafts report SUBSCRIBE_DROP as NotFound, but the JSON snapshot consumer only recognized newer typed retention errors as gaps. Watch.Broadcast consequently discarded its catalog and went offline.

Approach

Recognize NotFound in the existing failed-group-read recovery path. Each replacement group starts with a full snapshot. Track-level nextGroup failures remain outside that catch, and malformed JSON still fails while decoding.

Focused coverage lives in a new test file and exercises both next() and latest(): legacy group loss, terminal track refusals before/after a valid value, and malformed JSON.

Impact

  • No public API shape or wire encoding changes.
  • Snapshot readers resynchronize after legacy missing groups. Terminal track refusals and malformed data remain fatal.

Alternatives

Remapping the error in the wire layer would change its meaning for non-snapshot readers. Handling it in Watch would duplicate the snapshot consumer's recovery responsibility.

Follow-ups

Consider a release backport for consumers of older Lite drafts after this lands. Release compatibility needs its own check.

Validation

  • Before the fix: two recovery failures, six passing fatal-error controls.
  • After the fix: all eight focused tests pass.
  • just fix passed.
  • Required just ci on clean head e6e71c79243bb4d92abae3301d7eb50736763771: all selected JS checks/tests passed: 1,394 tests, including 207 JSON and 398 Watch tests; the global gate failed at the standalone Cargo fixture before Clippy. The separate isolation fix is moq-dev/moq#6818, whose own full just ci passes with TMPDIR inside its checkout. The original failed run is retained; no unchanged retry to green.

Decisions needed

Select the independent harness fix moq-dev/moq#6818, then finish this PR's final clean-head CI and review. No JSON API or scope decision remains; the draft records the outstanding global gate prerequisite.

(Written by GPT-6)

Treat NotFound from a failed group read as a gap, as older Lite SUBSCRIBE_DROP reports it. Keep terminal track refusals and malformed JSON fatal.

Co-Authored-By: GPT-6 <noreply@openai.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by moq-dev/moq#6820. It fixes the lite-05/06 catalog stall at the source: a SUBSCRIBE_DROP now ends readers with OLD (Rust and JS), so snapshot readers resync through their existing gap path. NotFound stays fatal for snapshot readers, so a genuinely missing track still surfaces.

(Written by Claude Opus 5.5)

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