Skip to content

output_limit::spill_aware_collect and helpers are dead code after GH #133 item 2 #147

Description

@tobert

Context

GH #133 item 2 (fixed in a companion PR) removed dispatch.rs::BackendDispatcher::try_external's only call site for crate::output_limit::spill_aware_collect — the twin's non-pipe capture branch now uses BoundedStream + drain_to_stream (matching production's kernel.rs::try_execute_external) instead.

After that fix, the following are unreferenced anywhere in the codebase except their own doc comments and unit tests:

  • output_limit::spill_aware_collect (pub async fn, #[cfg(feature = "subprocess")])
  • output_limit::collect_stderr (private helper)
  • output_limit::collect_stdout_with_spill (private helper)
  • output_limit::handle_overflow (private helper)
  • output_limit::drain_in_memory (private helper)
  • output_limit::extend_ring (private helper)
  • output_limit::stream_to_spill (private helper)

Roughly ~200 lines of implementation plus their dedicated unit tests (output_limit.rs tests around the duplex-stream-based collect_stdout_with_spill/extend_ring cases).

Why this is a separate issue, not part of #133

spill_aware_collect is declared pub async fn inside pub mod output_limit — it's reachable as kaish_kernel::output_limit::spill_aware_collect by embedders (kaibo, kaijutsu), even though it isn't re-exported at the crate root. Removing it is a breaking embedder-API change (per CLAUDE.md's changelog policy), which deserves its own deliberate PR + CHANGELOG entry + review, not a side effect of a test-double behavioral-sync fix. Flagged during kaibo's review of the #133 item 2 PR.

Suggested follow-up

  • Confirm no embedder actually depends on spill_aware_collect (check kaibo/kaijutsu).
  • Remove spill_aware_collect and its now-unreferenced private helpers, plus their dedicated tests.
  • Add a **BREAKING:**-prefixed CHANGELOG entry under Removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions