fix(telemetry): isolate unreadable sources during ingestion and reporting
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
- 領域
- backend, testing-qa
調査の方向性
Start with cli/src/contexts/telemetry/application/ingest-usage-use-case.ts and trace how reader failures stop storage; then read the read, transcript, report, and catch-up files named in the issue. Use cli/tests/helpers/ports/in-memory-telemetry.ts to understand the reproduction and regression tests. Done means healthy consented records survive a source failure, the stored ledger remains reportable with a clear partial-error indication, and failed positions can be retried without losing or duplicating calls.
索引モデルが issue の本文から書いたものです。
説明
Objective / Problem
A reader error aborts ingestion for every tool. A valid, consenting call from the healthy reader is not stored, and report cannot read the existing ledger because it first awaits ingestion.
Reproduction and observed behavior
Reproduced on next commit da3a99c5903f911df5e4e6201d946a28c7937efd, using the real normalizer/read/resolve/ingest use cases and the existing in-memory telemetry test ports. No provider or personal transcript is needed.
- Seed one valid Claude usage line and its consenting clone, using
InMemoryTranscripts,FakeLocator,FakeConsentsandInMemoryConsentHistoryfromcli/tests/helpers/ports/in-memory-telemetry.ts. - Register that reader alongside a second reader whose
execute()throwsEACCESafter the healthy read completes. - Execute
IngestUsageUseCase; compare with the same setup using an empty but healthy second reader.
| Case | Healthy records | Result | Ledger writes | Stored calls |
|---|---|---|---|---|
| Second reader fails | 1 | EACCES |
0 | 0 |
| Healthy control | 1 | success | 1 | 1 |
The synthetic assertions passed. Actual source opening/traversal also propagates EACCES; the Codex source integration suite explicitly tests that rejection.
Expected behavior / Proposed solution
Isolate source failures so valid, consented records from healthy sources can still be stored and the existing ledger remains reportable. Identify the failed source explicitly, preserve its retry position and never represent failure as zero usage. Do not weaken global consent validation.
Keep hook catch-up non-blocking, while making the failure diagnosable through the CLI. Choose and document whether containment is per tool, transcript or unreadable subtree.
Technical context
cli/src/contexts/telemetry/application/ingest-usage-use-case.ts: the readerPromise.allrejects before storage.cli/src/contexts/telemetry/application/read-usage-use-case.tsandinfrastructure/transcripts/transcript-files.ts: unreadable files/subtrees propagate errors.cli/src/contexts/telemetry/application/report/report-usage-use-case.ts: ingestion precedes reading the stored ledger.plugins/aidd-telemetry/hooks/catch-up.cjs: catch-up output/status is suppressed.
Related: #689 established reader failure isolation in the previous architecture; this is a reproducible defect in the replacement pipeline. #297 and #707 cover the broader source investigation and runtime evidence. No native OTel integration is required to fix this defect.
Acceptance / QA
- Readable Claude + failing Codex, and the reverse, preserve healthy consented records.
- An unreadable file/subtree has an explicit diagnostic and a documented containment boundary.
- Failed-source positions remain retryable; a later successful read neither loses nor duplicates calls.
- The existing ledger remains reportable with an explicit partial/source-error indication.
- Unknown counters, failed sources and genuine zero consumption remain distinct; consent still fails closed.
- Regression tests prove the failing cases and healthy controls without personal data or a provider call.
- 主要言語
- TypeScript
- スター
- 481
- フォーク
- 45
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 81
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ai-driven-dev/framework のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
ai-driven-dev/framework#1035 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
ai-driven-dev/framework#1002 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ai-driven-dev/framework#952 ·
メンテナーはふだん 1 日以内に返信
-
refactor(aidd-orchestrator): the check zone says when to stop, and reviews its axes in one roundオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ai-driven-dev/framework#887 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
ai-driven-dev/framework#1071 ·
メンテナーはふだん 1 日以内に返信
ai-driven-dev/framework の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
maniator/verticopolis#1303 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
components-web-app/docs#297 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
appwrite/mcp-for-docs#23 · コメント 1 件 ·
-
`@vanilla-extract/turbopack-plugin`: "getImageSize is not a function" with Next.js 16.4.x when a `.css.ts` file imports an image対応中かも @aevarOrigo が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vanilla-extract-css/vanilla-extract#1799 · コメント 1 件 ·
-
native
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
prime-radiant-inc/evener#4839 ·
メンテナーはふだん 1 日以内に返信