fix(telemetry): isolate unreadable sources during ingestion and reporting
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 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 小时
- 30 天内合并 PR
- 81
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 一周以上 新手友好度 35/100
ai-driven-dev/framework#1071 ·
维护者通常 1 天内回复
查看 ai-driven-dev/framework 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
chaitin/MonkeyCode#1437 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
carbon-design-system/carbon-ai-chat#2615 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 76/100
redhat-developer/rhdh-plugin-export-overlays#4486 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offline可能已有人在做 @r2jaff 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
ComposioHQ/composio#5054 ·
维护者通常 1 天内回复