Repository navigation
fix(observe): preserve provider prices on planner and failed node events - #140
Conversation
Shashankss1205
left a comment
There was a problem hiding this comment.
Evaluation of 352b0e4: the producer changes preserve call-specific USD/model metadata on planner success and parse failures, and use one per-node usage snapshot on every terminal error path. Concurrent failed nodes no longer absorb sibling tokens. Nested planner tokens and prices remain counted once; missing prices and rate-card estimates remain separate.
Validation: 23 regression cases fail before the implementation; all 29 new cases pass afterward. The focused cost/planner/replay/budget/tenant run passes 265 tests. The integrated tree through #141 passes the full local default suite: 2,388 passed, 13 skipped and 13 paid tests deselected. Ruff/diff checks and an installed-wheel import walk pass. GitHub CI is still running/queued; no merge yet.
No blocking code findings in this scope. A separate reader-side issue found during follow-up is tracked in #142 and fixed by #143: a reported failed-call price must also survive when token metadata is absent.
|
Final merge check for 352b0e4: GitHub CI has passed all three full test jobs (Python 3.12, 3.13 and 3.14), lint, installed-distribution validation and the live-test opt-in guard. The schedule-only upstream-drift job is intentionally skipped for PRs. The reviewed head is unchanged. Merging with a normal merge commit to preserve the ancestry of the two follow-up PRs. |
Planner turns and failed graph nodes currently discard provider-reported USD even though tokens are recorded. Retain the call-specific price and model on planner events, including parse failures, and use the same per-node usage snapshot on successful and failed terminals. Failed parallel nodes now exclude their siblings’ token spend.
Keep missing prices missing and rate-card estimates separate from recorded bills. Preserve nested planner token deduplication and run/thread/tenant attribution without double-counting. Existing tenant assertions now check the corrected priced behavior; the unpriced loop case remains covered. Update the documented producer limit and selected-test figure.
Validation: 23 new regression cases failed against unmodified main; all 29 new cases pass with the fix. Targeted planner, budget, replay, tenant and documentation checks pass; ruff and diff checks are clean. Full local and GitHub CI results will be recorded before merge. No paid model calls.
Fixes #138.