Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

test: no test covers a sync-dispatch slot waiter whose request ends

Fechada Para iniciantes
#151 1 comentário 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
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
go
Domínio
testing

Direção de pesquisa

Comece por acquireConcurrencySlot em runtime.go e pelo teste existente TestConcurrentSlotWaiterAbandonedAtDetachTimeout. Adicione um caso de DispatchSync usando testing/synctest que mantenha ocupado o único slot e cancele o contexto da requisição do processo que está aguardando. O objetivo é que o handler não seja executado e que o abandono seja observável.

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

Descrição

enhancement ready-for-agent

No test covers a DispatchSync slot waiter whose request context ends while it waits for a concurrency slot.

What happens

The independent verifier of #150 changed the abandon branch of acquireConcurrencySlot (runtime.go#L1242) to wait for the slot and then return true. So a waiter whose context ended would still run its handler. #150's new test catches that under DispatchDeferred, where the context is the DetachTimeout one. Under DispatchSync the same branch serves a waiter whose request context ends, for example when the platform's client gives up. With the change in place, the root suite still passed, so nothing pins the sync path.

Possible fix

Add a DispatchSync test where the only slot stays held and the waiter's request context is cancelled. Assert that its handler never runs and that the abandon is observable. Use the same testing/synctest pattern as TestConcurrentSlotWaiterAbandonedAtDetachTimeout.

Owner and trigger

The coder/chat maintainer triages this. Add the test with the next change to the concurrent strategy.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh

Linguagem predominante
Go
Estrelas
2
Forks
0
Merge médio
7h 37min
PRs com merge (30d)
26

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 coder/chat

Todas as issues de coder/chat

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.