Skip to content

quest: replace grant-cost with stale route demotion and moq-auth boundary - #9724

Merged
kixelated merged 1 commit into
mainfrom
quest-plan/stale-route-demotion
Nov 26, 2026
Merged

kixelated merged 1 commit into
mainfrom
quest-plan/stale-route-demotion

Conversation

@kixelated

@kixelated kixelated commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

quest/m1/grant-cost.md (and moq-dev/moq#9696) proposed adding routing cost (Grant::cost) and live repricing (Lease::update) to moq-auth. That pulls routing controls into the authorization contract when moq-net already has a verified, reversible draining rank that propagates across multi-hop lite-07 meshes.

Approach

  • Delete quest/m1/grant-cost.md (and its back-link in quest/m1/js-session-cost.md).
  • Add quest/m1/stale-route-demotion.md ([M] in m1, requiring /quest/m1/keep-alive.md, which is in flight in moq-dev/moq#9698) scoping:
    • automatic reversible draining demotion on Stale sessions in moq-net (Peer.stale: bool feeding Offer.draining on lite-07 without Msg::Drain, plus reversible live updates on lite-05/06 and moq-transport),
    • public RouteInfo::draining(&self) -> bool in moq-net and its @moq/net counterpart,
    • keep_alive (soft, hard) config on moq_tokio::quic::Config ([quic]) and moq-relay's [limits.peer.quic].
  • Add rs/moq-auth/AGENTS.md documenting the moq-auth::Grant boundary rule.

Decisions

Recorded from the 2026-11-26 maintainer /quest-plan interview:

  • Delete quest/m1/grant-cost.md and close moq-dev/moq#9696; replace with automatic reversible draining demotion on Stale sessions in moq-net (rejected: Grant::cost + Lease::update; local Session::price() + moq-relay::Admission handle).
  • On lite-07, track per-link reversible Peer.stale: bool feeding Offer.draining without emitting Msg::Drain { node } (rejected: Msg::Drain, which permanently poisons all paths through node for GOAWAY).
  • On lite-05/06 and moq-transport, live-update draining reversibly on Stale/Live along the existing going_away path.
  • Expose pub fn draining(&self) -> bool on moq_net::origin::RouteInfo and its @moq/net counterpart (rejected: keeping RouteInfo.draining crate-private).
  • Expose keep_alive (soft, hard) config on moq_tokio::quic::Config ([quic]) and moq-relay's [limits.peer.quic] (rejected: LAN-only config; forcing probing on all [quic] sessions including local clients; smuggling keep_alive into moq-auth::Grant).
  • Keep all existing moq-auth::Grant fields as-is for the 0.22 / lite-07 cut (link, flat tier/label + Refusal.tier, Access.rate, Grant.mounts), and record the Grant boundary in rs/moq-auth/AGENTS.md.

Impact

  • Docs, quests, and agent instructions only. No public API or wire change.

Alternatives

  • Keeping Grant::cost + Lease::update repricing (moq-dev/moq#9696) or adding a local Session::price() handle; rejected in favor of moq-net's existing reversible draining rank.

Validation

  • quest check: passed (The quest log is in order: 560 documents checked.).

Follow-ups

  • Implemented by quest/m1/stale-route-demotion.md once /quest/m1/keep-alive.md (moq-dev/moq#9698) lands.

Models

Size: S
Implementer: Antigravity, gemini-4-neon, high effort

(Written by Gemini 4 Neon with high)

Review

Rewritten by quest review after each round.

  • Head: fc7eccf
  • Base: origin/main at a304006
  • Risk: low, Nothing can break for users or peers: the diff only deletes one quest plan (quest/m1/grant-cost.md), adds another (quest/m1/stale-route-demotion.md), drops one link line from a plan, and adds a documentation AGENTS.md under rs/moq-auth, with no code, wire, API, or auth-behavior change; a revert fully undoes it in one commit.
  • Classified: low by Claude Code, claude-haiku-5-5, low effort, session a1f17370-531a-43d5-94f9-978b45cd738e
  • Risk file: bb7b1c0de60b
  • Local review: none, since the head is low risk

@kixelated
kixelated marked this pull request as ready for review November 26, 2026 20:32
@coderabbitai

coderabbitai Bot commented Nov 26, 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 39 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ea79ce85-ceff-4434-8f7a-3875eade735f
Commits

Reviewing files that changed from the base of the PR and between a304006 and fc7eccf.

Files selected for processing: 4

  • quest/m1/grant-cost.md
  • quest/m1/js-session-cost.md
  • quest/m1/stale-route-demotion.md
  • rs/moq-auth/AGENTS.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

@kixelated
kixelated added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit dcd069f Nov 26, 2026
5 checks passed
@kixelated
kixelated deleted the quest-plan/stale-route-demotion branch November 26, 2026 20:41
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