indexer tests: no test pins recordCheckoutPublication's completion bound (cycle start after completion)
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
- 78/100
Direzione di ricerca
Leggi TestOwedEditCycleWindowOnACoarseClock e owedCycleWindowRefusal in internal/indexer/checkout_edit_path_test.go, quindi esamina recordCheckoutPublication in internal/indexer/checkout_receipt_accounting.go. Aggiungi una riga di test con inizio e disponibilità a 80 ms e completamento a 70 ms; dovrebbe essere rifiutata perché P non identifica il ciclo di aggiornamento del checkout. Conferma che il test fallisce se viene rimosso il limite di completamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up from the review of #1647 (for #1646). This is a test gap, not a product defect: the product enforces the bound today, but no test would notice if it stopped.
Symptom
PublicationPhaseRecord.recordCheckoutPublication records the P window only when origin <= cycleStarted <= completed. No test in the repo pins the upper bound, cycleStarted <= completed.
- A mutation that drops
!completed.Before(cycleStarted)from that condition passes every repo test: the checkout edit-path integration test,TestOwedEditCycleWindowOnACoarseClock, the receipt-accounting tests and the publication-tier test. - Under that mutation, the record accepts a checkout refresh cycle that starts after its ticket completed, and reports a P window that does not lie inside the ticket's life.
- The test helper
owedCycleWindowRefusaldoes not refusecycle_started > ticket_completeditself either. It refuses only a cycle that starts before the enqueue, a missing mark, a P that does not name the checkout refresh cycle, and a wall time that does not match. - The predicate the test used before #1647 had the same gap.
Where
internal/indexer/checkout_receipt_accounting.go:PublicationPhaseRecord.recordCheckoutPublication.internal/indexer/checkout_edit_path_test.go:TestOwedEditCycleWindowOnACoarseClockandowedCycleWindowRefusal(both added by #1647).
Evidence
- A probe recorded a cycle start at 80 ms after a completion at 70 ms. With the product as it is, the record keeps no P and the helper refuses with "P does not name the checkout refresh cycle". With the mutation, the record accepts it.
- So today the guarantee comes from the product's bound plus a monotonic clock, not from any test.
Fix direction
Either of these:
- Add one refused row to
TestOwedEditCycleWindowOnACoarseClock:started: 80ms, served: 80ms, completed: 70ms, refused with "P does not name the checkout refresh cycle". - Or add a
completed < startedrefusal toowedCycleWindowRefusal, with its own reason, and a row that exercises it.
The first is enough to kill the mutation. It is one row in a test file that #1647 adds, so do it after #1647 merges, or in that PR if it gets another push.
Done when
- Dropping the completion bound from
recordCheckoutPublicationfails a repo test.
Refs #1646, #1647
- 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 mcp
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/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 ·