Phase 1 aggregate broadcast (VPS-served): worker → static JSON + revalidate hook#1300
Merged
Conversation
…ate/latest.json after tier A + revalidate hook (gated on AGGREGATE_OUTPUT_PATH)
This was referenced Jul 18, 2026
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.
Self-hosted variant of the SRH replacement roadmap (pivoted from #1297 which used Vercel Blob).
What this PR does
worker/publish-aggregate.ts(new): after each Tier A sweep, reads back all 68 unfiltered bench snapshots from Redis via TCP direct (never SRH), assembles a{ v, builtAt, benches[] }envelope, atomic write to${AGGREGATE_OUTPUT_PATH}/latest.json(write to.tmpthenrenameso readers never see torn snapshots).worker/index.ts: callspublishAggregate(specs)after tier A. No-op unlessAGGREGATE_OUTPUT_PATHis set — staged rollout.src/app/api/internal/revalidate-aggregate/route.ts(new): POST endpoint, bearer token viaREVALIDATE_TOKEN(timing-safe compare), callsrevalidateTag('bench-aggregate', 'default').Why VPS-served (not Vercel Blob)
kv.openchainbench.com— one config, one TLS certZero user-visible effect until env is provisioned
Site's read path unchanged (still
loadAllBenchmarksSafe→ Redis via SRH). Worker gains one atomic file write and one HTTP POST per cycle. Both fail-soft.Follow-up ops (I'll do these myself after merge)
aggregatematcher to/opt/ocb/Caddyfile(path-based route onkv.openchainbench.com/aggregate/*→ static file server)/data/state/aggregatein worker + caddy containers via docker-compose