fix(trace): attribute shell changes in a mixed Copilot pre-tool batch

未關閉
#3,803 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
go

研究方向

Start by reading the shared pre-tool handler and the Copilot provider path that handles preToolUse batches; the issue does not name their files or tests. Trace how shell and file calls select snapshots, then check existing tests for mixed toolCalls[] batches. Done when one hook takes both snapshot types and shell changes in mixed batches are attributed to the AI.

由索引模型根據 Issue 內容生成。

描述

bug trace-provider

Copilot CLI sends the preToolUse hook as a batch of calls (toolCalls[]). The Trace pre-tool handler takes one kind of snapshot for each hook input: a worktree snapshot for a shell tool, or file snapshots for a file tool. When one batch holds both a file tool (create, edit, apply_patch) and a shell tool (bash, powershell), the Copilot provider snapshots only the files, so the changes of the shell command are not attributed to the AI.

In 52 real batches of Copilot CLI 1.0.109, no batch mixed the two kinds. The fix needs the shared pre-tool handler to take both snapshots for one hook.

Follow-up of #3800.

主要語言
Go
星號
582
分支
61
平均合併
12 小時 47 分鐘
30 天內合併 PR
137

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

chainloop-dev/chainloop 的其他 Issue

查看 chainloop-dev/chainloop 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。