Skip to content

version the snapshot keys, and stop the worker writing one by hand - #2887

Merged
Flotapponnier merged 1 commit into
mainfrom
hotfix/snapshot-keys
Oct 8, 2026
Merged

Flotapponnier merged 1 commit into
mainfrom
hotfix/snapshot-keys

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Cherry-picks #2886. Closes the gap #2885 exposed.

The Upstash reader serves a blob until it is ten minutes old, and one written under an older shape decodes with the new fields absent. The product dashboard's new timeframe control therefore spent six minutes rendering the 30d figures under all three labels — the fallback worked and the page still showed one number three ways.

hl-hip3 already versioned its key; hl-frontends and hl-builder had not. Both go to v2 so an old blob is unreachable rather than stale-but-readable.

The per-builder key was hand-written in three places, one of them in the worker. A bump that missed it would have had the two sides reading and writing different keys: the snapshot never hits, every render fans out ~13 Prom queries, and nothing looks broken. One exported helper now.

🤖 Generated with Claude Code

…2886)

The reader serves an Upstash blob until it is ten minutes old, and a blob
written under an older shape decodes with the new fields simply absent. When
the product dashboard's timeframe control shipped, that bought six minutes
where it rendered the 30d figures under all three labels. The fallback did
its job and the page still showed one number three ways, which is a quieter
wrong answer than an empty one.

hl-hip3 already had the convention and the other two had not followed it.
hl-frontends and hl-builder go to v2, so an old blob becomes unreachable
rather than stale-but-readable.

The per-builder key was also written by hand in two places in the reader and
a third in the worker. A bump that missed the worker would have left the two
writing and reading different keys, so the snapshot would simply never hit
and every render would go to Prom. It is one exported helper now.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Flotapponnier
Flotapponnier merged commit 3f68a01 into main Oct 8, 2026
2 checks passed
@Flotapponnier
Flotapponnier deleted the hotfix/snapshot-keys branch October 8, 2026 11:43
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