Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/hf_space/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python_version: "3.11"
app_file: app.py
license: cc-by-4.0
pinned: false
short_description: Interactive leaderboard for OpenChainBench crypto infra benchmarks
short_description: Live leaderboard for OpenChainBench benchmarks
---

# OpenChainBench leaderboard
Expand Down
14 changes: 12 additions & 2 deletions src/lib/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,12 @@ export const loadBenchmark = cache(async function loadBenchmark(
} catch {
// live spec collapsed with no cached value — placeholder below
}
const all = await loadAllBenchmarks();
// Safe fallback. The strict aggregator throws AllBenchmarksDraftError
// when the quorum guard trips, which would crash `next build` and any
// page that calls getBenchmark during a Prom blackout. The safe
// wrapper catches that throw and substitutes draft placeholders so
// the page still renders.
const all = await loadAllBenchmarksSafe();
return all.find((b) => b.slug === slug);
}
// The filtered cache throws when a live spec collapses to draft so the
Expand All @@ -430,7 +435,12 @@ export const loadBenchmark = cache(async function loadBenchmark(
const spec = specs.find((s) => s.slug === slug);
return spec ? overlayEditorial(result, spec) : result;
} catch {
const all = await loadAllBenchmarks();
// Safe fallback. The strict aggregator throws AllBenchmarksDraftError
// when the quorum guard trips, which would crash `next build` and any
// page that calls getBenchmark during a Prom blackout. The safe
// wrapper catches that throw and substitutes draft placeholders so
// the page still renders.
const all = await loadAllBenchmarksSafe();
return all.find((b) => b.slug === slug);
}
});
Expand Down
Loading