Repository navigation
test(net): cover batch-boundary and mid-batch write refusals - #7154
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
No actionable comments were generated in the recent 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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 00e1cba.
No actionable bugs found, including an independent review of the batch-write failure path. Recoverable validation remains before draining; canonical frame indices stay anchored to the unchanged next_index until the batch commits. A shared-content conflict remains group-fatal, with the partial stored prefix and remaining drained inputs released through the existing abort/drain contracts.
Moving payloads directly is simpler than maintaining separate staged/shared-content implementations. The 32/33-frame benchmark boundary and valid-prefix/conflicting-tail tests target the important risks. The reported performance results appropriately distinguish the noisy small case from the larger batch improvement.
Verification: static review of the diff and surrounding validation, frame-buffer, canonicalization, metadata conversion, and abort/accounting code. I did not run tests or reproduce benchmarks.
|
Merge summary: no changes needed from the merge pass.
Landing with a squash merge through the queue. (Written by Claude Opus 5.5) |
Main's #7139 already moves batched payloads into group storage and skips canonicalization for groups without shared content, so keep its write_frames. This branch keeps its tests and 32/33-frame bench sweep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Design change: main's moq-dev/moq#7139 already moves batched payloads into group storage. The merge with main keeps its (Written by Claude Opus 5.5) |
|
Landing summary: I merged main into this branch and resolved the (Written by Claude Opus 5.5) |
Problem
Whole-frame batch writes used to clone every payload into a temporary entry array. moq-dev/moq#7139 has since landed that fix on main:
write_framesnow moves each payload, and only groups with shared canonical content stage the batch. What main still lacks is coverage at the batch boundary and for refusals partway through a batch.Changes
group_write_framesalso sweeps 32 and 33 frames, so the sweep crosses the 32-frame write-batch boundary.a_mismatched_frame_is_refusedchecks that a timestamp refusal on a batch's tail leaves the whole buffer in place, publishes no prefix, and keeps the group alive. It runs for both timed and untimed groups.a_refused_shared_write_fails_the_group(renamed froma_refused_compressed_write_fails_the_group) checks that a shared-content conflict after a matching prefix fails the group. It runs for both plain and compressed groups.Public API: none. Wire: none.
Merge resolution
The branch conflicted with moq-dev/moq#7139 in
write_frames. I kept main's version: it already moves payloads, and it also skipscanonicalizefor groups without shared content. This PR's single-pass version would only have dropped the staging step for shared-content groups, a small gain on a rare path that wasn't worth a second rewrite. Both carried-over tests pass against main's code.Validation
cargo test -p moq-net --lib -- group::passed (93 tests).cargo clippy -p moq-net --all-targetsandcargo fmt --checkare clean.The earlier benchmark table measured this branch's original rewrite against 53c0dcd685. It no longer applies, because main now carries the equivalent fix.
Follow-ups
The independent codec benchmark-composition effect is handled by moq-dev/moq#7153.
(Written by GPT-6.1 Sol, merge resolution by Claude Opus 5.5)
🤖 Generated with Claude Code