Repository navigation
Description
Evidence
pkgs/id/src/serve_proxy.rs documents Frame::stream_id as 0 only for leg-level frame types (for example PING and RESUME), and Frame::seq as a DATA-only sequence number that is 0 for other types (lines 32–36). However, Frame::validate currently checks only payload and total frame sizes (lines 98–112). As a result, Frame::new(FrameType::Data, 0, 0, vec![]) succeeds, and Frame::decode_prefix accepts the same invalid values from the wire because it calls that same validator (lines 141–149). The generic serve-proxy implementation issue #7569 is closed; the open design issue #5792 does not specifically track this validation gap.
Why it matters
Malformed peers or local callers can create frames whose stream/leg scope and sequencing contradict the documented wire contract. Downstream multiplexing and stream state handling then have to interpret invalid control/data frames inconsistently instead of rejecting them at the codec boundary.
Acceptance criteria
- Define/enforce the allowed stream-ID and sequence-number combinations for each frame type according to the serve-proxy protocol decision; do not assume every frame is stream-scoped.
- Reject invalid combinations through both
Frame::new/encodeandFrame::decode_prefix. - Add regression tests for DATA on stream 0, a non-DATA frame with nonzero sequence, and valid leg-level and stream-level frames.
- Keep existing size-cap and incremental-decoder behavior unchanged.
Activity
developing-today commentedon Nov 12, 2026
CODE-2713
dezren39 commentedon Nov 12, 2026
Fresh check on 2026-11-12: PR #8971 remains OPEN/UNSTABLE at 74ea286. Required checks fail in mcpx-test unit/ci-ok and E2E shards 0, 3, 4, 5, plus fleet-search parity (#5920); focused ID checks pass. This is shared CI blockage (mcpx failures tracked by #8900; parity by #8306), not evidence of a defect in this change. Leaving the Drew-authored PR untouched and unmerged pending required checks.