Skip to content

chore: remove unused inject_into_sse_body and scrub_sse_body wrappers - #1704

Open
detail-app[bot] wants to merge 2 commits into
mainfrom
detail/dead-code/chore-remove-unused-inject-into-sse-body-and-scrub-b6ffbf
Open

detail-app[bot] wants to merge 2 commits into
mainfrom
detail/dead-code/chore-remove-unused-inject-into-sse-body-and-scrub-b6ffbf

Conversation

@detail-app

@detail-app detail-app Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Removes two pub thin-wrapper functions in dwctl/src/prompt_cache/inject.rs
that had no production callers anywhere in the workspace:

  • inject_into_sse_body: wrapped scan_edit_sse(_, UsageEdit::Inject(stats)).rewritten
  • scrub_sse_body: wrapped scan_edit_sse(_, UsageEdit::Scrub).rewritten

The production streaming path (prompt_cache/layer.rs) calls scan_edit_sse
directly with the appropriate UsageEdit variant, bypassing both wrappers — as
inject_into_sse_body's own doc comment already noted. Neither was re-exported
from prompt_cache/mod.rs, dwctl is publish = false and no other workspace
crate depends on it, so there is no external-consumer risk. Git history confirms
neither wrapper ever had a production caller.

Test call sites that referenced the wrappers are retargeted to call
scan_edit_sse directly with the equivalent UsageEdit variant, preserving
every test scenario (CRLF framing, data:/data: prefixes, terminal-frame-only
edits, scrub zeroing, no-op-when-clean).

History


Dead Code PRs can be configured here.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 8, 2026

Copy link
Copy Markdown

Deploying control-layer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5775029
Status: ✅  Deploy successful!
Preview URL: https://af428e92.control-layer.pages.dev
Branch Preview URL: https://detail-dead-code-chore-remov-xver.control-layer.pages.dev

View logs

@detail-app
detail-app Bot requested a review from hachall September 8, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant