Skip to content

quest(auth): restore request-token's scope and split its standalone pieces - #5104

Merged
kixelated merged 3 commits into
mainfrom
claude/pr-4675-grant-lease-3ac6a6
Oct 9, 2026
Merged

kixelated merged 3 commits into
mainfrom
claude/pr-4675-grant-lease-3ac6a6

Conversation

@kixelated

@kixelated kixelated commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The 2026-10-08 audit (#5058) shrank auth/request-token to decode-and-close, deferred the grant and renewal work "until a moq-transport peer needs it", and closed #4675. The maintainer had chosen to split #4675, not close it, and an external moq-transport deployment does need per-request tokens with renewal. #4675 is reopened; this aligns the quests with it.

  • request-token.md is the full quest again ([L]), tracking feat(net): a token on a request authorizes that request #4675. It records the rulings from 10/1 (Q1-Q4) and 10/5, keeps renewal on every draft including 14-16 (decided 2026-10-09), and lists the fixes feat(net): a token on a request authorizes that request #4675 needs before merge. These came from a read of head 29ed74e78 and are not yet reproduced. Two are bugs: answers can go out of order on draft-17+, and a repeated token is now refused. The rest cover duplicated admission and renewal logic, the set_request_token shape, and dead code.
  • request-token-decode.md (new path, history kept) is the former decode-and-close text, carved out to land first. It adds two things: a repeated 0x03 stays accepted, and the SETUP path's alias close moves to 0x17 too.
  • extensions.md (new) carves setup::Extensions { auth, solicit } out of feat(net): a token on a request authorizes that request #4675. That includes the unlisted wire change it carries: a draft-17+ server omits AUTH from SETUP when the client did not offer it.
  • request-lease.md (new) is the relay's per-request moq_auth::Client lease. feat(net): a token on a request authorizes that request #4675 never contained it, and an application acceptor on moq-net does not need it.
  • References in auth/README.md and m2/ietf-malformed-close.md point at the new paths.
  • From review: renewal names SUBSCRIBE_UPDATE on drafts 14-15, draft-14 (which never answers an update) is exempt from one-renewal-in-flight pacing, 0x1B joins the shared session registry, and relay-refresh.md and request-lease.md state the handoff with this quest.

The drafts 14-16 SUBSCRIBE_UPDATE routing #4675 carried is already on main (#4961), so it is not carved separately; #4675 drops it on rebase.

Public API: none. Wire: none (quest files only).

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 9, 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 22 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: e1a7a7ce-1604-4c82-8e6e-3b5513f65cc3

📥 Commits

Reviewing files that changed from the base of the PR and between 52a2a89 and 4a18f2d.


📒 Files selected for processing (6)
  • quest/m1/auth/README.md
  • quest/m1/auth/extensions.md
  • quest/m1/auth/request-lease.md
  • quest/m1/auth/request-token-decode.md
  • quest/m1/auth/request-token.md
  • quest/m2/ietf-malformed-close.md


  • 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 commented Oct 9, 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-09T17:13:54.642925Z 227ecbc PR opened
ℹ️ 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.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Automated review of 227ecbc6 (quest/docs only)

Checked the claims against main: #4675 is open at 29ed74e78, #4961 (draft 14-16 update routing) and #5058 are merged, every linked quest file exists, and the only files on main that linked request-token.md for the decode work (auth/README.md, m2/ietf-malformed-close.md) are repointed. setup::Extensions isn't on main yet, which matches it being a new carve-out. No broken links found.

Blocking: none.

Non-blocking

  • request-token.md says it "takes the request-token slice of Connection::auth() from Relay tokens", and request-lease.md says Relay tokens "supplies the lease revalidation this reuses", but relay-refresh.md on main never mentions request tokens. Either add a line there handing that slice off, or drop the "takes from" wording so the two quests don't disagree about ownership.
  • request-lease.md lists Request tokens under Required, but the Goal says the relay refuses request tokens Unsupported today. Worth saying that this stays true until the lease lands, so nobody reads feat(net): a token on a request authorizes that request #4675 merging as the relay honoring them.
  • The fix list for feat(net): a token on a request authorizes that request #4675 is marked "not yet reproduced". That's fine, but each item already needs a regression test, so the quest could say the test should fail on 29ed74e78 first.
  • CI checks are still pending.

Verdict: MERGE

This is an automated review, not the maintainer's decision
(Written by Grok)

@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: 227ecbc662

ℹ️ 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 +76 to +82
Public API: additive. moq-net gains `auth::RequestKind`, the request a
`auth::Request` belongs to, `auth::Handle::set_request_token`, and
`SessionError::TooManyRequestUpdates`. moq-tokio gains `Auth`,
`Connection::auth`, `connect::Config::with_request_token`, and
`server::Request::auth`. Wire: MAX_REQUEST_UPDATES (0x08) on draft-19+ and
TOO_MANY_REQUEST_UPDATES (0x1B); the parameter already exists in every
supported draft.

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 Carry the new session code through the shared registry

The quest adds Rust's SessionError::TooManyRequestUpdates and wire code 0x1B but omits the corresponding js/net SessionCode, moq-lite Session Error Codes row, and session_codes_round_trip coverage. Since this repository deliberately shares sub-32 moq-transport codes with moq-lite, implementing the plan as written would make JS treat this close as unspecified and leave lite using an undocumented code. Include the cross-language registry and draft work, as the new decode quest already does for 0x13 and 0x17.

AGENTS.md reference: AGENTS.md:L99-L102

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.

Agreed. Fixed in f42bdaa: the Update credit decision now has 0x1B join the shared registry the way the decode quest does for 0x13 and 0x17 (js/net SessionCode, moq-lite's Session Error Codes table, session_codes_round_trip), and the Public API/Wire line names both.

(Written by Claude Opus 5.5)

Comment on lines +88 to +93
## Required

- [Request-token decode](/quest/m1/auth/request-token-decode.md) - a request
token decodes by the draft's rules and its forbidden forms close the session
- [Setup extensions](/quest/m1/auth/extensions.md) - a side declares which
Setup extensions it offers with one `Extensions` struct

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 Add the omitted request-token prerequisites

This quest says every standalone piece under Required lands before #4675 rebases, but the list omits both relay-refresh.md, which owns the Connection::auth() surface consumed at lines 37-43, and expired-error.md, which owns the error variants consumed at lines 50-51. Quest scheduling can therefore start this work before those APIs exist, causing duplicate implementation or a branch that cannot rebase cleanly; add both prerequisite links here.

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.

Disagree that either blocks this quest; clarified the wording in f42bdaa instead.

  • Relay tokens: this quest owns the request-token slice of Connection::auth() and lists Connection::auth in its own Public API, so whichever quest lands first adds the handle. Blocking feat(net): a token on a request authorizes that request #4675 on the [M] relay union work would stall the per-request tokens an external deployment needs. Both quests now say so. The relay-side lease that does need Relay tokens is request-lease.md, which keeps it under Required.
  • Expired token error: the 2026-10-01 Q4 ruling moved EXPIRED_AUTH_TOKEN and MALFORMED_AUTH_TOKEN out of feat(net): a token on a request authorizes that request #4675, so nothing here consumes them. The bullet now says they are not this quest's and do not block it.

(Written by Claude Opus 5.5)

Comment thread quest/m1/auth/request-token.md Outdated
Comment on lines +5 to +7
A moq-transport peer authorizes a SUBSCRIBE or PUBLISH_NAMESPACE with the
`AUTHORIZATION TOKEN` parameter (`0x03`) on that request, and refreshes it in
band with a REQUEST_UPDATE, on every supported draft. A request is authorized

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 Cover legacy SUBSCRIBE_UPDATE renewals explicitly

Drafts 14 and 15 renew subscriptions with SUBSCRIBE_UPDATE, not REQUEST_UPDATE; the existing version branches demonstrate this in rs/moq-net/src/ietf/subscribe.rs and js/net/src/ietf/subscribe.ts. Because both the goal and the later Scope decision name only REQUEST_UPDATE, implementing this literally can leave the promised draft-14/15 token renewal ignored. Explicitly include legacy SUBSCRIBE_UPDATE token handling and regression tests alongside draft-16+ REQUEST_UPDATE.

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.

Agreed. Fixed in f42bdaa: the Goal and Scope now name the update per draft (SUBSCRIBE_UPDATE on 14 and 15, REQUEST_UPDATE from 16), and the Drafts decision requires renewal tests with SUBSCRIBE_UPDATE on 14 and 15.

(Written by Claude Opus 5.5)

…ieces

The 2026-10-08 audit shrank request-token to decode-and-close and closed
#4675; the maintainer meant to split it, not defer it, and an external
moq-transport deployment needs per-request tokens with renewal. Reopen the
full quest for #4675, move decode-and-close to request-token-decode, carve
setup extensions into their own quest, and give the relay lease its own.

Co-authored-by: Kyle Sletmoe <sletmoe@amazon.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated force-pushed the claude/pr-4675-grant-lease-3ac6a6 branch from 227ecbc to 4a18f2d Compare October 9, 2026 17:14

@kixelated kixelated left a comment

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.

Automated review by review (OpenAI)

Reviewed the full six-file PR at 4a18f2d9d4fb2925bc5ca879d40b78ae31c3f622, against 52a2a8953910feb1e627883524fdd5ff2bbf19f7. The amended head has the same tree as 227ecbc6627f8bb525c828b46d883dc16c57b433.

One additional P2 planning finding is inline: draft-14 cannot use acknowledgment-gated renewal pacing. I also confirm the existing 0x1B registry-synchronization finding; no duplicate inline comment.

Direction: separating decode, extension configuration, request grants and relay leases is sensible. The pending-verdict ordering and repeated-token problems listed for #4675 are supported by its pinned source, but are not reproduced here. Keep the per-draft renewal behavior explicit when consolidating those state machines.

Verification: static review of the complete document diff, relevant codecs, #4675 implementation paths and #4961/#5028 context; changed quest links resolve. No builds or tests run. Exact-head Check is queued. Open/non-draft state, head and reviews rechecked before posting.

(Written by OpenAI Codex)

Comment thread quest/m1/auth/request-token.md Outdated
Comment on lines +46 to +49
guard that ends only the request. The sender keeps one renewal in flight per
subscription.
- **Drafts.** Renewal works on every supported draft, 14 through 16 included
(2026-10-09).

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.

[P2] Exempt draft-14 from acknowledgment-gated renewal pacing

Please qualify the one-in-flight rule to drafts that answer updates. Draft-14 sends no response to an accepted SUBSCRIBE_UPDATE; #4675 deliberately disables throttling for it in subscriber.rs:2532–2539. Applying this rule to every supported draft leaves the first renewal permanently outstanding, so the next token replacement never reaches the peer and the request eventually expires. Preserve the draft-14 no-ack path explicitly and require a regression with two successive token replacements and no renewal responses. This is separate from the existing legacy-message naming comment.

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.

Agreed. Fixed in f42bdaa: one renewal in flight applies only to drafts that answer an update; a draft-14 sender does not wait for an answer, with a test of two successive replacements and no answers.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge (squash) October 9, 2026 21:14
@kixelated

Copy link
Copy Markdown
Collaborator Author

Automated review of head f42bdaa5

Quest-only change: restores request-token.md to full scope (tracking #4675), and carves request-token-decode.md, extensions.md, and request-lease.md out of it.

Claims checked against the repo: #4675 is open again, #4961 (draft 14-16 update routing) and #5028 are merged, and every new link (request-token-decode.md, extensions.md, request-lease.md, relay-refresh.md, bindings.md, expired-error.md) resolves at this head. The README, relay-refresh.md, and m2/ietf-malformed-close.md all point at the right new paths now, so there are no stale references to the old decode-only scope.

Non-blocking:

  • The body says request-token-decode.md keeps its history, but GitHub shows it as a new file and request-token.md as modified. Git will attribute the history to request-token.md, not the decode quest. That's fine, but the wording is slightly off.
  • request-token.md lists the 2026-10-09 feat(net): a token on a request authorizes that request #4675 findings (out-of-order draft-17+ answers, Option refusing a repeated 0x03) as not yet reproduced. It's worth adding a regression test for each one in feat(net): a token on a request authorizes that request #4675 before you rely on them, which the quest already asks for.
  • In extensions.md, the draft-17+ server omitting AUTH when it wasn't offered is a wire behavior change. Make sure the carve-out PR flags it as one, as the quest says.

No inaccuracies or broken links found.

Verdict: MERGE

This is an automated review, not the maintainer's decision
(Written by Grok)

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary

  • Merged main (clean; quest check passes).
  • f42bdaa addresses review: renewal names SUBSCRIBE_UPDATE on drafts 14-15, draft-14 skips ack-gated renewal pacing, 0x1B joins the shared session registry (JS SessionCode, moq-lite table, round-trip test), and relay-refresh.md / request-lease.md state the handoff with this quest.
  • Declined: making Relay tokens and Expired token error blockers. This quest owns its slice of Connection::auth(), and the Q4 ruling keeps the expired/malformed codes out of it.
  • The follow-up commit is a small text fix, so the OpenAI review of 4a18f2d9 stands. Auto-merge is pinned to f42bdaa5a4cd2a90c4cb0ca978b303589951a470.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 76140ae into main Oct 9, 2026
4 checks passed
@kixelated
kixelated deleted the claude/pr-4675-grant-lease-3ac6a6 branch October 9, 2026 21:17
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