Keep JSONRPC output backpressure outside configuration and deduplication locks
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- rust
- Domínio
- api, backend, performance, testing
Direção de pesquisa
Start by reading crates/pet-reporter/src/cache.rs, crates/pet/src/jsonrpc.rs, and crates/pet-jsonrpc/src/lib.rs, then review the transport seams from #529/#532 and generation semantics from #536. Validate the design with controlled slow-consumer tests; done means bounded output buffering, correct generation and ordering behavior, explicit failures, and coverage for saturation, closed output, and shutdown.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Tracking plan: #528
Priority: P2. Evidence: lock scopes confirmed by source inspection; reproduce impact with controlled slow-consumer tests.
Problem
The deduplicating reporter invokes its downstream reporter while holding the manager/environment map write lock. The generation-guarded reporter holds the configuration read lock through notification reporting. The downstream JSONRPC writer synchronously writes/flushes stdout.
A slow or disconnected consumer can therefore couple transport I/O to discovery deduplication and configuration publication. The audit does not claim a measured production deadlock; the first task is to prove the coupling and required ordering with deterministic tests.
Sources: deduplicating reporter, generation reporter, framed output.
Scope
Separate deduplication and generation decisions from blocking output. Evaluate a bounded single-writer queue or equivalent narrow transport boundary; do not replace lock contention with an unbounded memory queue. Define exactly where generation checks occur and how notification/reply ordering is guaranteed when configure races with queued output.
Make serialization/write/flush failures explicit and preserve stdout as framed protocol output only. Rename CacheReporter around deduplication if the type is changed, and retain only the data its behavior needs.
Acceptance criteria
- A controllably blocked output sink cannot hold the configuration or deduplication locks for the duration of the write.
- Tests cover slow consumers, closed output, queue saturation, and shutdown with pending notifications.
- Stale-generation notifications are suppressed at the documented publication boundary, including configure racing with queued output.
- Environment/manager deduplication remains atomic; a refresh reply cannot overtake the notifications it is defined to complete.
- Concurrent replies/notifications remain correctly framed, with bounded buffering and explicit error propagation.
- #531/#533 show no regression in complete-inventory correctness, first-result latency, or resource bounds.
Dependencies
Depends on #536 for generation/snapshot semantics and #533 for slow-consumer/resource validation. Build on the transport seams from #529/#532. Coordinate with bounded scheduling #539 rather than introducing a second conflicting queue policy. The complete sequence is in #528.
- Linguagem predominante
- Rust
- Estrelas
- 207
- Forks
- 45
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 16
Preparar o ambiente
Ainda não verificamos os arquivos de configuração deste projeto. Comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
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 microsoft/python-environment-tools
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
microsoft/python-environment-tools#537 ·
Mantenedores costumam responder em até 1 dia
-
debt
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
microsoft/python-environment-tools#538 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
microsoft/python-environment-tools#539 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
microsoft/python-environment-tools#533 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
debt
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
microsoft/python-environment-tools#534 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de microsoft/python-environment-tools
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
-
area: cli bug priority: P2 ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia