Repository navigation
fix(migrate): skip imported answers without usage in the usage backfill - #165
Merged
Merged
Conversation
Answers imported from 0.5.3 can lack a usage record. The 0013-session-usage step read their token counts and stopped, and the Admin portal's daily chart dropped every session holding one. Both now skip them as no spend.
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.
Deploying 1.3.0-beta.0 stopped at
mikan migrate: step0013-session-usagefailed withCannot read properties of undefined (reading 'input'), and the deploy rolled back to 1.2.2.Cause
Some answers imported from 0.5.3 have no
usagerecord (on the deployment: 144 of about 197,000 assistant answers, all without a stop reason). The backfill added their token counts. The Admin portal's daily chart reads the same answers throughSessionStore.ownResponseUsage, so a session holding one was silently left out of the chart.Change
Both readers skip an assistant answer without a usage record, counting it as no spend. The step's partial run is safe to repeat: sessions it already recorded carry
importedUsageand are skipped.Verification
Not on the Slack message path (migration step and Admin portal), so CI only.