Skip to content

chore: remove unused flush/endInput machinery from InterruptionStreamBase - #2558

Closed
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-flush-endinput-machinery-from-379065
Closed

detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-flush-endinput-machinery-from-379065

Conversation

@detail-app

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

Copy link
Copy Markdown
Contributor

Description

Remove the dead flush pathway from InterruptionStreamBase: the InterruptionStreamSentinel.flush() static factory, the InterruptionStreamBase.flush() and InterruptionStreamBase.endInput() methods, and the unreachable chunk.type === 'flush' no-op branch in the audio transformer.

Changes Made

  • Removed InterruptionStreamSentinel.flush() static method (sole caller was the dead InterruptionStreamBase.flush()).
  • Removed InterruptionStreamBase.flush() (sole caller was the dead endInput()).
  • Removed InterruptionStreamBase.endInput() (no production or test callers; teardown goes through close()).
  • Removed the else if (chunk.type === 'flush') branch in the audio transformer (unreachable once the flush factory above is gone).
  • Kept the Flush import/re-export and the Flush interface in types.ts (backwards-compatibility re-exports per the "Exports only" guideline).

Context

InterruptionStreamBase.flush()/endInput() had no production callers anywhere (verified across agents/src/voice/audio_recognition.ts, interruption_detector.ts, and the broader voice/ tree). The only consumer of InterruptionStreamSentinel.flush() was the dead InterruptionStreamBase.flush(). Production teardown of an InterruptionStreamBase uses close() exclusively (see audio_recognition.ts:2190), which already closes the input stream, the WebSocket transport, and the resampler. Tests do not call flush()/endInput()/InterruptionStreamSentinel.flush() either.

Pre-Review Checklist

  • Build passes: All builds (lint, typecheck, tests) pass locally
  • AI-generated code reviewed: Removed unnecessary comments and ensured code quality
  • Changes explained: All changes are properly documented and justified above
  • Scope appropriate: All changes relate to the PR title, or explanations provided for why they are included
  • Video demo: N/A (internal dead-code removal)

Testing

  • Automated tests added/updated (if applicable) — not applicable; removing dead code with no behavior change.
  • All tests pass — pnpm vitest run src/inference/interruption/ (29/29) and downstream realtime_adaptive_interruption/audio_recognition_backchannel (34/34).
  • Make sure both restaurant_agent.ts and realtime_agent.ts work properly (for major changes) — N/A, no major change.

History

Additional Notes

AI model / prompt / tooling used: Detail: Dead Code


Dead Code PRs can be configured here.

@detail-app
detail-app Bot requested a review from a team as a code owner September 22, 2026 00:26
@detail-app
detail-app Bot requested a review from lukasIO September 22, 2026 00:26
@changeset-bot

changeset-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7599f3a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@detail-app

detail-app Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Closing this pull request because it has had no human activity in 30 days (since 2026-09-22) and was opened 30 days ago. Detail closes its pull requests once they are more than 30 days old and have had no human activity for 14 days.

If this change is still useful, reopen the pull request and Detail won't close it again. To keep a Detail pull request open, add the detail-keep-open label to it.

@detail-app detail-app Bot closed this Oct 22, 2026
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