mcp tests: bound and back off the follow-up re-read loop in verifyOwnCaller
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 74/100
Direzione di ricerca
Leggi internal/mcp/shared_file_receipt_followup_test.go, concentrandoti sul ciclo for {} in sharedReceiptFixture.verifyOwnCaller, quindi confronta il suo comportamento di ritentativo con le funzioni helper recovered in relation_freshness_watched_matrix_test.go e read_built_projection_retirement_test.go. Aggiungi un limite contenuto ai tentativi e un'attesa tra un tentativo e l'altro, con un messaggio di errore specifico per gli storm. Esegui TestSharedReceiptFollowupVerifiesOriginalReceipt e verifica che le letture durante gli storm siano limitate, mentre le etichette in sospeso senza spiegazione continuino a causare un errore tempestivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up from the review of #1635 (for #1634). This is test hygiene and does not block that PR.
Symptom
#1635 adds a re-read loop to the follow-up check. A reply whose only gap is a pending label for main.go is read again when a new watcher generation was witnessed during that read. The loop has no attempt bound and no backoff, so if every read witnesses another generation (a catch-up storm), only the shared 5 s deadline stops it.
A probe injected a newer generation into every reply's label:
- the loop issued 5,943 to 7,373
get_callersreads in 4 to 5 s; - it then failed with
follow-up caller response was refused, untyped or truncated, the server's refusal at the deadline, so a triager sees a refusal rather than a storm; caught_up_generationsin the test evidence grew without bound, to 7,373 entries in one record;- in the four-edits-per-second workload, the spin would spend deadline time that later rows share.
A stuck label still fails at once, because each re-read needs a newly witnessed generation. So this is about load and diagnosability, not a false pass.
Where
internal/mcp/shared_file_receipt_followup_test.go: thefor {}loop insharedReceiptFixture.verifyOwnCaller, as added by #1635. It is reached fromTestSharedReceiptFollowupVerifiesOriginalReceiptand throughsharedReceiptFixture.verifyRefusedCallers.- For comparison, the
recoveredhelpers apply the same rule with a bound, and fail withreplies after publication kept admitting catch-up generations:watchedMatrixFixture.recovered(relation_freshness_watched_matrix_test.go), 3 attempts;readBuiltRetirementFixture.recovered(read_built_projection_retirement_test.go), 5 attempts.
Evidence
- Across 2,200 stress runs of the follow-up test with #1635 applied, 31 runs took the re-read path. Each needed exactly one caught-up generation, so a small bound would not have failed any of them.
- The same storm probe against the matrix
recoveredhelper failed after 3 reads, with the storm message. - Every re-read reuses JSON-RPC id
600+ordinal, and the evidence keeps only the last reply. The pending reply that triggered a re-read is lost; only its generation number survives.
Fix direction
- Bound the loop at a small number of attempts, such as 3 to match the matrix helper.
- Back off between re-reads instead of re-issuing immediately: for example, wait until the witnessed generation has published, or sleep briefly.
- When the bound is hit, fail with a message that names the storm, such as "kept admitting catch-up generations".
- Keep the final-state assertion unchanged. The last reply must be fresh and carry exactly one own edge at the physical line within the shared deadline, and a pending label that no generation explains must still fail on the first read.
- Optional, in the same change: use a distinct request id per attempt, and keep the first pending reply's freshness block in the evidence.
Done when
- The storm case fails within the bound, with a storm message, after a bounded number of reads.
- A stuck or unexplained pending label still fails on the first or second read, as today.
- Only test files change.
Refs #1634
- Lingua principale
- Go
- Stelle
- 1.9k
- Fork
- 171
- Merge medio
- 12h 43m
- PR unite (30g)
- 347
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di zzet/gortex
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
ci-tests worktrees
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug ci-tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
OneBusAway/watchdog#470 ·
I maintainer di solito rispondono entro 1 giorno
-
area: session
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
charmbracelet/crush#4484 ·
I maintainer di solito rispondono entro 1 giorno
-
accepted good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
-
[Resource]: HearthApertaresource-submission validation-passed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
hesreallyhim/awesome-claude-code#3713 · 1 commento ·