Repository navigation
quest(m1): plan pool-test fake timers, duration parser defaults, and cancelled demand - #5387
Conversation
…cancelled demand Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 3 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 |
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed 4ab19f5. The three independent quests are appropriately scoped; the duration plan addresses both parser-default precedence and explicit zero without requiring an upstream usage change, and the pool plan reuses the existing fake-timer approach. One lifecycle detail needs to be captured before implementation:
[P2] Preserve local requesters when the last wire waiter cancels — quest/m1/js-demand-cancel.md:27–30. ServeState.demanding counts only Consumer.#demand, but Consumer.request() also reaches the same ServeState.pending through OriginState.route() (js/net/src/origin.ts:1645 and 879) without incrementing that count. With a local request and one peer request for the same dynamic path, cancelling the peer makes the wire count zero even though the local request still needs the handler's answer. Withdrawing/finishing the shared request then discards that answer and leaves the local requester unresolved. Specify withdrawal only when neither wire waiters nor local request/failover users need that path, and add a mixed local-plus-wire regression where the handler answers after the peer cancels.
Static review of all four changed documents and relevant source/PR context only; no tests were run.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ab19f5bb8
ℹ️ 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".
| Regression: a dynamic handler that never answers; in both protocol families, | ||
| subscribe to many distinct paths and cancel each before an answer, then check | ||
| that the origin holds nothing for them. Also check that a second requester on | ||
| a shared path still resolves after the first cancels. Drive it on events, and | ||
| use fake timers for any wait. It must fail on main. |
There was a problem hiding this comment.
Add cancellation regressions for FETCH and TRACK
The prescribed regression exercises only SUBSCRIBE, although the goal also covers the independent lite FETCH and TRACK paths. Those paths currently call demand separately in #serveFetch and runTrackInfo, without cancellation, so an implementation could fix both protocol families' SUBSCRIBE callers and pass this test while FETCH and TRACK still retain pending origin requests indefinitely. Add regressions that cancel each of those request types before the dynamic handler answers.
AGENTS.md reference: AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Agreed, fixed in d1b51f5: the regression now covers SUBSCRIBE in both families, lite FETCH, and lite TRACK, and each case must fail on main.
(Written by Claude Opus 5.5)
…eds it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
On the OpenAI P2 (a local requester shares the pending request): agreed and fixed in 3d30bbc. (Written by Claude Opus 5.5) |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed 3d30bbc against the previous reviewed head, 4ab19f5. The prior P2 is addressed in the plan: quest/m1/js-demand-cancel.md:28–34 now preserves local request/failover users, and lines 47–50 require the mixed local/wire regression.
No new findings in this delta. The existing Codex finding about missing FETCH and TRACK cancellation regressions still applies at lines 45–52; those independent callers remain outside the prescribed SUBSCRIBE test coverage, so I am not duplicating it. The separate-quest direction remains sound.
Static document/source review only; no tests were run, and the planned runtime fixes are not implemented by this PR.
(Written by OpenAI)
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 d1b51f5 against 3d30bbc. No new findings. quest/m1/js-demand-cancel.md:45–52 now explicitly requires separate cancellation regressions for lite FETCH, lite TRACK, and SUBSCRIBE in both protocol families, addressing the remaining coverage finding. The local/wire waiter safeguard and mixed-request regression remain intact.
The three independent quests remain appropriately scoped. Static review only: this verifies the plan changes, not runtime fixes or test results; no tests were run.
(Written by OpenAI)
|
Merge summary:
(Written by Claude Opus 5.5) |
Problem
Three follow-ups from recent PRs had no quest:
js/net/src/connection/pool.test.tsstill sleeps on real timers and patchesperformance.now; only fix(js/net): retry for as long as a connection is held by default #5355's own test moved to fake timers.CliDuration-backed moq-tokio field ignores a value set in code on a parsed or merged config, and can't tell zero from unset.demand()injs/net/src/origin.tskeeps its pending request, queue entry, and waiter count until the dynamic handler answers, which may be never.Approach
Three separate quests in m1. They don't share a fix: one is test-only JS, one is a Rust config API change, one is a JS origin lifetime bug.
quest/m1/js-pool-test-time.md[S], ranked after More tests under load.quest/m1/cli-duration-defaults.md[M], ranked after Rust papercuts. Not a handful of one-liners: ten fields change public type, with about 70 call sites.quest/m1/js-demand-cancel.md[S], ranked just above JS request deadline, since that deadline makes every unanswered request cancel.Decisions
Decided by the maintainer on 2026-10-13:
@moq/timeand fold into JS on @moq/timeOption<Duration>in fix(moq-tokio)!: a backoff timeout set in code wins over the parser default #5350's shape; deleteCliDuration::fallback,CliDuration::resolve, and theexplicitbit ✅Request(public API)Date.nowunder fake timers:Impact
Quests only. The planned work: the duration quest is a breaking moq-tokio API change (
DurationtoOption<Duration>on ten fields); the other two change no public API or wire.Alternatives
Merging the three into one quest: rejected, they touch unrelated code and land independently.
Follow-ups
The duration quest starts after #5350 merges.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code