Skip to content

refactor (pool 3/N): extract host-call construction/classification into host_call.rs#27

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

refactor (pool 3/N): extract host-call construction/classification into host_call.rs#27
irvingouj@Devolutions (irvingoujAtDevolution) merged 3 commits into
masterfrom
stack/08-pool-extract-host

Conversation

@irvingoujAtDevolution

Copy link
Copy Markdown
Collaborator

Stacked on #26. Third step of decomposing the RunspacePool god-object.

Extracts the pure host-call logic out of pool.rs into a new private runspace_pool::host_call module (named to avoid collision with crate::host):

  • pipeline_host_call_from(..) — the PipelineHostCallHostCall parsing.
  • needs_session_key(&HostCall) — the secure-string classification (incl. the Prompt special case).
  • The fragmenter/id-coupled send_pipeline_host_response and the pending_host_calls queue stay in the pool (pool state-machine concern) — partial, deliberate.
  • Behavior-preserving; clippy clean, tests green.

Reviewed: Benoit-style pass (fixed: module name hosthost_call to avoid colliding with crate::host) + Codex pass (NO_ISSUES_FOUND).

Pure, behavior-preserving move of the SecureString in-place encryption walk,
the AES-256-CBC helper, and KeyExchangeState out of the ~1900-line pool.rs into
a dedicated runspace_pool/crypto.rs module (private, items pub(super)). First
step of decomposing the RunspacePool god-object; no logic or wire-format change.
Make the `state` field private and route all transitions through
`set_state()` / reads through `state()` / terminal checks through
`is_terminal()`, instead of the RunspacePool poking the field directly.
Behavior-preserving; no wire/logic change.
…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.
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