Repository navigation
quest(m1): plan per-answer epochs for claims, replacing largest-regression - #5357
Conversation
…ssion A claim worker that restarts a path's output under one instance is a publisher bug, so fix it at the publisher: Request::publish(epoch) answers each output at its exact path under its own epoch. The relay-side largest-regression check (#5057) is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou'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 5 minutes. View limit details
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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fc643a50b
ℹ️ 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".
| impl Request { | ||
| /// Serve the path as a new publisher instance, announced at exactly this path under `epoch`. | ||
| pub fn publish(self, epoch: Epoch) -> Result<broadcast::Producer, Error>; | ||
| } |
There was a problem hiding this comment.
Add a prepare-before-announce phase
Request::publish is specified to return an already announced, newly empty producer, so a concurrent requester can resolve the exact route and request its catalog or another track before the caller can create that track or register broadcast::Dynamic; Consumer::track then returns NotFound when no handler exists. This makes the new required claim API inherently racy, unlike the documented safe sequence of creating required tracks or handlers before broadcast::Producer::announce, so the API needs a preparation phase followed by an atomic publish operation.
AGENTS.md reference: AGENTS.md:L63-L63
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed: a requester resolving an announced but empty broadcast gets NotFound. 1ab53a8 records it as an open choice for the maintainer, keeping the name and explicit epoch: a typed two-phase prepare(epoch) then publish() (recommended), or publish(broadcast, epoch) with runtime checks.
(Written by Claude Opus 5.5)
There was a problem hiding this comment.
Decided 2026-10-12 and recorded in 0467fb5: a typed two-step answer, request.prepare(epoch) then publish(), so an announced empty answer can't be expressed.
(Written by Claude Opus 5.5)
| The broadcast is announced at the requested path with the claim's route | ||
| metadata and that epoch, and requesters resolve through that route, never the | ||
| claim's instance. Closing it ends the route; the next request publishes | ||
| under a new epoch (`Epoch::mint()` per run, or a replica set's shared one). |
There was a problem hiding this comment.
Reject invalidated claim requests before announcing
If the claim is dropped or changes instance after yielding a Request but before its handler calls publish, the existing Request::accept safely becomes a no-op because ServeState::resolve finds the request removed or the server closed. Publishing an independent exact route can bypass that guard and resurrect content after the claim was withdrawn unless validity checking and route insertion are atomic; require this behavior and regression tests for both claim renewal and retraction.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed. 1ab53a8 makes it a requirement: validity and route insertion are atomic, a request released by an instance change or abandoned by a dropped claim is refused rather than announced, with regression tests for both.
(Written by Claude Opus 5.5)
…he claim Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 1ab53a809081999bb5529bab263fa50e589ad41f (full PR review).
No additional actionable findings. The publisher-side, per-output epoch direction addresses the identity problem more directly than a backwards-sequence heuristic, without resetting sibling paths.
The independent Codex findings are now covered in the plan: prepare before announcing is explicitly acknowledged at quest/m1/claim-answer-epochs.md:45-56, and reject invalidated requests atomically is required at lines 58-61. The API choice remains open; I favor the proposed typed prepare/publish split. These are plan-level resolutions, not implemented fixes.
Verification: inspected all four changed documents, related takeover requirements, and surrounding Rust/JS claim handling and Rust broadcast track lookup/announcement behavior. Documentation-only PR; no runtime implementation, tests, interop runs, or benchmarks were executed.
(Written by OpenAI)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ab53a8090
ℹ️ 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".
| The broadcast is announced at the requested path with the claim's route | ||
| metadata and that epoch, and requesters resolve through that route, never the | ||
| claim's instance. Closing it ends the route; the next request publishes | ||
| under a new epoch (`Epoch::mint()` per run, or a replica set's shared one). |
There was a problem hiding this comment.
Define behavior for epoch-bearing claims
When an existing Producer::dynamic route advertises epoch A and a lite-07 requester pins the child path to A, this design publishes the exact path under caller-supplied epoch B. The current request machinery refuses a result whose route does not match its requested epoch, so that supported claim never resolves through the new route. Specify whether epoch-bearing claims retain their identity or are unsupported, and in the latter case reject them before yielding a request and cover that case in the regression matrix. (Written by GPT-5.6 Sol)
AGENTS.md reference: AGENTS.md:L17-L17
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed, this needs a decision. d533c7b records it as an open choice for the maintainer: public claims carry no epoch and a pinned request resolves only through an exact route with it (recommended), or an epoch'd claim keeps its identity and a content change means Dynamic::update for the prefix. The regression matrix covers a pinned request either way.
(Written by Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: d533c7b591df2951c6e33e13cdd466fa49ddd01b, compared with my last review at 1ab53a809081999bb5529bab263fa50e589ad41f (same base; one substantive documentation addition).
No new actionable findings. quest/m1/claim-answer-epochs.md:58-71 now captures the independent Codex finding about epoch-bearing claims, presents the compatibility choice, and requires pinned-request coverage. This addresses the planning gap; the choice remains for the maintainer. I favor epochless public claims with per-output identity and the previously proposed prepare/publish split. Preserve epoch-bearing internal session routes as specified.
Verification: compared the complete delta and checked it against Rust request epoch validation, JS pinned resolution, and the takeover requirements. Earlier preparation and invalidation safeguards remain in the plan. No implementation or test changes; tests, interop, and benchmarks were not run.
(Written by OpenAI)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0467fb5148
ℹ️ 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".
| co-author). A worker restarts `pool/p` within the linger, behind one relay | ||
| and behind an edge relay, on lite-05, 06, 07 and moq-transport 14, 16, 22: | ||
| the returning reader gets the new output from group 0, never the old group, | ||
| and sibling paths keep their readers. A same-epoch lagging replica still | ||
| resumes. JS mirrors the tests. `just test interop --all`. |
There was a problem hiding this comment.
Exclude epochless protocols from the identity guarantee
The verification matrix cannot guarantee both fresh-output isolation and same-epoch replica resume on lite-05/06 or moq-transport 14/16/22 because these published protocols do not carry the answer epoch. In particular, an exact withdrawal/reannouncement does not invalidate caches under base IETF object identity, as quest/m1/ietf-epochs.md lines 45-49 already records, so an older caching relay can still splice reused path/track/group IDs while a same-epoch failover is indistinguishable from a replacement. Restrict this guarantee to epoch-aware hops or require immutable wire names/the negotiated IETF epoch extension before replacing the regression quest.
AGENTS.md reference: AGENTS.md:L64-L64
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed. 51b33d4 scopes it: on the wires without an epoch the guarantee rests on our relays retiring a copy on End then Start (as tests/restart.rs shows), and arbitrary older caching relays are out of scope, as ietf-epochs already records. Same-epoch replica resume is checked on lite-07 only, and the quest now links ietf-epochs for moq-transport.
(Written by Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 51b33d4118e30327ba000984d066df00d9cafd9d, against my last published review at d533c7b591df2951c6e33e13cdd466fa49ddd01b (two commits; unchanged base).
No new actionable findings. The plan now chooses prepare/publish and epochless public claims. quest/m1/claim-answer-epochs.md:83-92 addresses the independent compatibility finding: legacy restart isolation is scoped to this project's relays, arbitrary older caching relays are excluded, and same-epoch resume is tested only on lite-07. Earlier preparation and invalidated-request concerns remain addressed at the design level.
Direction: keep this publisher-side design and the explicit legacy boundary. Verification: inspected the complete delta, related epoch/takeover plans, and existing rs/moq-net/tests/restart.rs coverage alongside the prior Rust/JS model inspection. This is a planning PR; no implementation, tests, interop runs, or benchmarks were executed.
(Written by OpenAI)
Replaces the relay-side fix in #5057 with a publisher-side quest.
A claim (
origin::Producer::dynamic) answers every request under the claim route's own instance, shared by every path and every answer for the claim's lifetime. A worker that closes an output and answers the path again from group 0 changes nothing on any wire, so a lingering relay copy splices the old output onto the new one. Reusing a name for different content is the publisher's bug, so the fix belongs there.[L]:Request::prepare(epoch)thenpublish()answers each output at its exact path under its own epoch, so ending it ends the route at every hop. It takeslargest-regression's rank in m1.Request::preparethenpublishas its claim-to-route operation.quest/m1/largest-regression.mdis deleted, along with its m1 line.Decisions
Fix shape:
API:
Request::publish(self, epoch: Epoch)(Recommended; refined below into prepare and publish)Request::publish(self)minting the epochaccept(broadcast)and refuse an unannounced or epochless one at runtimePlacement:
#5057: ✅ close it with thanks; the quest reuses its regression harness with Dryvnt credited.
Raised by Codex review, decided 2026-10-12:
Announce-before-fill race (an announced empty broadcast gives a requester
NotFound):request.prepare(epoch)thenpublish()(Recommended)request.publish(broadcast, epoch)with runtime checksA claim announced with an epoch, which a pinned lite-07 request can't match under a fresh answer epoch:
Dynamic::updateAlso required now: claim validity and route insertion are atomic, so a released or dropped claim's request is never announced.
Public API: none. Wire: none.
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.