Repository navigation
Conversation
Collaborator
|
Noted as a draft, so I am holding off on a full review until it is marked ready for review. If you want one before then, say so here or request me as a reviewer. |
wagenet
force-pushed
the
wagenet/whip-split-modules
branch
from
September 25, 2026 00:19
d737c8c to
e92ca78
Compare
wagenet
force-pushed
the
wagenet/whip-split-modules
branch
from
September 27, 2026 06:00
e92ca78 to
2b079c6
Compare
This was referenced Sep 28, 2026
This was referenced Oct 2, 2026
wagenet
force-pushed
the
wagenet/whip-split-modules
branch
from
October 2, 2026 15:46
2b079c6 to
60e8b7a
Compare
Both files were past the 1500-line threshold. This is a move: no item is
renamed, no public path changes, and each test moves with the code it
covers.
blocks/builtin/whip/
mod.rs block builders and re-exports
slot_chain.rs per-slot output chains (build_whipserversrc) and their
caps, decodebin, damage-probe and liveness-stamp helpers
watchdog.rs per-session inactivity watchdog
session.rs per-session whipserversrc pipeline, its keyframe
recovery, and the appsink-to-slot bridge
output.rs WHIP Output (whipclientsink, whipsink)
definition.rs block definitions
whip_session_manager/
mod.rs WhipSessionManager, session registry and cleanup
endpoint.rs WhipEndpointConfig, SlotDecodebin and slot allocation
activity.rs ActivityStamp, SessionActivity, StallSide
takeover.rs allocate_slot_or_take_over and its constants
test_support.rs fixtures shared by the manager's tests
Generated, not hand-edited: a manifest places every item of the two
files, the compiler decides which items become pub(super), and unused
imports are pruned from its warnings. Four comments that named whip.rs
by path now name the file the item moved to.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wagenet
force-pushed
the
wagenet/whip-split-modules
branch
from
October 2, 2026 16:56
60e8b7a to
f2911ec
Compare
Collaborator
|
Closing in favour of #1053, which is now merged. It splits |
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.
Written by Claude (Claude Code) on behalf of @wagenet.
Description
Splits the two WHIP files that were over the 1500-line threshold into directory modules, following the
pipeline/andvision_mixer/pattern. #756 committed to doing this separately, before #792.Layout
blocks/builtin/whip.rs(before)whip/mod.rsWHIPOutputBuilder,WHIPInputBuilder, re-exportswhip/slot_chain.rsbuild_whipserversrcand its per-slot caps, decodebin, damage-probe and output-stamp helperswhip/watchdog.rswhip/session.rscreate_whipserversrc_for_session,CreatedSession, keyframe recovery logging, the appsink→slot bridge and its video PTS orderingwhip/output.rswhipclientsink,whipsink, incoming-RTP handler)whip/definition.rswhip_session_manager.rs(before)whip_session_manager/mod.rsWhipSessionManager: registry, cleanup task, removalwhip_session_manager/endpoint.rsWhipEndpointConfig,SlotDecodebin, slot allocation,SessionCleanupRequestwhip_session_manager/activity.rsActivityStamp,SessionActivity,StallSide,DECODE_GRACEwhip_session_manager/takeover.rsallocate_slot_or_take_over,idlest_session, theTAKEOVER_*constantswhip_session_manager/test_support.rs#[cfg(test)])Line counts include each file's tests. Every public item keeps its path through a
pub useinmod.rs, so no caller changed.Generated, not hand-edited
Every other open WHIP PR edits one of these two files, so a hand-made split would have to be hand-merged against each of them. The split is generated instead, and can be regenerated on whatever base it ends up landing on. The generator is on the fork, not in this PR:
tools/whip-splitonwagenet/whip-split-tool.split.pyplaces every item of the two files by a manifest and moves its text unchanged. It refuses to run if a file has an item the manifest does not place.fixup.pymakes the result compile from compiler output alone: it raises topub(super)exactly the items rustc reports private at a use site, deletes the imports rustc reports unused, and runscargo fmt.Running both on this branch's parent reproduces this commit byte for byte.
It is a move
verify.pycompares the non-blank lines of the two old files with those of the eleven new ones, leaving outusedeclarations, leading whitespace and apub(super)prefix:registerandreceiving_but_stalledfixture signatures, which rustfmt wrapped oncepub(super)pushed them past 100 columns. 2 are comments that namedwhip.rsby path (below).moddeclarations, 9//!module headers, 4 newmod tests {wrappers with their#[cfg(test)]and closing braces, the#[cfg(test)]onmod test_support, and theimpl WhipSessionManager {wrapper intakeover.rs.pub(super)went on 17 items:build_whipclientsink,build_whipsink,wait_for_inactivity,INACTIVITY_TIMEOUT, and 13 fixtures intest_support.rs.Four comments are the only edits that are not moves. Each named a file that no longer exists:
backend/static/tests/whip_reconnect.test.js: whereINACTIVITY_TIMEOUTlives is nowwhip/watchdog.rs.WhipSession::cleanup_sentdoc: "the callbacks inwhip.rs" is nowwhip/session.rs.DECODE_GRACEdoc: the compile-time assertion is inwhip/watchdog.rs.gst/pipeline_bridge.rstest_supportdoc: the call-site test is inwhip/session.rs.Related Issue
None. Follow-up committed to in #756.
Type of Change
Refactor only: no behaviour change.
Checklist
cargo fmt --allcargo clippy --workspace --all-targets -- -D warningscargo test --workspace(WHIP tests only, below)Tests
The old files held 33 unit tests. The same 33 ran and passed in their new modules, matched by name against the test output. Each moved with the code it tests; the manager's takeover and activity tests share fixtures, so those went to
test_support.rs.Run from the workspace root on this branch:
cargo fmt --all -- --check: cleancargo clippy --workspace --all-targets -- -D warnings: cleancargo test --lib -- whip pipeline_bridge: 44 passed, 0 failed (the 33 moved tests plus other WHIP andpipeline_bridgetests)cargo testonwhip_idle_slot_test,whip_session_branch_test,whip_slot_caps_reuse_test,whip_slot_decoder_reuse_test,whip_video_damage_test,whip_whep_ice_transport_policy_test,ice_preflight_test,cors_expose_headers_test,pipeline_lifecycle_testandopenapi_test: 31 passed, 0 failednode --test backend/static/tests/whip_reconnect.test.js: 8 passed (its comment changed)Not run: the rest of
cargo test --workspace, the suite with--features efp, and the suite on the parent commit. The unchanged test set rests on the per-name match above.🤖 Generated with Claude Code