Repository navigation
fix(channels): repair NULL interval tier labels that broke the channel cache - #207
Merged
Merged
Conversation
…l cache Migration 260 inserted a long-context pricing interval without tier_label. The column is nullable, but the channel repositories scan it as text, so the channel cache and the admin channel pages failed in production. 261 stores '' like every other token interval, and the interval reads coalesce NULL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s the data Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Production incident after v0.2.8-codexrip.9: migration 260 inserted the gpt-5.6-luna long-context interval without
tier_label. The column is nullable, but the (upstream) channel repositories scan it into a string, so the channel cache failed to build (scan interval: ... converting NULL to string) and/admin/channelsreturned 500; group capacity projection fell back to unknown for groups whose channel lookup failed.tier_label = ''where NULL (channel and account-stats pricing intervals), matching what the admin API writes for token intervals. The upstream reads stay unchanged; 260 was the only writer of NULL.Verification
Local PostgreSQL 18.1 with a production-shaped database migrated to 260: before 261 one NULL interval; after 261 zero,
ListAllreturns 11 channels andListModelPricing(1)returns 9 entries with the interval intact.🤖 Generated with Claude Code