fix(telemetry): isolate unreadable sources during ingestion and reporting
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 481
- Fork
- 45
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 82
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ai-driven-dev/framework
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ai-driven-dev/framework#1002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ai-driven-dev/framework#952 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactor(aidd-orchestrator): the check zone says when to stop, and reviews its axes in one roundĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ai-driven-dev/framework#887 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
ai-driven-dev/framework#1079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
ai-driven-dev/framework#1078 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ai-driven-dev/framework
Issue tương tự
-
[Bug]: Circular app layout navigation and help icons are shifted upward in the official demoĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
cloudscape-design/components#5184 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
JarX-Concepts/react-native-platform-components#130 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(api): optimize-for-web /preview outer catches miss asDecoderOutOfMemory on V8 OOM and SIGKILLĐang mởarea: backend bug priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
snapotter-hq/SnapOtter#3773 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa ux-audit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
linagora/twake-contacts-frontend#386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
git: README should state plainly that without --repository every reachable repository is in scopeĐang mởdocumentation server-git v2
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
modelcontextprotocol/servers#5225 ·
Maintainer thường phản hồi trong vòng 1 ngày