Workspace removal deletes a sub-agent's spend when the usage roll-up fails
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Start in the workspace removal path of src/node/services/workspaceService.ts, where rollUpUsageIntoParent and rollUpTimingIntoParent are called before the child's session folder under ~/.xum/sessions is deleted. Trace how getSessionUsage errors are caught and logged, then make a roll-up throw in a test to reproduce the lost session-usage.json. Done when a failed roll-up no longer deletes the only copy of the child's spend, either by retrying once or by keeping the usage file, and a test covers that path. Pick an option with a maintainer first, since the issue lists two.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When workspace removal cannot roll a sub-agent's usage into its parent, Xum still deletes the sub-agent's session folder. The parent then loses that sub-agent's spend for good.
Where
WorkspaceService removal path (src/node/services/workspaceService.ts, the rollUpUsageIntoParent call). A failure in getSessionUsage or rollUpUsageIntoParent (for example a one-time EIO) is caught and logged with log.error("Failed to roll up child session usage into parent"). Removal then continues and deletes ~/.xum/sessions/<child>/, which holds the only copy of session-usage.json.
The timing roll-up just above it (rollUpTimingIntoParent) has the same shape.
Expected
A failed roll-up does not destroy the only copy of the child's spend. Options:
- Retry the roll-up once before deleting the folder.
- Keep the child's usage file (or move it under the parent) when the roll-up fails, so a later read can fold it in.
Context
Found during #7862 follow-up work (a prep owner on #7868 reported it). It does not fail a user action, so it was out of scope there. The behavior exists on main today (96a0916ecc).
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Lingua principale
- TypeScript
- Stelle
- 2.1k
- Fork
- 139
- Merge medio
- 4h 38m
- PR unite (30g)
- 926
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna 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 coder/xum
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
🤖 fix: xum api exits 0 when a procedure returns success: falseForse già presa @twotnguyen l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
duolicious/duolicious#1943 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
nightly-labs/openbot#6451 ·
I maintainer di solito rispondono entro 1 giorno
-
complexity: easy good first issue impact: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ueberdosis/hocuspocus#1211 ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
redhat-developer/rhdh-plugin-export-overlays#4733 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
S-Needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni