Skip to content

The JS resume model passes seed 12345 - #7859

Closed
kixelated wants to merge 1 commit into
mainfrom
quest/m1/js-resume-model-12345
Closed

kixelated wants to merge 1 commit into
mainfrom
quest/m1/js-resume-model-12345

Conversation

@kixelated

@kixelated kixelated commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The documented MOQ_RESUME_SEED=12345 MOQ_RESUME_CASES=400 bun test src/resume.model.test.ts run fails on main (ffcb7cd974): an immediate read after replacing an exhausted [0,1) range with ranges: undefined falsely returns done.

Approach

Duplicate discovered during reproduction: moq-dev/moq#7736, head 5acfbc3b60bf16ca26a4d075ba994740241badf6, already fixes the cause in js/net/src/resume.ts. Its Reader.#mirror applies updated preferences to copies synchronously from sync, before reads; main only applies them from a later signal notification. The outer window can therefore be open while its serving copy still judges the exhausted bounded window.

Applied only that PR's resume.ts patch experimentally, then reversed it. No implementation changes are published. Release this empty claim according to the task's instruction to skip true duplicates. The quest stays available in the tree until the existing fix lands and its regression coverage is settled.

Impact

  • Public API: none.
  • Wire: none.

Validation

  • Unchanged main: the documented seed fails after 5 generated cases, shrinking to route up, bounded join, group 0 write, update to undefined ranges, route down. The failure happens immediately inside the range update's poll, before the final down operation.
  • With only the existing PR's resume.ts patch: all 400 generated cases pass; all 3 model tests pass.
  • Further minimized to one route: read group 0 in [0,1), observe bounded EOF twice, update to undefined ranges, read again in the same turn. Both arrival and sequence order return done on main instead of idle.
  • Both minimized lifecycle cases pass with the existing patch: bounded EOF leaves closed open; the same-turn update returns idle; group 1 is subsequently delivered; declaring end at group 2 settles cleanly; a later update preserves that declared end. 2 tests, 22 assertions, no sleeps or skips. Experimental test and logs remain in this checkout's .tmp/.
  • Rust parity: moq-dev/moq#7705 fixes a separate waiter-registration issue. Current Rust Reader::sync already mirrors preferences before polling copies, and marks each copy parked, separating bounded exhaustion from track completion. The existing JS mirror patch restores that synchronous preference behavior.
  • Full just ci and a new local review were not run: no source changes remain, and this duplicate claim is being released.

Alternatives

A second reset or exhaustion guard would duplicate or partially mask the already implemented synchronous update fix. Use the existing PR.

Review

No implementation head to review; the claim contains only an empty commit. This was a local reproduction and duplicate check.

Follow-ups

Before completing the quest after the existing fix lands, retain the minimized range-reopening lifecycle regression in CI alongside the model. No follow-up quest was created.

(Written by GPT-6.1 Sol)

@kixelated
kixelated deleted the quest/m1/js-resume-model-12345 branch November 4, 2026 13:52
@kixelated kixelated closed this Nov 4, 2026
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