fix(aidd-telemetry): a session run in a git worktree is missing from every report outside that worktree, and lost when the worktree is removed
Los mantenedores suelen responder en 1 dí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
- git, javascript, typescript
- Área
- cli, observability, tooling
Línea de trabajo
Start by reading cli/src/kernel/paths.ts, cli/src/kernel/reading/repository-root.ts, and plugins/aidd-telemetry/hooks/lib/repo.cjs, then review the related issues cited in the proposal. Trace how reports read journals through read-local-cost-use-case.ts and report-cost-use-case.ts. Done means the QA steps pass: reports from any checkout include every worktree, and a removed worktree's session remains visible.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
A session run in a git linked worktree is missing from aidd telemetry report run anywhere else, and is lost for good once the worktree is removed.
The hook writes the run journal under the worktree's own aidd_docs/runs/ (git rev-parse --show-toplevel). The CLI reads only the journal of the checkout it runs in, and the sink is filled only from that journal. aidd telemetry on git-ignores aidd_docs/runs/, so git worktree remove deletes the journal with the worktree.
Affected file(s)
cli/src/kernel/paths.ts(resolvedRunsDir)cli/src/kernel/reading/repository-root.ts(repositoryRootAbovestops at the worktree's.gitfile)plugins/aidd-telemetry/hooks/lib/repo.cjs(journal anchored at--show-toplevel)
Expected behaviour
A session run in any worktree of a repository appears in a report run from any checkout of that repository, and still appears after that worktree is removed.
Observed behaviour
One repository, three active worktrees, one Claude Code session each:
| Session | session_start in its worktree journal |
Records in the sink |
|---|---|---|
| A | yes, with worktree_id |
0 |
| B | yes, with worktree_id |
695 (a report was run from B) |
| C | yes, with worktree_id |
0 |
A report from the main checkout sees none of them. Removing the worktree of A or C now leaves no journal to recover their cost from; the transcripts remain but nothing names them.
Proposed solution
- Decide where a worktree's journal lives, or how a report gathers every worktree's journal, and write the decision down. #693 raised this choice; #706 closed it by delivering the
worktree_idfield (#695), and the per-worktree default was kept without a recorded decision. - Whatever is chosen, a journal must outlive
git worktree remove. - A report run from any checkout of a repository counts the sessions of all its worktrees. Only the cumulative figure is reported:
worktree_idstays in the journal, and the report adds no worktree axis (the task, backlog, flow and agent axes already answer what a piece of work cost).
Context / Technical constraints
- #693 assumed "sessions from worktree B still contribute their tokens, the sink pools everything, they read as unattributed". That no longer holds: the sink is filled only through the current checkout's journal (
read-local-cost-use-case.ts,report-cost-use-case.tscatch-up), so those sessions are absent, not unattributed. - Committing journals is not an option:
aidd telemetry ongit-ignores them on purpose (telemetry-on-use-case.ts). - Agent runners (Orca, Claude Code under
.claude/worktrees/) give each agent its own worktree, so this is the common case, not an edge case.
Environment
| AI tool | Claude Code 2.1.283 |
| aidd-cli version | 5.4.0 |
| OS | Windows 11 Pro (10.0.26100) |
| node | 24.12.0 |
| aidd-telemetry | 0.2.0 |
QA
- In a repository with telemetry on, create two worktrees and run one session in each.
- From the main checkout, run
aidd telemetry report: both sessions appear. git worktree removeone worktree, run the report again: its session still appears.
Relations
| Field | Value |
|---|---|
| parent | #631 |
| related | #693, #695, #657, #707 |
- Lenguaje dominante
- TypeScript
- Estrellas
- 481
- Forks
- 45
- Merge medio
- 19 h 7 min
- PR fusionados (30 d)
- 60
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ai-driven-dev/framework
-
fix(aidd-context): the memory README links 404 on WindowsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ai-driven-dev/framework#986 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ai-driven-dev/framework#952 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ai-driven-dev/framework#940 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
refactor(aidd-orchestrator): the check zone says when to stop, and reviews its axes in one roundAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ai-driven-dev/framework#887 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ai-driven-dev/framework#873 ·
Los mantenedores suelen responder en 1 día
Todos los issues de ai-driven-dev/framework
Issues similares
-
bug confirmed perf
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
videojs/video.js#9400 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
good first issue hacktoberfest
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
HelpCode-ai/anythingmcp#996 ·
Los mantenedores suelen responder en 1 día
-
Add: CanalPlusActionEurope.nlAbiertocheck:passed streams:add
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
beta technical-medium ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
walletbeat/walletbeat#1625 ·
Los mantenedores suelen responder en 1 día
-
[Good First Issue]: Add unit tests for NetworkVersionInfoPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoGood First Issue hacktoberfest
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
hiero-ledger/hiero-sdk-js#4489 ·
Los mantenedores suelen responder en 1 día