chore: remove unused CancellablePromise and gracefullyCancel utilities - #2335
Open
detail-app[bot] wants to merge 1 commit into
Open
Conversation
|
detail-app
Bot
force-pushed
the
detail/dead-code/chore-remove-unused-cancellablepromise-and-gracefu-e37937
branch
from
August 27, 2026 03:32
ed3b769 to
30bb2f7
Compare
detail-app
Bot
force-pushed
the
detail/dead-code/chore-remove-unused-cancellablepromise-and-gracefu-e37937
branch
from
August 30, 2026 08:11
30bb2f7 to
c80c52b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
@internalCancellablePromiseclass and thegracefullyCancelfunction from
agents/src/utils.ts(~85 LOC). Neither symbol had anyproduction or test consumers anywhere in the monorepo —
gracefullyCancelwas the only would-be consumer of
CancellablePromise, and it itself hadzero callers.
Description
Removes two dead
@internalsymbols fromagents/src/utils.ts:CancellablePromiseandgracefullyCancel. The API report(
agents/etc/agents.api.md) is updated to drop the corresponding entries.Changes Made
CancellablePromiseclass andgracefullyCancelfunctionfrom
agents/src/utils.ts(both marked@internal, so not part of thepublic API surface).
agents/etc/agents.api.mdto remove the documentation entries forthe removed symbols and fix one shifted diagnostic line reference.
Pre-Review Checklist
pnpm build,pnpm typecheck, andpnpm vitest run src/utils.test.ts(57/57) all pass.entries were removed.
Testing
pnpm vitest run src/utils.test.ts(57/57).consumers).
Additional Notes
Verified dead: a ripgrep across the entire monorepo found only
self-references within
utils.tsfor both symbols. The remaining deadcandidates in the file (
isImmutableArray,ExpFilter.filtered,ExpFilter.alphasetter, standalonewaitFor) were each under 10 linesand were left in place per the dead-code "tiny fragments" rule.
History
Dead Code PRs can be configured here.