Skip to content

refactor (pool 5/N): group inbound message handling into incoming.rs#29

Merged
irvingouj@Devolutions (irvingoujAtDevolution) merged 3 commits into
masterfrom
stack/10-pool-extract-incoming
Jun 23, 2026
Merged

refactor (pool 5/N): group inbound message handling into incoming.rs#29
irvingouj@Devolutions (irvingoujAtDevolution) merged 3 commits into
masterfrom
stack/10-pool-extract-incoming

Conversation

@irvingoujAtDevolution

Copy link
Copy Markdown
Collaborator

Stacked on #28. Fifth step of decomposing the RunspacePool god-object.

Splits the inbound server-response / PSRP message-handling out of pool.rs into a sibling incoming.rs via a split impl RunspacePool block — mirror of requests.rs (outbound):

  • accept_response + handle_pwsh_responses and its per-message handlers, handle_session_capability / handle_application_private_data, handle_pipeline_host_call/_output, accept_disconnect/reconnect_response, fault helpers.
  • No visibility widening needed; tests kept with their shared helpers.
  • pool.rs ~1800 → ~660 lines. Behavior-identical; clippy clean, tests green.

Groundwork for a future event-driven on_message API (inbound dispatch now isolated).

Reviewed: Benoit-style pass (nit fixed: mod.rs ordering) + Codex pass (NO_ISSUES_FOUND).

…n into host_call.rs

Move the pure PipelineHostCall parsing and the needs-session-key
classification out of pool.rs into a new private runspace_pool::host_call
module (named to avoid collision with crate::host). Fragmentation-coupled
send + the pending_host_calls queue stay in the pool. Behavior-preserving.
…equests.rs

Split the eight outbound-request methods (fire_receive/disconnect/reconnect,
kill_pipeline, invoke_spec, send_pipeline_host_response, send_runspace_pool_message,
build_public_key_blob_base64) out of pool.rs into a sibling requests.rs via a split
impl RunspacePool block. Collects all &self.connection (WsMan) usage in one place as
groundwork for a future transport seam. pool.rs 2029 -> 1594 lines; behavior-identical.
Split the inbound server-response / PSRP message-handling methods (accept_response,
handle_pwsh_responses + its per-message handlers, handle_session_capability,
handle_application_private_data, handle_pipeline_host_call/output, accept_disconnect/
reconnect_response, fault helpers) out of pool.rs into a sibling incoming.rs via a
split impl RunspacePool block. Mirrors requests.rs (outbound); groundwork for a future
event-driven on_message API. pool.rs ~1800 -> ~660 lines; no visibility widening;
behavior-identical.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant