From 36bc00a5d190ebb85d14118a46658013bbd310c1 Mon Sep 17 00:00:00 2001 From: Florent Tapponnier Date: Wed, 8 Jul 2026 23:41:40 +0200 Subject: [PATCH] prod gate: alternatives built on gated benches out of prod listings --- src/lib/alternatives.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/alternatives.ts b/src/lib/alternatives.ts index a147704d..dffcf322 100644 --- a/src/lib/alternatives.ts +++ b/src/lib/alternatives.ts @@ -14,6 +14,7 @@ import { cache } from "react"; import yaml from "js-yaml"; import { z } from "zod"; import { loadBenchmark } from "@/lib/spec"; +import { REMOVED_BENCH_SLUGS } from "@/lib/removed-benches"; import type { Benchmark } from "@/types/benchmark"; const ALT_DIR = path.join(process.cwd(), "alternatives"); @@ -72,6 +73,14 @@ export const loadAllAlternatives = cache(async (): Promise => { ); return parsed .filter((a): a is Alternative => a !== null && a.status === "live") + // Prod-only gate: alternatives built on staging-pipeline benches + // never reach the prod listing, sitemap or tag clouds (the page + // itself already 404s there because the bench spec is filtered). + .filter( + (a) => + process.env.VERCEL_ENV !== "production" || + !REMOVED_BENCH_SLUGS.has(a.benchmark), + ) .sort((a, b) => a.target_product.localeCompare(b.target_product)); });