Skip to content

quest: run redundant importers on distinct epochs - #5963

Merged
kixelated merged 3 commits into
mainfrom
quest-plan/distinct-importer-epochs
Oct 19, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest-plan/distinct-importer-epochs

Conversation

@kixelated

@kixelated kixelated commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Re-plans redundant ingest. Two importers fed one stream no longer share an epoch and try to publish identical tracks. Each mints its own epoch, and consumers follow a failover as a marked restart.

Why: independently fed importers each see their own loss, start point, and history. Once loss or reordering hits one of them, "same epoch, same content" is false, and a mid-group resume splices two streams together. Each alignment rule added a cost (a 13.25 h wall-mapping bound, half-period failure cases, a 1 s join penalty, empty groups, GroupFullError), and audio after loss, the catalog tracks, and the timeline still diverged.

#5895

Recommendation: close #5895 after this merges. Nothing in it survives: the one-second group grid only exists for shared epochs, and so does the unpushed video-cut fix (dd52991e, which closes a damaged group as a prefix of the partner's). A comment on #5895 explains this and links here.

Decisions

How should redundant TS importers fail over?

When a backup importer starts (newer epoch) while the serving one is up, what should export ts --stitch do?

  • Stay on the current instance until it ends.
  • ✅ Follow the newest at once (today's behavior; a backup start is a seam).

How should the work split into quests?

  • Remove the flag, then audit, as two quests.
  • ✅ One quest.

What should happen to #5895?

  • Close it now.
  • ✅ Comment now, close after this quest merges.
  • Leave it alone.

Which milestone should the quest join?

  • m1, before the cut.
  • m2, where it was.
  • ✅ m0 (maintainer's own answer).

What bar should the audit use?

  • ✅ Revert anything that exists only for shared epochs unless a single importer is better or simpler with it.
  • Revert only what has a user-visible cost.

Where should the redundant-ingest setup be documented?

  • Inline in cli.md.
  • ✅ A new guide page, general rather than TS-specific (maintainer: "it's not obvious to use multiple routes for redundant ingest").

Where in m0?

  • ✅ Under Broadcast epochs, gating the release.
  • A standalone m0 quest.

Where should the one-publisher principle go?

  • ✅ Root AGENTS.md, Public API.
  • rs/moq-net/AGENTS.md.
  • Both.

Should the AGENTS.md change ride in this PR?

  • ✅ Same PR.
  • Separate PR.

Where should the guide go?

  • ✅ m1, doc/setup page, requiring the m0 quest.
  • m0, in the same epic.

Checks

quest check passes (433 documents). Quests and one AGENTS.md line, no code.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Drop same-epoch importers: delete the epoch-anchor and hop-aligned-import
quests, add an m0 quest under Broadcast epochs that removes `moq --epoch`
and reverts the shared-epoch-only alignment code, and an m1 guide on
redundant ingest over multiple routes.

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

chatgpt-codex-connector Bot commented Oct 19, 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-19T17:43:48.753585Z d5d2c94 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.

…instance

The maintainer picked switchover, so delete the redundancy-model decision
quest and repoint its references at distinct importer epochs. Record the
principle in AGENTS.md: one publisher per broadcast instance, and the
subscriber switches across instances rather than the relay stitching
independent publishers.

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: 1de0d4626d

ℹ️ 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/README.md Resolved
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: d5d2c94f8d

ℹ️ 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/ts-reliability/pes-import.md Resolved
@kixelated

Copy link
Copy Markdown
Collaborator Author

Summary before merge: redundant importers run on distinct epochs, and each publisher produces its own stream that the end subscriber switches between, combines, or keeps separate. This adds the m0 distinct-importer-epochs quest (remove moq --epoch, audit and revert the shared-epoch-only alignment code, close #4354 with a failover test) and the m1 redundant-ingest-guide. It deletes epoch-anchor, hop-aligned-import, and the now-decided redundancy-model, and adds the one-publisher principle to AGENTS.md. Codex's one finding (the stale redundancy-model gate) is fixed in b6083a8. The maintainer approved merging once CI passes. #5895 closes after this merges.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 8380595 Oct 19, 2026
9 checks passed
@kixelated
kixelated deleted the quest-plan/distinct-importer-epochs branch October 19, 2026 17:50
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.

export ts exits with "frame timestamp is below the live edge" when the relay switches to a same-hop standby quickly

1 participant