Rewind file tracking backs up gitignored secret files; add an exclude or an off switch
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
Direção de pesquisa
The report identifies enableFileChangeTracking as the interactive CLI entry point and session-state/<session-id>/rewind-file-snapshots/backups/ plus index.json as the affected output. Start by tracing how the CLI enables tracking and how the tracker selects and writes files; the issue does not name source files or tests. Done means secret-file backups can be excluded or tracking disabled, and backups use mode 600.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Version: Copilot CLI 1.0.91, Linux x64, interactive mode.
What happens
Since /rewind became git-free (1.0.78), the CLI saves the earlier content of every file that a turn changes under the session's working directory into session-state/<session-id>/rewind-file-snapshots/backups/. Gitignored files are included. When the agent edits a .env file in a turn (for example to rotate an API token), the old file, with every secret in it, stays in session state as a plain file at mode 644. It stays there after the session ends.
A session with one long autonomous turn has one snapshot, so every file that turn changes is held in that snapshot.
What I checked
copilot help config,copilot help environmentandcopilot --helpname no setting, flag or variable for rewind file tracking.respectGitignorecovers only the@file picker.- The interactive CLI starts each session with
enableFileChangeTrackingset totrueas a constant. Only SDK clients can pass the option. - The tracker skips a file only for its size, a non-regular file or an unverifiable identity. It does not skip files that
.gitignoreexcludes or files that hold secrets.
Steps to reproduce
- In a git repository, put
.env.localin.gitignoreand give it a line such asEXAMPLE_TOKEN=old-value. - Start
copilotin that repository and ask it to change the value tonew-valuewith a shell command. - List
session-state/<session-id>/rewind-file-snapshots/backups/. One file holdsEXAMPLE_TOKEN=old-value, andindex.jsonmaps it to.env.local.
Expected
A secret file that Copilot edits does not stay copied in session state. Any one of these would do:
- Skip files that
.gitignoreexcludes, or files that match.env*, when the tracker saves earlier content./rewindthen lists them as not restorable. - A setting, for example
rewind.excludePatterns, that takes path patterns the tracker skips. - A setting or flag that turns off file tracking, leaving conversation-only rewind.
Also: write the backups at mode 600, the same as the other session files.
- Linguagem predominante
- Shell
- Estrelas
- 11.3k
- Forks
- 2k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/copilot-cli
-
area:models area:sessions
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
github/copilot-cli#5189 · 1 reação ·
-
area:configuration area:input-keyboard
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
github/copilot-cli#5159 ·
-
area:sessions
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/copilot-cli#5147 · 1 comentário ·
-
area:input-keyboard
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
github/copilot-cli#5113 ·
-
area:sessions
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/copilot-cli#4996 ·
Todas as issues de github/copilot-cli
Issues semelhantes
-
uno-testing: the step-by-step procedure serializes tool use (1.7 vs 2.3 tools/call)Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
unoplatform/studio#200 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
phusion/passenger-docker#480 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
quickemu-project/quickemu#1963 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
source:reader type:enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
stephrobert/blog-roadmap#95 ·