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

Đang mở
#3,803 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/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ệ
go

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
582
Fork
61
Merge trung bình
12 giờ 47 phút
Pull request đã merge (30 ngày)
137

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của chainloop-dev/chainloop

Tất cả issue của chainloop-dev/chainloop

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.