Repository navigation
Description
Follow-on to #8970 (criterion 3 — mux-level accounting), filed per the 2026-11-23 done-checks on #8970.
State
Criteria 1, 2, and 4 of #8970 are landed on main by PR #10977 (merged 2026-11-17): CreditWindow in pkgs/id/src/serve_proxy.rs carries a construction-time ceiling, grant() returns an explicit error on over-ceiling/overflow with no state change, and ceiling unit tests plus the credit_is_never_exceeded proptest cover it.
Criterion 3 remains open because there is no mux consumer yet: on current main CreditWindow is referenced only inside serve_proxy.rs, and the only "mux" mentions are doc comments assigning the remaining work to the future mux slice. There is no DATA path to attach accounting to, so #8970 cannot be closed from inside the primitive alone.
Work
Build the mux consumer of the serve-proxy credit primitive (design record #5792), then wire the accounting:
- Per-stream and aggregate per-connection
CreditWindows in the mux DATA-accept path:try_consumebefore queueing DATA; refuse (do not go negative) when the send would exceed granted credit. - Credit-return path:
grant()on receivedWINDOW_UPDATE, bounded by each window's ceiling. - Map
grant()errors to an ERROR frame withErrorReason::CreditOverrun(the primitive already defines the reason; the mux slice builds the frame).
Acceptance
- DATA accepted only within granted per-stream credit and aggregate per-connection credit.
- A
WINDOW_UPDATEthat would push a window past its ceiling (or overflow) is rejected with anErrorReason::CreditOverrunERROR frame and leaves the window unchanged. - Credit returns only as bounded buffer space is released (no silent saturation anywhere in the path).
- Tests: unit + property coverage for per-stream and aggregate accounting, over-ceiling/repeated
WINDOW_UPDATE, and unchanged state after refusal.
Constraints
- Do not invent a universal deployment limit: ceilings stay parameterized from the effective configuration, as fix(id/serve-proxy): bound credit grants to flow-control limits #8970 requires (
CreditWindow::new(initial, ceiling); built-inper_stream()/per_connection()are fixed-size at their configured initial credit). - Closing this issue closes fix(id/serve-proxy): bound credit grants to flow-control limits #8970 (its last open criterion).
Labels / routing
app/id, kind/feature. Effort is above xs — this is a build issue, not a triage item.
Activity
developing-today commentedon Nov 23, 2026
CODE-5019
feat(id): serve-proxy mux credit accounting for DATA accept and WINDO…
fix(id): add missing `at` to group Event test fixtures (#13694 blocker)
dezren39 commentedon Nov 23, 2026
Progress — xaltha, 2026-11-23 ~17:25 CST. Slice landed as PR #13859 (branch
xaltha/13694-credit-mux, head93f93be1d): the mux consumer of theCreditWindowprimitive — per-stream + aggregate per-connection windows in the DATA-accept path (atomic refuse),grant()on received WINDOW_UPDATE bounded by each window's ceiling, over-ceiling/overflow grants rejected with anErrorReason::CreditOverrunERROR frame and the window unchanged. 10 tests (9 unit + 1 model property) pass via remote dispatch:cargo test -p id --lib serve_proxy_mux— 10 passed, 0 failed — https://github.com/developing-today/fleet/actions/runs/45287417777.Also fixed a blocker in passing (separate commit):
cargo test -p id --libdid not compile on main — commit 819e0f4 addedattoid_events::groups::Eventwithout updating five test-fixture literals (hosted_binding.rs,pull_policy.rs); all five now carryat: None.All four acceptance criteria are covered by this slice, so the PR says Closes #13694 (and #8970 with it). Remaining after merge: wire the mux into a live leg when leg establishment lands (later slice on #7569).
Merge pull request #13859 from developing-today/xaltha/13694-credit-mux