Prevent unfinished run windows from hiding standalone usage
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Problem
loadRunWindows in server/services/usageInteractiveScan.js uses now as the upper bound of every saved run without endTime. A stale, already-dead run can therefore suppress unrelated later standalone sessions in the same workspace. The interactive scan then advances its watermark past the excluded events, so a later correction to run metadata alone cannot recover them. Read-only source/ledger comparison attributed missing standalone counts to this behavior.
This is separate from #3211's historical run-lifecycle closure fix.
Chosen approach
Determine run ownership from existing authoritative process/runner lifecycle state. Keep demonstrably active windows excluded. Do not invent an end time, kill runs, or rely on an age-only heuristic. Treat ambiguous lifecycle windows as unresolved coverage and retain recoverable scan intervals instead of permanently advancing away from them.
Add an explicit date-bounded preview/replay for previously skipped intervals. Apply only provable missing attribution and preserve uncertain totals. Use existing scan/cursor and worker structures with bounded processing rather than a global runtime scan. Reuse compressed/archive source discovery from #15022 when available, but keep the raw-source regression and lifecycle fix independently testable.
Affected areas
server/services/usageInteractiveScan.js and its tests, the existing authoritative runner-state helper, usageBackfillWorker.js, and the existing reconciliation report/action.
Acceptance criteria
- An active run still excludes matching interactive events.
- A stale dead run with null endTime does not exclude unrelated later sessions in the same workspace.
- Unknown lifecycle state remains visible and recoverable instead of silently discarding coverage.
- Scan interruption/retry does not lose intervals or double count.
- Existing completed-window overlap behavior is preserved.
- Preview does not mutate live history; any repair is explicit, limited to proven attribution and idempotent.
- Tests use synthetic fixtures and do not invoke providers, alter live run records or execute a historical migration.
hardwareRequirements: []
Dispatch: model:heavy for lifecycle/accounting ownership; effort:high for active, unknown, dead and replay tests. Planner attribution is omitted because no verified planner-model identifier was supplied.
- Lingua principale
- JavaScript
- Stelle
- 38
- Fork
- 32
- Merge medio
- 32m
- PR unite (30g)
- 994
Preparare l'ambiente
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 atomantic/PortOS
-
Rebuild usage history from validated native sources with backup and rollbackForse già presa @picodot l’ha presa oggi. Apertaarea:devtools effort:high in-progress model:heavy plan planner:gpt-6-1-sol
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
atomantic/PortOS#15031 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
area:devtools bug decomposed effort:high epic model:heavy plan
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
atomantic/PortOS#15022 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di atomantic/PortOS
Issue simili
-
bug web-ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
jenkinsci/jenkins#27705 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
maproulette/maproulette-frontend#2978 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
live-codes/livecodes#1079 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
approved check:passed logos:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
I maintainer di solito rispondono entro 2 giorni