Skip to content

quest: a moq-lite-06 session's auth requests end when its peer leaves - #8534

Merged
kixelated merged 3 commits into
mainfrom
quest-plan/lite06-requests-end
Nov 12, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest-plan/lite06-requests-end

Conversation

@kixelated

@kixelated kixelated commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Plans quest/m1/lite06-requests-end.md (S), a follow-up from moq-dev/moq#8516. There, a moq-lite-06 server's requests() loop did not end after its client cancelled, so the moq-ffi test a_credential_without_auth_is_unsupported aborts its server task instead. If the stream never ends, a server holds a task and session per departed lite-06 client, and lite-06 is still a version moq.pro relays interoperate on.

Decisions

Impact

Public API: none. Wire: none. Quest text only.

Follow-ups

None.

Models

Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, low effort
  • Session: 01a1cd8a-a22a-7a61-9441-06cedc64bccb, round 1
  • Head: f0622a6
  • Base: origin/main at 585c7f4
  • Score: 10/10, The change only adds a follow-up quest documenting the suspected lifecycle issue and investigation plan, with no runtime behavior changes.
  • Findings: none

@kixelated
kixelated marked this pull request as ready for review November 12, 2026 02:16
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor
Pre-merge checks: Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • 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

@kixelated
kixelated added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 45feb5a Nov 12, 2026
11 checks passed
@kixelated
kixelated deleted the quest-plan/lite06-requests-end branch November 12, 2026 03:08

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ Two details in the quest text worth tightening before an implementer picks this up.

Reviewed changes

  • New m1 quest — quest/m1/lite06-requests-end.md records that a moq-lite-06 server's requests() stream never ends after its client cancels, and plans a moq-net/moq-tokio reproduction plus dropping serving.abort() from the moq-ffi test.

The claim about #8516's test matches its merged text exactly, and the lite-07 / moq-transport comparison holds (both of those tests await the server task).

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment on lines +21 to +23
`requests()` closes only through `auth::Handle::close`, which every moq-lite
version reaches from `Driver::end` or `Driver`'s `Drop` in
`rs/moq-net/src/lite/session.rs`. So suspect the lite-06 driver not ending

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The queue has a second closer, and it is the one a departed peer should trigger: Supervisor::poll in rs/moq-net/src/session.rs:734 calls auth.close(...) as soon as the transport reports closed, on every protocol. Since Handle::close closes the app's Acceptor::App queue, saying the lite drivers are the only path leaves out the code that should already have ended this stream on lite-06, which changes what the implementer instruments first.

Technical details
# The supervisor also closes the auth queue

## Affected sites
- `quest/m1/lite06-requests-end.md:21-23` — says every moq-lite version reaches `Handle::close` only from `Driver::end` or `Driver`'s `Drop` in `rs/moq-net/src/lite/session.rs`.
- `rs/moq-net/src/session.rs:734` — `Supervisor::poll`, on `closed_watch.poll_closed`, calls `self.auth.close(err.clone())` before the protocol is polled (`rs/moq-net/src/driver.rs` polls the supervisor first).
- `rs/moq-net/src/auth.rs:1448` — `Handle::close` → `State::abort` returns the `Acceptor::App(queue)` → `Pending::close`, so `Requests::poll_next` yields `None`.

## Required outcome
- The plan names the supervisor's close-on-transport-close as the path that should end the stream when a peer leaves, and asks why it never fired for lite-06, rather than treating `Driver::end` as the only closer.

## Suggested approach (optional)
- Reword to name both, e.g. `Driver::end`/`Driver`'s `Drop` plus the session supervisor's close watch, and add "or its supervisor never saw the transport close" to the suspects.


## Goal

On a moq-lite-06 session, the server's `Request::requests()` stream ends once

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

requests() is on server::Handshake (rs/moq-net/src/server.rs:1143), returning auth::Requests; auth::Request is the per-token type and has no such method. Handshake::requests() (or just "the server's requests() stream") keeps the pointer accurate.

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