Skip to content

chore: remove unused CancellablePromise and gracefullyCancel utilities - #2335

Open
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-cancellablepromise-and-gracefu-e37937
Open

chore: remove unused CancellablePromise and gracefullyCancel utilities#2335
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-unused-cancellablepromise-and-gracefu-e37937

Conversation

@detail-app

@detail-app detail-app Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Removes the @internal CancellablePromise class and the gracefullyCancel
function from agents/src/utils.ts (~85 LOC). Neither symbol had any
production or test consumers anywhere in the monorepo — gracefullyCancel
was the only would-be consumer of CancellablePromise, and it itself had
zero callers.

Description

Removes two dead @internal symbols from agents/src/utils.ts:
CancellablePromise and gracefullyCancel. The API report
(agents/etc/agents.api.md) is updated to drop the corresponding entries.

Changes Made

  • Removed the CancellablePromise class and gracefullyCancel function
    from agents/src/utils.ts (both marked @internal, so not part of the
    public API surface).
  • Updated agents/etc/agents.api.md to remove the documentation entries for
    the removed symbols and fix one shifted diagnostic line reference.

Pre-Review Checklist

  • Build passes: pnpm build, pnpm typecheck, and
    pnpm vitest run src/utils.test.ts (57/57) all pass.
  • AI-generated code reviewed: Detail: Dead Code
  • Changes explained: see below
  • Scope appropriate: only the dead symbols and their API-report
    entries were removed.
  • Video demo: n/a (no behavior change)

Testing

  • Automated tests pass: pnpm vitest run src/utils.test.ts (57/57).
  • restaurant/realtime agents: not run (internal deletion, no runtime
    consumers).

Additional Notes

Verified dead: a ripgrep across the entire monorepo found only
self-references within utils.ts for both symbols. The remaining dead
candidates in the file (isImmutableArray, ExpFilter.filtered,
ExpFilter.alpha setter, standalone waitFor) were each under 10 lines
and were left in place per the dead-code "tiny fragments" rule.

History


Dead Code PRs can be configured here.

@detail-app
detail-app Bot requested a review from a team as a code owner August 24, 2026 20:23
@detail-app
detail-app Bot requested a review from bcherry August 24, 2026 20:23
@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c80c52b

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.

Open in Devin Review

@detail-app
detail-app Bot force-pushed the detail/dead-code/chore-remove-unused-cancellablepromise-and-gracefu-e37937 branch from ed3b769 to 30bb2f7 Compare August 27, 2026 03:32
@detail-app
detail-app Bot force-pushed the detail/dead-code/chore-remove-unused-cancellablepromise-and-gracefu-e37937 branch from 30bb2f7 to c80c52b Compare August 30, 2026 08:11
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