Show per-task token usage and reporting coverage - #16
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completed workflow results now show each model task's provider-reported prompt, completion and total token counts, together with reporting-call coverage. Partial categories display Unknown; historical receipts say that usage was not recorded. Saved results retain their original counts, human replies show no model usage, and final handoffs are displayed once.
Negotiate the native
agents.usagecapability and requestinclude_usage=trueonly when supported. Strict detached parsing verifies scalar counts, per-call coverage and matching handoff-final reports. Older hosts keep the existing result view; stale request cancellation and source-verifying result-read ordering remain intact. Native dependency: ProjectScone feature/workflow-token-usage at374de2d.Validation: 471 unit tests passed; strict TypeScript, production build and packaged-asset checks passed. Two packaged React → actual local Python API → encrypted journal/restart journeys passed in installed Firefox, desktop and390px mobile. They verify selected models, exact reported138 total, partial Unknown cells, two model tables/no human table, query negotiation and unchanged model-call count after result reads. Screenshots visually inspected; no horizontal overflow or browser errors. Independent review passed729 parser combinations, detached/frozen report checks, handoff agreement, legacy/default handling and stale-request review.
Counts are provider assertions for completed tasks, not billing totals, estimates or answer-quality scores. Scripted fixtures establish orchestration and rendering only. No shared live service changed, external model invoked or reference code copied.