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.
Context
GH #133 item 2 (fixed in a companion PR) removed
dispatch.rs::BackendDispatcher::try_external's only call site forcrate::output_limit::spill_aware_collect— the twin's non-pipe capture branch now usesBoundedStream+drain_to_stream(matching production'skernel.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.rstests around theduplex-stream-basedcollect_stdout_with_spill/extend_ringcases).Why this is a separate issue, not part of #133
spill_aware_collectis declaredpub async fninsidepub mod output_limit— it's reachable askaish_kernel::output_limit::spill_aware_collectby 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
spill_aware_collect(check kaibo/kaijutsu).spill_aware_collectand its now-unreferenced private helpers, plus their dedicated tests.**BREAKING:**-prefixed CHANGELOG entry underRemoved.