Session usage: remaining follow-ups from #7862
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 28/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- full-stack
Línea de trabajo
Three separate deferred items. Start from getSessionUsage and the ledger repair path, where recordUsage (its messageId option) and settledInFlightKeys decide whether a settle double-counts. Item 2 is WorkspaceStore.refreshUsageAfterChange, which logs a failed refetch and stops. Item 3 is refreshSessionUsage, which is latest-wins rather than single flight. Each item needs its own test and its own definition of done; item 1 needs a new persisted ledger field.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Open items left from #7862 after #7865, #7866, #7867 and #7868 merged. Each one is rare, and none was seen in the 6,714 real ledgers checked for #7868.
- A settle counts a message twice after a locked repair, for a stream without an in-flight key. The stream has no key only when every one of its in-flight writes failed. Then
getSessionUsage(or a token-stats cache update) can rebuild an unusable ledger from history, which already holds the final message, and the later settle adds that message again. #7868 covers this window whenrecordUsagedoes the repair itself (itsmessageIdoption) and when the stream has an in-flight key (settledInFlightKeys). A fix must persist which messages the repair counted, so it needs a new ledger field. (Item 9 of #7862, deferred from #7868 review round 5.) - A failed
usage-changedrefetch is not retried. When a transientgetSessionUsageor ancestorgetSubagentUsageerror fails the refetch,WorkspaceStore.refreshUsageAfterChangelogs it and stops. The Costs tab stays stale until the next usage change, an activation, a Costs tab open or an activity resubscribe. Fix: retry with bounded backoff, or keep a per-workspace "refresh pending" flag until a fetch succeeds. (Deferred from #7867.) refreshSessionUsageis latest-wins, not single flight. A burst of usage writes on one shown workspace whose chat is not subscribed (for example headless records) costs onegetSessionUsageeach. Act on it when a profile showsgetSessionUsagebursts. (Deferred from #7867. #7870 tracks the projection side.)
Related: #7870 (projection refetch throttle), #7883 (removal loses a sub-agent's spend when the roll-up fails), #7884 (rebuild drops an in-flight settled marker when the scan fails).
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.1k
- Forks
- 139
- Merge medio
- 5 h 5 min
- PR fusionados (30 d)
- 923
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de coder/xum
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
🤖 fix: xum api exits 0 when a procedure returns success: falsePosiblemente ocupada @twotnguyen la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
coder/xum#7733 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
home-assistant/frontend#55841 ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
lingdojo/kana-dojo#33905 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug(semester-planning): the edit application dialog cannot save with an empty «Annet fra bedriften»Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
blocklist removal
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
MetaMask/eth-phishing-detect#311215 ·
Los mantenedores suelen responder en 1 día
-
Explore filter: multi-select value list with allowNewOptions stops accepting values and drops earlier onesPosiblemente ocupada @isaac-jaynes-imperva la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/superset#46146 · 1 comentario ·
Los mantenedores suelen responder en 2 días