fix(relay): no pooled-flusher wake for below-threshold records during an in-flight POST - #11034
Merged
Merged
Conversation
… during an in-flight POST #10989's Notify port dropped the flushing guard on the below-threshold arm: every sub-threshold enqueue during a POST stored a wake permit, which the PR's own deferral pin (pooled_threshold_drains_an_exact_batch_and_defers_while_posting) forbids — cargo test fails deterministically on main since the merge. The POST's completion already re-arms the debounce for leftover pending records under the same lock that clears `flushing`, so the wake was spurious, not load-bearing. No lost records: enqueue-under-flushing and completion serialize on the pool lock.
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
rustybret
pushed a commit
to rustybret/bmux
that referenced
this pull request
Aug 28, 2026
05544d5 fix(cmux-tui): terminal.close retires an exited terminal receipt without a live runtime (manaflow-ai#11036) 0ba31a2 fix(cmux-tui): bound the remote-connect handshake with a deadline (manaflow-ai#11030) ae9e41d Cloud machines by kind: New Machine sheet, kind-based image resolution, and real workspace/terminal verbs in the cloud tree (manaflow-ai#10948) 12d33df fix(relay): don't wake the pooled flusher for below-threshold records during an in-flight POST (manaflow-ai#11034) 44d9eb5 otel: keep all Cloud VM traces, head-sample everything else at 2% (manaflow-ai#11032)
lawrencecchen
added a commit
that referenced
this pull request
Aug 28, 2026
…rral rule pooled_arm_wakes_are_coalesced_while_the_flusher_is_busy and the pooled_threshold deferral pin demanded opposite wake behavior for the same state (flushing=true, zero stored permits, below-threshold enqueues): one required a wake, the other forbade it. They were never green together — #10989 and #11034 each gated with a filter that selected only one of them. The code semantics are the #11034 rule (completion re-arms; a wake during a POST is spurious), so this pin moves to that rule: arms defer while flushing, then wake and coalesce once the flusher is idle. (cherry picked from commit e92bc95)
lawrencecchen
added a commit
that referenced
this pull request
Aug 28, 2026
…rral rule (#11038) pooled_arm_wakes_are_coalesced_while_the_flusher_is_busy and the pooled_threshold deferral pin demanded opposite wake behavior for the same state (flushing=true, zero stored permits, below-threshold enqueues): one required a wake, the other forbade it. They were never green together — #10989 and #11034 each gated with a filter that selected only one of them. The code semantics are the #11034 rule (completion re-arms; a wake during a POST is spurious), so this pin moves to that rule: arms defer while flushing, then wake and coalesce once the flusher is idle.
lawrencecchen
added a commit
that referenced
this pull request
Aug 28, 2026
…ach (#11017) * chatmux-relay: tunnel-direct terminal listener + transport-fenced detach Port of chatmux packages/relay/bin/tunnel-terminal.mjs: a loopback TCP listener (127.0.0.1:9776, managed sandboxes only) serving terminals through the shared PtyManager with u32be+kind framing, poisoned-decoder close, open/resize/detach control frames, and the Worker's error-code map. Managed relays start it best-effort from stay_online. The shared manager grows transport fencing (Node 0.0.14 parity): every attachment records the transport that opened it, foreign transports cannot write/resize/flow/close it, and a dropped relay socket now detaches only its own attachments via detach_transport — a Worker deploy reconnect can no longer kill tunnel-attached terminals. detach_all also cancels in-flight opens, closing a late-install race. * chatmux-relay: cap the tunnel writer's final flush (stuck-peer reap) * chatmux-relay: hosted-gate fixes — writer mutability + rustfmt * chatmux-relay: derive Debug+PartialEq on TunnelFrame for the decoder pins * fix(relay): don't wake the pooled flusher for below-threshold records during an in-flight POST #10989's Notify port dropped the flushing guard on the below-threshold arm: every sub-threshold enqueue during a POST stored a wake permit, which the PR's own deferral pin (pooled_threshold_drains_an_exact_batch_and_defers_while_posting) forbids — cargo test fails deterministically on main since the merge. The POST's completion already re-arms the debounce for leftover pending records under the same lock that clears `flushing`, so the wake was spurious, not load-bearing. No lost records: enqueue-under-flushing and completion serialize on the pool lock. (cherry picked from commit 6364b3f) * test(relay): align the pooled arm-coalescing pin with the #11034 deferral rule pooled_arm_wakes_are_coalesced_while_the_flusher_is_busy and the pooled_threshold deferral pin demanded opposite wake behavior for the same state (flushing=true, zero stored permits, below-threshold enqueues): one required a wake, the other forbade it. They were never green together — #10989 and #11034 each gated with a filter that selected only one of them. The code semantics are the #11034 rule (completion re-arms; a wake during a POST is spurious), so this pin moves to that rule: arms defer while flushing, then wake and coalesce once the flusher is idle. (cherry picked from commit e92bc95)
rustybret
pushed a commit
to rustybret/bmux
that referenced
this pull request
Aug 28, 2026
6964584 iOS: show first-run onboarding only after sign-in (manaflow-ai#10789) c582b8d perf(cmux-tui): replay durable notices without a temporary vec (manaflow-ai#11026) cc47a91 fix(cmux-tui): stop terminal content admission from swallowing context-menu presses (manaflow-ai#11019) 9578c8a chatmux-relay: tunnel-direct terminal listener + transport-fenced detach (manaflow-ai#11017) 9ae6367 test(relay): align the pooled arm-coalescing pin with the manaflow-ai#11034 deferral rule (manaflow-ai#11038) 3be7b61 iOS: give the changes-hint banner dismiss button a 44pt hit target (manaflow-ai#10883)
lawrencecchen
added a commit
that referenced
this pull request
Aug 28, 2026
… during an in-flight POST (#11034) #10989's Notify port dropped the flushing guard on the below-threshold arm: every sub-threshold enqueue during a POST stored a wake permit, which the PR's own deferral pin (pooled_threshold_drains_an_exact_batch_and_defers_while_posting) forbids — cargo test fails deterministically on main since the merge. The POST's completion already re-arms the debounce for leftover pending records under the same lock that clears `flushing`, so the wake was spurious, not load-bearing. No lost records: enqueue-under-flushing and completion serialize on the pool lock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unbreak main:
journal_forwarder::tests::pooled_threshold_drains_an_exact_batch_and_defers_while_postingfails deterministically on main (Linux + macOS) since #10989 merged — first surfaced by the feat-relay-tunnel-terminal gate (run 33135003977), reproduced on a main-pinned probe branch (verify-main-journal-pool).#10989 replaced the typed
FlushWake::Arm/Batchchannel with one coalescedNotify, and the below-threshold arm lost its distinction: during an in-flight POST every sub-threshold enqueue now stores a wake permit, which the PR's own deferral pin forbids. Fix: skip the wake whilepool.flushing— the POST completion path already re-arms the debounce for leftover pending records under the same lock that clearsflushing(flush_cycle), so nothing waits and nothing is lost.Hosted
--filter pooled_thresholddispatch on this branch is the gate evidence.Summary by cubic
Fixes the pooled flusher wake in
journal_forwarderso below-threshold records no longer store a spurious permit during an in-flight POST. The POST completion path already re-arms the debounce for leftover pending records, so the extra wake was causing a deterministic test failure on main since #10989.Written for commit 6364b3f. Summary will update on new commits.