Conversation
Add the gent:session-cost:delegated/v1 codec (whitelisted, bounded, never throws) and mergeSessionCost, so the orchestrator total and the subagent total combine without losing provenance.
…ension Add RunnerHooks.onUsage and publish the delegated total on the versioned topic, derived from store.list so it survives the card's finished-row TTL. Failures stay silent and never interrupt the agents flow.
…rker The shell subscribes to the delegated topic and folds it into costTotal, caching both halves and refreshing the orchestrator total on turn_end, agent_end and session_tree so render never scans session entries. The trailing + marker is opt-in and applies to the bar and header only; the agents card and view keep today's formatCost output.
On resume the delegated total is published while the TaskStore restores, before the shell's session exists, and was never re-published, so the bar showed the orchestrator-only total. Re-publish after session_start (once every handler has run) and gate the shell subscriber on the live context, stashing a payload that arrives before session_start.
…nner Drop the RunnerHooks.onUsage seam so I2 touches no agent-runner internals: the publisher runs from the agents extension's existing one-second clock (plus store summary events), which keeps the whole I2 diff to pure libs and the two core adapters.
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.
Chain Context
upstream/statistics-tracker→ upstream integration PR Gentleman-Programming#1627 (draft)upstream/statistics-02-no-cost-coercionupstream/statistics-02-no-cost-coercionChain Overview
Scope
upstream/statistics-02-no-cost-coercionis a branching bug, not a scope surprise.Verification
Focused and affected suites are green on this slice; tests and docs for this unit ship with it.