Skip to content

quest(archive): per-track timelines and replay catalog - #4168

Merged
kixelated merged 8 commits into
quest/m1/archive/READMEfrom
claude/archive-replay-catalog
Sep 25, 2026
Merged

kixelated merged 8 commits into
quest/m1/archive/READMEfrom
claude/archive-replay-catalog

Conversation

@kixelated

@kixelated kixelated commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

#4155 made moq-hls list a durable timeline past --window, but the stock CLI chain can't use it: moq import archive serves the recorded catalog only through FETCH, and nothing sets store. Scoping that exposed a deeper gap. One aligned timeline numbers every track's segments, so a DVR expires a static catalog with the first video segment. The writer also never stores a group that never closes.

Approach

  • New questline Per-track timelines, ranked first on the archive line:
    • Every track gets its own timeline and cuts on its own, between a minimum and maximum duration, with manual cuts as an optimization.
    • The root catalog archive entry maps each track to its timeline.
    • Objects may hold a frame range of a group.
    • HLS and DASH are derived at the edge from group timestamps.
    • Breaking in place on main; nothing has users yet.
    • Children: [XL] Rust core, then [M] JS mirror.
  • New quest Replay catalog: import republishes the recorded catalog live, stamped with store and version, so export archive → import archive → export hls serves the whole recording. It requires the Rust core.
  • DVR rewind, Archive proof, and Browser archive now require the per-track format. DVR rewind also takes the open question from feat(moq-hls): list a durable archive timeline without the live window #4155 on following archive.replay.

Impact

  • None; planning only.

Alternatives

  • A multiplexed timeline with per-track counters: moq_json::window pops only from the front, so it can't keep an old catalog record while dropping video.
  • Keep aligned segments and pin the latest non-pacing group: breaks the draft's nonoverlapping-range rule and gives no independent audio cuts.
  • Map HLS segments 1:1 onto stored objects: needs publishers to cut for HLS.
  • Stage the new timeline beside the old one: more churn for a format with no users.

Follow-ups

  • None beyond the quests.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review September 25, 2026 17:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 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-09-25T19:55:31.405450Z 9f9b25e New commits
ℹ️ 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.

@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: 623e96081c

ℹ️ 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 thread quest/m1/archive/replay-catalog.md Outdated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title quest(archive): replay catalog for stock HLS replay quest(archive): replay catalog and per-track segments Sep 25, 2026

@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: 4320405cb4

ℹ️ 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 thread quest/m1/archive/replay-catalog.md Outdated
kixelated and others added 2 commits September 25, 2026 11:48
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title quest(archive): replay catalog and per-track segments quest(archive): per-track timelines and replay catalog Sep 25, 2026

@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: 5b4dfcfe79

ℹ️ 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 thread quest/m1/archive/track-timeline/README.md Outdated
Comment thread quest/m1/archive/track-timeline/js.md
Comment thread quest/m1/archive/track-timeline/core.md Outdated
kixelated and others added 3 commits September 25, 2026 12:44
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@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: 0c835d3c6b

ℹ️ 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 thread quest/m1/archive/track-timeline/core.md Outdated
Comment thread quest/m1/archive/browser.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated merged commit fb1f7f6 into quest/m1/archive/README Sep 25, 2026
3 checks passed
@kixelated
kixelated deleted the claude/archive-replay-catalog branch September 25, 2026 19:55

@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: 9f9b25e102

ℹ️ 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".

minimum and maximum duration (roughly 1s and 10s), splitting a long-lived
group by frame at the maximum. Manual cuts stay as an optimization, such as a
video keyframe cutting audio so derived segments need fewer objects.
- A stored object may hold a frame range of a group, not only whole groups.

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 Add a distinct object key for each frame slice

The revised browser plan now defers to the Rust writer's keys, but this line still leaves the recording layout as groups/<largest>.<smallest> in quest/m1/archive/README.md:74-90. When one long-lived group is split at successive maximum-duration cuts, every immutable slice has the same <g>.<g> key, so the second PUT must either collide or overwrite the earlier frames, and recovery cannot identify the requested frame range. Define a frame-aware or per-record object identity in the core format and draft before making sliced groups a requirement.

Useful? React with 👍 / 👎.

Comment on lines +25 to +28
- **Writer and reader:** commit each track independently, and store frame
ranges so a never-closing group is recorded. Bump the recording `version` and
refuse the old one. Recovery, grace deletion, and FETCH replay follow the
per-track index.

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 Support extending fetched groups before promising replay

When import archive --follow first serves an early slice of an open group and later frames of that same sequence are recorded, the current moq-net cache cannot expose the new slice: TrackState::covering_group treats a cached group whose first frame precedes frame_start as complete (rs/moq-net/src/model/track.rs:442-451), claim_sequence rejects replacing it (:793-812), and the archive reader finishes every fetched producer (rs/moq-archive/src/reader/mod.rs:319-332). A later FETCH therefore returns the already-finished prefix and never reaches storage. The quest needs to include a source-level moq-net cache/replay change or choose a representation that does not reuse a group sequence across independently arriving slices.

Useful? React with 👍 / 👎.

Comment on lines +29 to +32
- **HLS and DASH:** take segment boundaries from a reference video rendition
(an audio one when the broadcast has no video), near a target duration, and
number them so every edge and every reload agrees, including after DVR pops. Every other video rendition snaps each
boundary to its nearest group start within a tolerance (around 1s); a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep reference boundaries stable across catalog changes

When the selected reference rendition is removed, reconfigured, or superseded by a newly added rendition, an existing edge and an edge joining afterward can select different reference timelines and derive different segment boundaries and numbers for the same media. Rendition membership is explicitly dynamic through Added and Removed events in rs/moq-hls/src/export/renditions.rs:452-477, while a late catalog subscriber does not have the prior selection, so the stated guarantee that every edge and reload agrees cannot follow from an unspecified current "reference video rendition." Persist a stable reference or boundary epoch, or derive boundaries independently of current rendition membership, and test reference removal/replacement.

Useful? React with 👍 / 👎.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged into the archive line. Adds the Per-track timelines questline (Rust core [XL], JS mirror [M]) and the Replay catalog quest, and points DVR rewind, Archive proof, and Browser archive at the per-track format. All Codex findings were addressed; the maintainer chose to merge before a fifth review round.

(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