bench/load: B/P phase mismatch reasons come out in map order, so accounting reasons and error text vary between runs
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
- 79/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- backend-api-design, testing
Direzione di ricerca
Leggi bench/load/edit_probe_evidence.go e segui come i motivi delle discrepanze vengono uniti nel testo dell'errore in edit_probe_run.go. Aggiungi un test usando una ricevuta con almeno tre giri P diversi; ripeti il controllo e verifica i motivi delle discrepanze ordinati e il testo dell'errore risultante dall'unione. Il lavoro è completato quando il test passa in modo costante e i golden file dei report restano invariati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up from the review of #1633 (closes #1632). The behaviour predates that PR and is on main. It does not block a release.
Symptom
checkEditProbeAccountingWithWaitDisposition (bench/load/edit_probe_evidence.go) compares every measured P lap with the same lap in B:
for name, value := range pPhases {
if value != nil && fmt.Sprint(value) != fmt.Sprint(bPhases[name]) {
fail("B/P phase mismatch: " + name)
}
}
pPhases is a map[string]any. When more than one lap differs, the B/P phase mismatch: <lap> reasons come out in Go's randomized map iteration order. On identical input this changes:
- the order of the edit record's
accounting.reasons; - the
A/P/B accounting unavailable: ...error text. That text isstrings.Join(reasons, "; "), built inedit_probe_run.goand in the coalesced, native no-op and functional-unavailable receipt paths.
Unaffected: verdicts and counts. The accounting state depends on whether any reason exists, not on the order of the reasons.
Affected:
- byte-level comparison of two reports;
- replay diffs;
- any test that compares a whole reasons slice with
DeepEqual.
Observed: we replayed one set of captured receipts twice through the same commit. The two sets of records differed only in the order of these reasons, on two polls. The tests added in #1633 are not exposed today, because their receipt fixtures carry null P laps and so never produce this reason.
Fix
Iterate the lap names in sorted order (for example slices.Sorted(maps.Keys(pPhases))), so the reasons and the joined error text are deterministic.
Optional, in the same function: the shared_owner_accounting_v* scan (for name := range status, which returns on the first match) names an arbitrary key when a status carries more than one such key. Sorting the keys there too would make that reason deterministic as well.
Done when
- A test feeds a receipt in which at least three P laps differ from B. It asserts the exact sorted
B/P phase mismatch:reasons and the joinedA/P/B accounting unavailable:text. It repeats the check enough times (for example 20 iterations) that map order would show. - Report goldens are unchanged.
Refs #1005, #1632, #1633
- 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
-
ci-tests mcp
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/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 ·