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

Aberta
#3,803 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Go
Estrelas
582
Forks
61
Merge médio
12h 47min
PRs com merge (30d)
137

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de chainloop-dev/chainloop

Todas as issues de chainloop-dev/chainloop

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.