Recover compressed and archived Codex usage with a bounded preview
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js, react
Direzione di ricerca
Start with the decomposed issues #15029, #15030 and #15031, then read server/services/usageReconciler.js, usageInteractiveScan.js, usageBackfillWorker.js, usageBackfill.js and usage.js alongside the existing usage routes and Usage page controls. Trace the current readers, workers and ledger repair structures, and review the tests for duplicate sources, interval boundaries, interrupted scans and live completion overlap. Done means bounded previews report coverage and ambiguity, while explicit apply repairs only provable differences idempotently; the parent issue spans several coordinated changes and requires accounting compatibility expertise.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The Codex usage readers in server/services/usageReconciler.js and usageInteractiveScan.js enumerate active .jsonl rollouts only. Native Codex also retains older sessions as .jsonl.zst and moves sessions under archived_sessions. Read-only investigation on macOS verified standard Zstandard files and successful integrity checks; the files were not deleted. An empty raw-file date range is therefore not proof that source history is absent. Session filenames encode start dates, so older-started sessions can also contain events within the requested interval.
Historical backfill cannot currently recover those sources. Blindly adding their cumulative totals would be unsafe because earlier run accounting and standalone scans may already have recorded some of them.
Chosen approach
Extend the shared Codex source discovery/parser to stream raw and native Zstandard rollouts from active and archived locations, extracting only the existing accounting metadata. Identify a logical session independently of path/compression form and deduplicate raw/compressed or moved copies. Use bounded worker concurrency and a small incremental file inventory keyed by identity, size and modification time; do not decompress all history on every live completion.
Extend the existing explicit historical-reconciliation action with a date-bounded preview. It must show source coverage, provable ledger differences and ambiguous overlap separately. Apply only corrections whose prior attribution and replacement can be established, with existing idempotency conventions. Preserve existing counts where prior billing is ambiguous, rather than assuming missing source classifications mean zero usage. Keep malformed/unreadable/unsupported sources visible. Do not invoke providers or restore full plaintext archives.
This is distinct from #8846, which concerns PortOS-owned CoS artifact retention rather than reading native Codex rollouts.
Affected areas
server/services/usageReconciler.js, usageInteractiveScan.js, usageBackfillWorker.js, usageBackfill.js, usage.js, the existing usage routes and Usage page reconciliation controls. Reuse existing readers, workers and ledger repair structures rather than introducing a parallel accounting store.
Acceptance criteria
- Synthetic raw, compressed, archived, moved and duplicate-copy sessions produce identical per-model counters exactly once.
- A session starting outside a selected date range but emitting inside it is included correctly.
- Malformed/truncated compressed input reports incomplete coverage and does not silently replace trustworthy ledger totals.
- Preview performs no historical writes, provider calls or full-history synchronous work; ordinary completion does not acquire a full-history decompression bottleneck.
- Apply is explicit, idempotent and limited to provable adjustments; unknown prior attribution remains unresolved and visible.
- Tests cover interrupted scans, source growth and a live completion overlapping a preview/apply without double counting.
- No migration automatically rewrites live history.
hardwareRequirements: []
Dispatch: model:heavy for source identity and accounting compatibility; effort:high for duplicate-source, interval and replay tests. Planner attribution is omitted because no verified planner-model identifier was supplied.
Decomposed into
- #15029 — Preview bounded Codex usage from raw, compressed and archived sources
- #15030 — Use shared Codex source discovery in live and historical accounting readers
- #15031 — Add explicit bounded Codex reconciliation preview and provable ledger repair
- Lingua principale
- JavaScript
- Stelle
- 38
- Fork
- 32
- Merge medio
- 35m
- PR unite (30g)
- 989
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
-
area: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 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:high model:heavy plan planner:gpt-6-1-terra tests
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
atomantic/PortOS#15028 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Prevent unfinished run windows from hiding standalone usageForse già presa @picodot l’ha presa oggi. Apertaarea:devtools bug effort:high in-progress model:heavy plan
atomantic/PortOS#15023 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di atomantic/PortOS
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Fei-Away/Codex-Dream-Skin#449 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
outline/outline#14489 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Claude Code plugin does not wire the edit-time Floor hookForse già presa @dgr8akki l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Administration: required plugin configuration field stays invalid after restoring its saved valueApertaneeds-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno