Skip to content

fix(channels): repair NULL interval tier labels that broke the channel cache - #207

Merged
HTExplicit merged 2 commits into
mainfrom
fix/channel-interval-tier-label
Sep 25, 2026
Merged

HTExplicit merged 2 commits into
mainfrom
fix/channel-interval-tier-label

Conversation

@HTExplicit

@HTExplicit HTExplicit commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

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/channels returned 500; group capacity projection fell back to unknown for groups whose channel lookup failed.

  • Migration 261 sets 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, ListAll returns 11 channels and ListModelPricing(1) returns 9 entries with the interval intact.

🤖 Generated with Claude Code

Codex and others added 2 commits September 26, 2026 01:25
…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>
@HTExplicit
HTExplicit merged commit d61ec56 into main Sep 25, 2026
22 of 23 checks passed
@HTExplicit
HTExplicit deleted the fix/channel-interval-tier-label branch September 25, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant