Secret filtering can block the CLI UI thread
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
### Describe the bug
Copilot CLI does secret scanning synchronously on the UI thread, which can freeze the TUI if taking too long. This can easily happen if the response objects are large because of the single threaded scanning. Also, scanning the response as structured objects with recursion is much slower than scanning by treating it as a single string.
In my situation, the freezing was worsened by the fact Copilot attempted to replay and submit past events when a session was resumed. Up to 500 events will be scanned for secrets at a time with scheduled batches, all happening on the UI thread and causing noticeable TUI freezing. What's more, if the remote submission fails, it will repeatedly scan the same 500 events for up to 5 times
### Affected version
1.0.64-3
### Steps to reproduce the behavior
Make some tool calls with large responses, and observe the TUI freezing
### Expected behavior
TUI shouldn't freeze regardless of the size of the responses or whether they are strings or structured data
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando il percorso sincrono di secret-scanning utilizzato dalla CLI UI e dal flusso di replay della ripresa della sessione e di invio in batch. Riproduci il blocco con risposte strutturate di grandi dimensioni e sessioni riprese, quindi verifica che la scansione non blocchi più la TUI e che gli invii falliti non eseguano ripetutamente la scansione degli stessi eventi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- shell
- Ambito
- cli, performance, security
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100