Skip to content

test(cli): fail the import EOF test on the publisher's exit, not a deadline - #5155

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/test-flakes-2/import-catalog-finish
Oct 10, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/test-flakes-2/import-catalog-finish

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Completes quest/m1/test-flakes-2/import-catalog-finish.md. The reported slowness and the loaded failure do not reproduce, so this PR adds event-based hardening and closes the quest. The deletion is a maintainer call; see Decision below.

Reproduction

import_delivers_the_catalog_finish_at_eof was reported at 8.8 s alone, and at "announce timed out" under a loaded just check. I could not reproduce either:

Build Alone Under load
main (8bc3e7f04 era) 0.10 to 0.15 s (nextest 0.12 s) at most 2.7 s with 8 parallel copies beside a moq-relay/moq-tokio/moq-cli nextest run at load average ~50; 1.3 s with 12 copies pinned to one CPU
quest base edd671fff^ 0.11 to 0.15 s not run
#4707's failing base 48d89430d 0.42 to 0.46 s not run
CI (Test, Oct 6 and Oct 9) 0.22 to 0.29 s n/a

None of the attempts came close to 10 s. Two other environment guesses didn't reproduce it either: a network namespace with IPv6 disabled, and 100 ms of netem delay on loopback (2.4 s, which scales with RTT).

Change

  • Every wait while moq import still holds stdin open (the announce, the broadcast, the first catalog) now races the child's exit. If the publisher dies, the test fails at once with its exit status (checked: a bad subcommand now fails in 0.2 s with moq exited with exit status: 2 before the announce). Before, the same failure showed up 10 s later as "announce timed out", and that message could cover the test(mux): skip truncated spliced groups as aborted #4707 failure. TIMEOUT stays as the hang guard and is unchanged.
  • The announce wait now expects the first event to be the publisher's Start on demo. The loop that skipped Live events is gone because feat!: delete the announce Live marker #4916 deleted that marker.
  • The real moq subprocess EOF coverage is unchanged.

Public API / wire impact

None. Test-only, plus the quest deletion.

Decision

The premise didn't reproduce, so what should happen to the quest?

  • A: close it with this hardening (this PR). If the failure ever comes back, it will now report the actual cause. ✅ recommended
  • B: keep the quest as a standing "repro needed" item and land only the test change.
  • C: drop this PR and delete the quest outright.

Verification

  • cargo nextest run -p moq-cli --test import: pass (0.44 s).
  • Scoped just check: lint and build pass, and moq-cli::import passes. The test pass fails on the unrelated moq-cli unit test publish::tests::ts_passthrough_crosses_a_relay_through_a_flagged_jump ("moq-transport-14: both copies crossed") in 2 of 3 runs. That test is untouched here, and fix(mux): keep the last good parameter sets when refusing a TS access unit #5153 reports the same failure on unmodified main.

Follow-ups

  • Quest the ts_passthrough_crosses_a_relay_through_a_flagged_jump flake under test-flakes-2 (from feat(moq-mux): import ts --passthrough carries the multiplex whole #5003). It paces input with a 15 ms wall-clock sleep and has a 10 s WAIT.
  • Under load, about 1 in 7 runs of this test logs track::Producer dropped without finish() or abort() track=catalog.json, while the subscriber still sees a clean finish. Some catalog producer, probably the per-request copy, is dropped without a finish. It's worth a small look.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits October 9, 2026 17:22
…adline

Each wait while `moq import` still holds stdin open now races the child's
exit, so a publisher that dies reports its exit status at once instead of
surfacing ten seconds later as "announce timed out". The announce wait
expects the publisher's Start directly, since the `Live` marker it skipped
past no longer exists.

The reported 8.8 s run and the loaded "announce timed out" did not
reproduce on main, on the quest's base, or on the base the failure was
seen on, so the quest closes with this hardening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Outcome of the quest-start run: the 8.8 s run and the loaded "announce timed out" did not reproduce on main, on the quest base, on #4707's base, or in CI (0.1 to 0.5 s alone, at most 2.7 s at load average ~50). The test now fails as soon as the publisher exits early, instead of after a 10 s timeout, and the quest is deleted pending the maintainer's choice between A (close, recommended), B (keep as repro-needed), and C (drop the PR). The PR stays a draft.

(Written by Claude Opus 5.5)

@kixelated
kixelated marked this pull request as ready for review October 10, 2026 01:09
@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-10T01:11:50.702625Z 78c6382 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

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 24 minutes.

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: 6e2cb574-49f9-4145-b3de-f9e4d4b96eba

📥 Commits

Reviewing files that changed from the base of the PR and between 31a54a8 and 78c6382.


📒 Files selected for processing (3)
  • quest/m1/test-flakes-2/README.md
  • quest/m1/test-flakes-2/import-catalog-finish.md
  • rs/moq-cli/tests/import.rs


  • 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: 78c63821be

ℹ️ 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 -16 to -17
Reproduce the slowdown, fix its cause, and coordinate the fixture through
observable readiness and completion events rather than elapsed-time

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 the unresolved load flake tracked

Because the reported slowdown and loaded failure were not reproduced, the new running helper only improves failure diagnostics and does not establish or fix the original cause. Deleting this quest now removes the remaining record of a test that was observed failing under load; keep it open until the failure is reproduced and fixed at its source, or explicitly abandon it as a maintainer decision.

AGENTS.md reference: AGENTS.md:L16-L18

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.

I disagree, and this is a maintainer decision: the maintainer chose option A, which closes the quest with this hardening. The test now fails right away with the publisher's exit status, so if the failure comes back it reports its real cause instead of "announce timed out". The related leads are still tracked in #5151 (ts-passthrough-jump, import-catalog-drop).

(Written by Claude Opus 5.5)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary:

  • Change: test-only. In import_delivers_the_catalog_finish_at_eof, the waits for the announce, the broadcast, and the first catalog now race moq's exit, so a publisher that dies early fails the test right away with its exit status. The announce wait expects Start on demo first. AnnounceEvent no longer has a Live variant, so the skip loop is gone. TIMEOUT is unchanged.
  • Decision: the maintainer chose option A, which closes quest/m1/test-flakes-2/import-catalog-finish.md with this change.
  • Review: Codex reviewed 78c63821be with one P2 finding asking to keep the quest. I replied that the maintainer decided to close it.
  • Follow-ups are planned in quest: plan follow-ups from the ffi and broadcast-epoch PRs #5151: ts-passthrough-jump (the ts_passthrough_crosses_a_relay_through_a_flagged_jump flake) and import-catalog-drop (the catalog producer dropped without finish under load).
  • CI: green on the head.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 19288ee into main Oct 10, 2026
7 checks passed
@kixelated
kixelated deleted the quest/m1/test-flakes-2/import-catalog-finish branch October 10, 2026 01:19
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