Commit graph

98 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
d026a5420b fix(scanner): rename plist parser module to avoid CI cycle false positive
Some checks failed
Deploy to Cloudflare Workers with Wrangler / Deploy (push) Has been cancelled
Run Node 24 Checks / build (24.x) (push) Has been cancelled
Madge treated the local plist parser module name as a circular dependency during the Netlify build lane after the TypeScript refactor. Rename the local module to plist-parser so the internal file no longer collides with the external plist package name, while keeping parser behavior unchanged.

Constraint: Must restore the deploy gate without changing parser semantics
Rejected: Disable the circular-dependency check | would hide a useful guard instead of fixing the naming conflict that triggered it
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Avoid naming local modules after direct external package imports when the repo relies on static dependency graph tooling
Tested: pnpm run typecheck; pnpm exec vitest run test/scanner/plist.test.ts test/scanner/file-api.test.ts test/scanner/client.test.ts test/prebuild/load-sitemap-endpoints.test.ts; pnpm run test-prebuild
Not-tested: Full production deploy completion before push
2026-04-04 18:31:46 -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
cd41143f0d refactor(scanner): type plist and file-api helpers
Convert the scanner's plist parser and Node-style file shim to TypeScript and add small unit tests so common parser and file-reader failures are caught before we need to lean on Playwright or the higher-level scanner test.

Constraint: Must preserve current scanner behavior while tightening the lowest-level helper surface
Rejected: Jump straight to Mach-O parser conversion | harder to isolate regressions without first proving the smaller helper-test pattern
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Add small module-level regression tests for repeatable scanner breakage before expanding browser coverage
Tested: pnpm run typecheck; pnpm exec vitest run test/scanner/plist.test.ts test/scanner/file-api.test.ts test/scanner/client.test.ts; pnpm run test; pnpm run test:browser
Not-tested: Production deploy behavior prior to push
2026-04-04 18:13:32 -05:00
ThatGuySam
689fc0d13d refactor(scanner): type the worker path and align app-test results
Move the worker scanner surface into TypeScript, add a direct worker regression, and make the version=2 app-test path populate the same visible result data and final status as the legacy scanner. This keeps the refactor bounded while making the worker route safe to exercise.

Constraint: Must preserve the existing Apple Silicon app-test behavior while changing the worker internals
Rejected: Flip production to the worker path immediately | still needs the normal deploy path and broader production soak
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: Keep the version=2 adapter using the shared finishFileScan path until the legacy scanner can be removed entirely
Tested: pnpm run typecheck; pnpm exec vitest run test/scanner/client.test.ts; pnpm run test:browser (original workspace); netlify build --context deploy-preview (original workspace)
Not-tested: Browser suite from the clean clone environment (local Astro dev server startup timed out there)
2026-04-04 14:58:25 -05:00
ThatGuySam
0480c47bbb test(playwright): lock browser coverage before scanner refactors
Add a typed Playwright harness for Pagefind and the Apple Silicon app-test flow so scanner work has browser-level protection. Keep the rollout plan in the same stack so the TypeScript conversion stays staged and reviewable.

Constraint: Must not change production runtime behavior in this commit
Rejected: Leave the old JS browser test and add a second harness | duplicates setup and leaves the targeted browser script broken
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep browser-only helpers under test/playwright/support until the runtime scanner surface is fully typed
Tested: pnpm run typecheck; pnpm run test:browser; pnpm run test:browser:pagefind
Not-tested: Live browser checks against doesitarm.com
2026-04-04 14:55:13 -05:00
ThatGuySam
3dcf7da638 test(search): add url-targetable pagefind browser regression
Cover the Native Support filter with a Playwright-backed Vitest case
that can boot the local dev server or attach to a deployed URL so the
same regression can gate post-deploy verification.
2026-03-15 19:27:25 -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
0a85f4d48d update: refactor main into vitest
Some checks failed
Deploy to Cloudflare Workers with Wrangler / Deploy (push) Has been cancelled
Run Ava Tests / build (14.x) (push) Has been cancelled
Run Ava Tests / build (15.x) (push) Has been cancelled
2025-02-10 20:27:05 -06:00
ThatGuySam
d94d48b6cd update: refactor into typescript 2025-02-10 19:19:12 -06:00
ThatGuySam
c16868da13 update: refactor assertions to work again
Some checks failed
Deploy to Cloudflare Workers with Wrangler / Deploy (push) Has been cancelled
Run Ava Tests / build (14.x) (push) Has been cancelled
Run Ava Tests / build (15.x) (push) Has been cancelled
2025-01-11 19:40:07 -06:00
ThatGuySam
0afc64c5e9 update: enable api client test again 2025-01-11 19:27:02 -06:00
ThatGuySam
a232a1b49d update: initial vitest refactor for listings 2025-01-11 19:19:45 -06:00
ThatGuySam
559e47c8fa update: enable helpers again 2024-12-27 15:25:57 -06:00
ThatGuySam
de1843c2bf update: add .test extension 2024-12-27 15:23:50 -06:00
ThatGuySam
411df75c52 update enable listings tests
Some checks failed
Deploy to Cloudflare Workers with Wrangler / Deploy (push) Has been cancelled
Run Ava Tests / build (14.x) (push) Has been cancelled
Run Ava Tests / build (15.x) (push) Has been cancelled
2024-12-27 15:19:56 -06: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
ThatGuySam
e54c0cdac1 Move msw listener to file 2023-08-12 16:14:45 -05:00
ThatGuySam
21c7b84747 Remove unused lines 2023-08-12 16:14:27 -05:00
ThatGuySam
d66e27db2e Fix protocol node: error from vite-node 2023-08-12 16:14:17 -05:00
ThatGuySam
81340c5e97 Add msw file server 2023-08-12 16:01:50 -05:00
ThatGuySam
c5f333483b Fix typos 2023-08-12 12:51:46 -05:00
Sam Carlton
f8ab305688 Increase sitemap difference threshold 2022-10-06 14:40:09 -05: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
8b15f2580b Pass all message details through receivers 2022-08-20 21:34:29 -05:00
Sam Carlton
d37603fcd5 Move scan business login into scan file 2022-08-07 14:33:58 -05:00
Sam Carlton
50e707a4ac Test using worker 2022-08-07 14:18:41 -05:00
Sam Carlton
ceba0cadaa Import vitest/web-worker 2022-08-05 14:10:31 -05:00
Sam Carlton
ffab2c6f67 Fix scanner cleint import 2022-07-21 22:14:14 -05:00
Sam Carlton
ca58913ccc Convertr scanner client to mjs 2022-07-21 21:52:12 -05:00
Sam Carlton
4d690b1856 Convert scanner test to module 2022-07-21 19:54:01 -05:00
Sam Carlton
31276924aa Add note about Coreform-Cubit 2022-07-18 21:38:15 -05:00
Sam Carlton
f98a3f7ae1 Add experimental 7z compressor 2022-07-18 21:23:21 -05:00
Sam Carlton
4b73486688 Delete existing archives 2022-07-18 21:22:48 -05:00
Sam Carlton
383a4b2730 Add notes on unsupported bundles 2022-07-18 21:21:53 -05:00
Sam Carlton
1f1adde7f9 Disable processorSubType test 2022-07-18 18:43:24 -05:00
Sam Carlton
e37d0418bd Use scan.supportedArchitectures getter 2022-07-18 18:43:12 -05:00
Sam Carlton
d9e37b473c Test that processorType is valid 2022-07-18 18:03:38 -05:00
Sam Carlton
b96353dc3c Expect processorSubType to be truthy 2022-07-18 16:55:44 -05:00
Sam Carlton
298436da95 Enable result info 2022-07-16 22:54:32 -05:00
Sam Carlton
70e72a86e4 Enable parsing macho file 2022-07-16 22:01:01 -05:00
Sam Carlton
33dbd93dec Test each app concurently 2022-07-16 18:46:09 -05:00
Sam Carlton
2a525d93d5 Test that App Scan can read plist 2022-07-16 18:37:42 -05:00
Sam Carlton
0372e8d019 Add artifacts temp directory 2022-07-16 14:48:19 -05:00