Skip to content

quest: plan pinned requests, catalog epochs, and fetch budgets - #5291

Merged
kixelated merged 1 commit into
mainfrom
codex/quest-resume-pinning
Oct 10, 2026
Merged

kixelated merged 1 commit into
mainfrom
codex/quest-resume-pinning

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

The resume audit reproduced replacement content returned by an old Rust track's FETCH, new JS metadata requests through retired handles, and duplicate delivery after the resume layer forgets 1,024 group IDs. Existing quests also disagree on catalog sibling following and historical FETCH budgets.

Approach

Add m0 quests for retired request validity, resume duplicate suppression, and catalog reference epochs/pinning. Add m1 quests for FETCH max-delay and native IETF FILL_TIMEOUT. Reconcile expiry, DROP, range, handover, identity, and lite-07 cut plans. Source pinning stays with #5252, whose latest implementation already seeds the catalog handle; fresh JS consume selection stays with #5254.

Historical FETCH uses publisher max-age when max-delay is omitted, or the tighter limit when supplied. Catalog references gain optional epochs and pin their first resolved instance; epochless transports remain best effort. Reuse FILL_TIMEOUT for upstream waiting while enforcing content freshness locally, with no new IETF age extension.

Impact

  • Planning only; no runtime API or wire changes in this PR.
  • Planned catalog API/format: optional epoch on every broadcast reference, including archive replay; no root epoch. Players and exporters pin siblings for the catalog instance's lifetime.
  • Planned FETCH API: optional max_delay/maxDelay, including historical and held readers. Published framing stays unchanged; unpublished lite-07 carries the budget while FETCH exists or through its replacement ranges.
  • Planned IETF behavior: support existing FILL_TIMEOUT on drafts 18-22 with native gap dispositions. Delivery-timeout subscription parameters are not sent on FETCH; drafts 14-17 enforce age locally.

Alternatives

Keep players following siblings while exporters pin them; exempt historical retrieval from reader delay; refuse unverified catalog epochs on legacy wires; default FETCH to zero delay; add a custom IETF content-age extension. The maintainer chose the alternatives recorded below.

Validation

  • quest check: 470 documents valid.
  • just check: passed in the Nix environment.
  • git diff --check: passed.
  • Underlying audit evidence: 117 existing Rust and 356 existing JS tests passed; targeted probes reproduced the three bugs. The quests describe the regressions without depending on temporary audit files.

Follow-ups

Implement the new quests at their recorded priority. Wall-clock expiry, DROP, seamless JS handover, and the separately planned IETF epoch extension stay m1. Update existing docs and matching drafts with each implementation; no separate guide.

Interview decision prompts and selected answers

1. Goal and scope

Proposed goal: catalog, media, and FETCH stay on one broadcast identity; resume never duplicates content; expiry and DROP reliably end waits, while preserving epochless clients.

  • ✅ Plan the full audit scope: add uncovered bugs and reconcile existing pinning, expiry, DROP, ranges, and JS handover quests. User: 1.
  • Plan only the three newly reproduced bugs.

2. Release priority

  • ✅ A: retired-handle requests and duplicate delivery are m0 release blockers; wall-clock expiry, DROP, seamless JS handover, and the IETF extension stay m1. User: 1. A.
  • B: also promote wall-clock expiry and DROP to m0.

3. Historical FETCH versus live delay

  • A: preserve historical retrieval without a live max-delay cap.
  • ✅ B: apply the reader delay cap to historical ranges too. User: 2. B, we should not cache longer than the publisher max age.

4. Catalog references to siblings

The epoch plan said named references follow replacements; Source instead pins each sibling after first resolution.

  • ✅ A: pin resolved siblings for the catalog instance's lifetime in players and exporters. A new catalog instance permits fresh resolution. User: 3. A, and add an epoch field to the catalog.
  • B: players follow replacements while exporters pin.

5. Clarify publisher retention versus reader delay

With publisher max-age 60 seconds and reader max-delay 100 ms:

  • A: historical FETCH uses only the publisher's 60-second limit.
  • ✅ B: historical FETCH also uses the tighter 100 ms limit. User: B we should add max-delay to FETCH if it doesn't exist already.

6. Catalog epoch placement

  • ✅ A: optional epoch beside every broadcast reference, including rendition/data and archive replay; self-references inherit the pinned catalog broadcast. User: 1. A.
  • B: those fields plus a top-level catalog epoch.

7. Explicit epoch over an epochless transport

  • A: refuse a reference whose requested epoch cannot be verified.
  • ✅ B: allow best-effort resolution when transport cannot carry epoch, documenting the weaker guarantee. User: 2. B.

Known mismatches still fail. An unverified catalog value does not make epochless routes interchangeable.

8. FETCH default max-delay

  • A: match SUBSCRIBE's zero-delay default.
  • B: require an explicit value.
  • ✅ C: omission uses publisher max-age alone. User: 3. C.

9. Wire scope before checking native IETF parameters

  • A: local enforcement on all versions, lite-07 budget propagation, unchanged published formats.
  • ✅ B, subsequently refined below: also support an IETF upstream budget. User: 4. B shouldn't there be a delivery timeout parameter? Not quite the same but close enough.

10. IETF scope after checking the specification

DELIVERY_TIMEOUT and its later object/subgroup forms apply to subscriptions, not FETCH. FILL_TIMEOUT from draft-18 bounds total waiting for missing upstream objects, not cached content age.

  • ✅ Reuse FILL_TIMEOUT as the upstream waiting budget; enforce max-delay/max-age locally, leave older wires unchanged, and add no custom budget extension. User: sure, accepting the recommendation.
  • Add a negotiated extension carrying an exact content-age budget separately from FILL_TIMEOUT.

References: draft-22 timeout parameters, native cache duration. The plans retain native IETF retention semantics rather than treating unlike clocks as equivalent.

(Written by GPT-6)

Co-Authored-By: GPT-6 <noreply@openai.com>
@kixelated
kixelated marked this pull request as ready for review October 10, 2026 22:31
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 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-10T22:34:59.780958Z 01675e1 Draft marked ready
ℹ️ 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 10, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1dd2c3d8-b97e-495f-9026-1c8f1a717580

📥 Commits

Reviewing files that changed from the base of the PR and between 7cebbf7 and 01675e1.


📒 Files selected for processing (22)
  • quest/m0/broadcast-epoch/README.md
  • quest/m0/broadcast-epoch/catalog-references.md
  • quest/m0/broadcast-epoch/js-consume-identity.md
  • quest/m0/broadcast-epoch/resume-duplicates.md
  • quest/m0/broadcast-epoch/retired-requests.md
  • quest/m0/broadcast-epoch/source-pin.md
  • quest/m1/README.md
  • quest/m1/cache-max-age.md
  • quest/m1/catalog-track-id.md
  • quest/m1/catalog-tracks.md
  • quest/m1/fetch-max-delay.md
  • quest/m1/ietf-epochs.md
  • quest/m1/ietf-fill-timeout.md
  • quest/m1/js-fetch.md
  • quest/m1/js-group-handover.md
  • quest/m1/lite07-finalize.md
  • quest/m1/pipeline-requests/fetch.md
  • quest/m1/resume-reorder.md
  • quest/m1/subscribe-drop.md
  • quest/m1/subscribe-ranges/README.md
  • quest/m1/subscribe-ranges/ietf.md
  • quest/m1/subscribe-ranges/model.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.



Walkthrough

The pull request adds quest plans and updates existing plans for broadcast-reference pinning, retired-handle requests, duplicate delivery during route handover, and SUBSCRIBE_DROP handling. It also defines FETCH and historical-range age limits, including publisher max_age and optional reader max_delay, and specifies IETF FILL_TIMEOUT behavior for drafts 18–22. Related links and required-work lists are updated.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 01675

This change updates quest plans without changing runtime behavior. The plans consistently describe FETCH freshness, fill timeouts, and future IETF epoch verification, so no merge-blocking risk is established.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly summarizes the main planning changes: pinned requests, catalog epochs, and FETCH budgets.
Description check Passed The description directly explains the planning scope, added quests, catalog pinning, FETCH budgets, IETF timeout handling, validation, and follow-ups.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR

  • 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.

@kixelated
kixelated enabled auto-merge October 10, 2026 22:36
@kixelated
kixelated added this pull request to the merge queue Oct 10, 2026
Merged via the queue into main with commit 1530f1d Oct 10, 2026
3 checks passed
@kixelated
kixelated deleted the codex/quest-resume-pinning branch October 10, 2026 22:44
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