Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#932 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
git, javascript, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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 (repositoryRootAbove stops at the worktree's .git file)
  • 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

  1. 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_id field (#695), and the per-worktree default was kept without a recorded decision.
  2. Whatever is chosen, a journal must outlive git worktree remove.
  3. A report run from any checkout of a repository counts the sessions of all its worktrees, still told apart by worktree_id.

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.ts catch-up), so those sessions are absent, not unattributed.
  • Committing journals is not an option: aidd telemetry on git-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

  1. In a repository with telemetry on, create two worktrees and run one session in each.
  2. From the main checkout, run aidd telemetry report: both sessions appear, told apart by worktree.
  3. git worktree remove one worktree, run the report again: its session still appears.

Relations

Field Value
parent #631
related #693, #695, #657, #707
主要言語
TypeScript
スター
481
フォーク
45
平均マージ
18時間 31分
マージ済み PR(30日)
108

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ai-driven-dev/framework のほかの issue

ai-driven-dev/framework の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。