Skip to content

quest(m1): plan frame arrival stamps for TS export lateness - #6147

Merged
kixelated merged 2 commits into
mainfrom
quest-plan/arrival-stamps
Oct 21, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest-plan/arrival-stamps

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

Adds quest/m1/ts-reliability/arrival-stamps.md [M] and lists it in the ts-reliability epic. Quest files only, no code.

The TS recovery arms (moq-dev/moq#6139) found that a stall of the whole path lets held frames out past their deadline. The export guesses a frame's arrival from its own polls, and nothing wakes it during a total stall. The root fix is for moq-net to stamp each frame's local arrival time. #6139 keeps a_path_stall_drops_what_it_made_late ignored until this lands.

Decisions (paper trail, /quest-plan 2026-10-20)

Goal: each received frame carries the local instant it landed in this node's cache; TS export uses it; the ignored arm passes. Non-goals: cross-hop provenance and wire changes. [M], m1, ts-reliability.

  • ✅ Confirmed
  • Different fix

Granularity

  • ✅ Per frame
  • Per group

JS

  • ✅ Rust only (mirror when a JS consumer needs it)
  • Mirror in JS now

When stamped

  • ✅ On completion (last byte in this node's cache; local and backfilled frames alike)
  • On first byte

API shape

  • frame::Frame public field
  • ✅ Accessor only: private field + Frame::arrived() + constructor (MIGRATE entry for the struct-literal break)
  • Separate reader method

Checks

  • quest check: ok (427 documents).

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Found by the TS recovery arms: a whole-path stall lets held frames out
late because the export guesses arrival from its own polls. The
maintainer settled the shape: per frame, stamped on completion, a private
field behind Frame::arrived(), Rust only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T03:56:59.412311Z 372506e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6112c3f7-56f0-4498-aa50-9eb49fd8938e
📥 Commits

Reviewing files that changed from the base of the PR and between ff4543a and 01315de.

📒 Files selected for processing: 2
  • quest/m1/ts-reliability/README.md
  • quest/m1/ts-reliability/arrival-stamps.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 372506e06f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +40 to +41
- **Rust only**: the only consumer is the Rust TS export. `@moq/net` mirrors
it when a JS consumer needs it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Mirror the arrival stamp in @moq/net

The Rust-only scope leaves the same defect in the browser stack: js/hang/src/container/consumer.ts computes arrival = now() only after readFrame() resolves (lines 220-223), then uses that value for jitter classification (lines 247-252). If the JS event loop stalls while frames accumulate in @moq/net, those frames are likewise treated as newly arrived when eventually read. Add the cache-completion stamp to js/net and consume it here rather than deferring the mirror; the repository also requires rs/moq-net API changes to be synchronized with js/net.

AGENTS.md reference: AGENTS.md:L105-L110

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declining: "Rust only" was settled by the maintainer in the /quest-plan interview (recorded in the PR body), and the JS consumer cited here does not have the defect this quest fixes.

  • #runGroup in js/hang/src/container/consumer.ts spawns one task per group that awaits readFrame() back to back, so now() runs within a microtask of the frame completing in @moq/net's cache. The Rust TS export's problem is different: it polls on its own cadence and guesses arrival from the last time it found the source empty, which nothing refreshes during a total stall.
  • A stalled JS event loop also stalls the stream reads that fill the cache, so a cache-completion stamp would be taken late by the same stall and would bunch the same way. Mirroring it buys nothing for jitter classification.

The quest keeps the mirror deferred until a JS consumer actually needs it, and AGENTS.md's sync table applies to the implementation PR if it changes the shared API.

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary:

  • Quest-only: adds quest/m1/ts-reliability/arrival-stamps.md [M] and lists it in the ts-reliability epic. quest check passes; no conflicts with main.
  • Decisions stand as settled in the /quest-plan interview: per-frame stamp, stamped on completion, accessor-only Frame::arrived() with a MIGRATE entry, Rust only.
  • Codex's one finding (mirror in @moq/net now) was declined in the thread: the maintainer chose Rust only, and the JS consumer already reads each frame as it completes, so it lacks the poll-cadence defect.
  • Kept recovery.md under Related, not Required: moq-dev/moq#6139 adds the ignored arm but does not finish that [L] quest, so requiring it would block this one on the whole epic.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 21, 2026
# Conflicts:
#	quest/m1/ts-reliability/README.md
@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit f57c0aa Oct 21, 2026
9 checks passed
@kixelated
kixelated deleted the quest-plan/arrival-stamps branch October 21, 2026 16:15
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