Commit graph

23 commits

Author SHA1 Message Date
ThatGuySam
6cfbfbf530 Keep prod health checks and route fallbacks from failing on stale API entries
Add a Bun health script that exercises top-level, dynamic, and representative video routes against one or more hosts so prod regressions are visible from a single command.

Device pages now fall back to the bundled device list when the external API misses a slug, and orphaned tv slugs redirect to /benchmarks instead of returning a 500. Video fallback logic reuses the existing YouTube-to-listing builder so route reconstruction stays aligned with the current build logic.

Constraint: The external API host can lag behind the frontend build and omit per-slug JSON files that public routes still expect
Rejected: Import the generated video list directly | static/video-list.json is too large for a safe SSR fallback
Rejected: Leave missing tv routes as 500s | a stale public URL should degrade to a useful redirect instead of breaking the request
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: Keep route fallbacks tied to build-time artifacts from the same repo so frontend and fallback data stay in sync
Tested: bun scripts/health http://127.0.0.1:4322; vitest ./test/prebuild/config-node.test.js ./test/prebuild/site-listings.test.js; pnpm run netlify-build
Not-tested: live production deploy before push
2026-04-06 10:51:49 -05:00
ThatGuySam
820e495d2d Keep redirect lookups from crashing SSR pages
Dynamic Astro routes were reading Netlify redirect config through a cwd-relative path, which is fragile inside a serverless runtime and was taking detail pages down with 500s before render.

Resolve netlify.toml by searching from the module directory and current working directory, and fail open in request-time redirect lookup so a config read problem does not block page rendering.

Constraint: Netlify serverless cwd is not guaranteed to be the repo root
Rejected: Inline redirects into route modules | would duplicate platform config and drift from source of truth
Rejected: Leave redirect lookup hard-failing | one config read failure should not take down unrelated pages
Confidence: medium
Scope-risk: narrow
Reversibility: clean
Directive: Keep redirect config lookup independent of process cwd anywhere server code reads deploy config files
Tested: vitest ./test/prebuild/config-node.test.js; pnpm run netlify-build
Not-tested: live Netlify production deploy before push
2026-04-06 10:31:57 -05:00
ThatGuySam
f1cb66c477 fix(build): retry transient sitemap endpoint fetches
The TypeScript helper refactor exposed a separate production risk: builds can fail when the sitemap-endpoints API returns a transient 5xx during Pagefind index generation. Move that fetch into a small helper with retry logic and add a focused prebuild test so this failure mode is caught without waiting on a full deploy.

Constraint: Must keep Pagefind index generation behavior the same when the endpoint is healthy
Rejected: Ignore the failure as external-only | transient 5xx responses can still block deploys and CI repeatedly
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: When external build inputs can fail transiently, add a small retryable helper plus a direct test before relying on full deploy verification
Tested: pnpm exec vitest run test/prebuild/load-sitemap-endpoints.test.ts; pnpm run typecheck; pnpm run test-prebuild
Not-tested: Full production redeploy completion before push
2026-04-04 18:18:23 -05:00
ThatGuySam
e1da6eb880 feat(search): add pagefind provider support
Add Pagefind indexing and browser search adapters behind a provider switch.

This lets prebuild generate either Stork or Pagefind search artifacts and lets the existing search UI run against Pagefind while preserving scoped filters, excerpts, and result metadata.
2026-03-15 13:42:07 -05:00
ThatGuySam
727f84e4c2 refactor(search): extract shared filter helper
Share filter parsing and provider mapping logic between Stork and upcoming search adapters.

This keeps the existing Stork API stable while adding Pagefind-oriented filter serialization under test.
2026-03-15 13:41:33 -05:00
ThatGuySam
1c2ce65f7d test(stork): cover node 22 runtime detection
Add focused regression tests for the environment helper and Stork binary target selection so the Ubuntu 24 and Apple Silicon path stays protected.
2026-03-15 11:58:05 -05:00
ThatGuySam
48be5593d3 update: refactor primary prebuild tests to vitest 2024-12-27 15:07:28 -06:00
ThatGuySam
bff6fd4494 update: refactor filters test to vitest 2024-12-27 15:04:46 -06:00
ThatGuySam
fddfa9d5a4 update: disable ava test suites 2024-12-27 14:48:54 -06:00
Sam Carlton
c45a3e5275 Add colon to allowed characters 2022-10-03 16:06:22 -05:00
Sam Carlton
7f55f6f80f Add plus to allowed title characters 2022-10-03 16:01:54 -05:00
Sam Carlton
25708dccae Enable setting filters via string 2022-06-05 10:28:34 -05:00
Sam Carlton
62401d1f76 Add support for updating existing filters 2022-06-04 19:49:36 -05:00
Sam Carlton
be18f711d6 Add suppor for underscores in filter values 2022-06-04 19:13:57 -05:00
Sam Carlton
127d6db399 Enable toggleable filters class 2022-06-04 18:27:39 -05:00
Sam Carlton
f2dc9488d8 Include hasPreviousPage in test 2022-06-03 19:08:29 -05:00
Sam Carlton
f838955dc3 Add hasNextPage to pagination 2022-05-20 14:39:09 -05:00
Sam Carlton
ae0be1b78f Test that last page can have less than the rest 2022-05-18 17:24:59 -05:00
Sam Carlton
fef9002c8f Add paginate test 2022-05-18 17:06:04 -05:00
Sam Carlton
2d7ab15978 Move listings to their own directory 2022-04-30 15:03:01 -05:00
Sam Carlton
972aca20bd Disable logger 2022-04-30 14:50:21 -05:00
Sam Carlton
323f0d0d6b Add support for listing head markup 2022-04-30 14:47:44 -05:00
Sam Carlton
3797250254 Enable multiple prebuild files 2022-04-30 14:45:09 -05:00