refactor(api): move hand-written abort bridges to the shared helper
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- eslint, typescript
調査の方向性
Start with src/api/providers/utils/abort-signal.ts and its callers, then review the listed provider locations and tests. The work covers seven providers, timeout helper consolidation, and two lint selectors, so map each special callback and controller use before changing the shared helper. Done means the providers’ tests pass and both selectors have zero violations, while the two fetchers/modelCache.ts listeners remain untouched.
索引モデルが issue の本文から書いたものです。
説明
Seven providers on main bridge the caller's abortSignal with their own AbortController and abort listener. bridgeExternalAbortSignal in src/api/providers/utils/abort-signal.ts does the same work. anthropic.ts, anthropic-vertex.ts, minimax.ts and xai.ts already use it. Each hand-written copy adds one more place for a listener leak or a missed pre-aborted check.
Sites at origin/main 66b07e0e65:
-
bedrock.ts(~593): its 10-minute timer also aborts the request controller. -
lm-studio.ts(~137) andqwen-code.ts(~293): both need a signal even with no caller signal, and abort the controller infinally. -
openai-native.ts(~471,attachExternalAbort): the controller is exposed to the stop-button path. -
openai-codex.ts(~524): both transports abort through the controller. -
native-ollama.ts(~481 and ~736): the abort callback also callsclient.abort(). -
vscode-lm.ts(~1198 and ~1684): the callback cancels a token source and recordsabortedByCaller.
fetchers/modelCache.ts has two abort listeners. They are not request bridges, so leave them as they are.
The helper returns only a signal, and returns undefined when there is no caller signal. Most sites above need a controller or an extra callback. Extend the helper first, for example with an optional controller and an onAbort hook. Then migrate each site and keep its provider tests green.
Also in scope:
-
mainhas twocreateTimeoutErrorhelpers: one inutils/abort-signal.tsand one inutils/request-timeout.tswith a phase argument. Keep one. Move the callers. - After the migration, add a lint selector in
packages/config-eslint/api-provider-hygiene.jsthat flagsaddEventListener("abort", …)outside the helper. Add one that flags a hand-builtTimeoutError. Both need zero violations when they land.
Context: review of #1535 and the open abort PRs #1545 and #1311.
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 301
- 平均マージ
- 3日 14時間
- マージ済み PR(30日)
- 103
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Zoo-Code-Org/Zoo-Code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Zoo-Code-Org/Zoo-Code#2773 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Zoo-Code-Org/Zoo-Code#2717 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
メンテナーはふだん 3 日以内に返信
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on Windows対応中かも @easonLiangWorldedtech が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
メンテナーはふだん 3 日以内に返信
-
[BUG] search_files hides matching text on long lines対応中かも @DananjayaNadun が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Zoo-Code-Org/Zoo-Code#2496 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
Zoo-Code-Org/Zoo-Code の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 modelオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
tashfeenahmed/freellmapi#2169 ·
メンテナーはふだん 1 日以内に返信
-
via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on recordオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vercel-labs/ui#1563 ·
メンテナーはふだん 1 日以内に返信