Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

fix(telemetry): isolate unreadable sources during ingestion and reporting

Abierto
#1,070 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

  1. Seed one valid Claude usage line and its consenting clone, using InMemoryTranscripts, FakeLocator, FakeConsents and InMemoryConsentHistory from cli/tests/helpers/ports/in-memory-telemetry.ts.
  2. Register that reader alongside a second reader whose execute() throws EACCES after the healthy read completes.
  3. 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 reader Promise.all rejects before storage.
  • cli/src/contexts/telemetry/application/read-usage-use-case.ts and infrastructure/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.
Lenguaje dominante
TypeScript
Estrellas
481
Forks
45
Merge medio
1 d 5 h
PR fusionados (30 d)
81

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ai-driven-dev/framework

Todos los issues de ai-driven-dev/framework

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.