fix(cline-cli): gate the rollup fallback on metrics presence, not emitted calls - #895
Closed
ozymandiashh wants to merge 1 commit into
Closed
fix(cline-cli): gate the rollup fallback on metrics presence, not emitted calls#895ozymandiashh wants to merge 1 commit into
ozymandiashh wants to merge 1 commit into
Conversation
…tted calls The rollup fallback fired whenever no call was yielded, but the shared seenKeys dedup runs before the emit, so a session directory whose internal session_id collides with an already-parsed one (a copied session dir) had every per-message call suppressed and then resurrected the same spend a second time through metadata.usage as <id>:rollup. Track whether any message carried metrics before the dedup check and gate the rollup on that instead; the emitted counter had no other consumer and is removed. The new test writes the duplicate-session_id layout with the rollup on the second-visited directory and fails against the old gate (verified: 1 failed / 33 passed pre-fix, 34 passed post-fix). Closes getagentseal#894
Member
|
Thanks for this, and sorry for the collision. I filed #894 and then landed the same fix in #896 (merged) a few minutes before this came in, so #894 is already closed with exactly this shape: Closing as a duplicate, no reflection on the work, our two fixes are the same. One thing yours does nicer: the |
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.
Closes #894 with exactly the shape the issue prescribes:
hadMetricsset before the dedup check gates the rollup, and the now-consumerlessemittedcounter is gone.Mutation check done as requested: the new duplicate-
session_idtest (rollup on the second-visited directory, which is the layout that distinguishes the two gates) fails against the oldemitted-based gate with 1 failed / 33 passed, and passes post-fix at 34/34. The fixture gained asessionIdInMetaoverride so a test can model a copied session directory without renaming it on disk.tsc --noEmitclean, no new dependencies. Built with the same review flow as #891: verified locally since CI does not run the suite.