Site Health Test
Client-side test runner that checks all Arcturus-Prime pages, APIs, assets, and SEO files for broken responses
Site Health Test
The site health test at /admin/site-test is a client-side test runner that fires HTTP requests at every known page, API endpoint, static asset, and SEO file on the site. It runs entirely in the browser, using the same auth context as the logged-in admin, and reports results in real time.
14 test suites. 82 individual checks. Parallel execution at 6 concurrent requests. Color-coded results: green for pass, amber for warnings, red for failures.
Test Suites
1. Core Pages
10 tests covering the primary public pages: home, about, contact, status, architecture, ask, homelab, telemetry, workflows, and the custom 404 page. All expect HTTP 200.
2. Blog & Content
6 tests for content listing pages: blog index, journal index, projects, resources, tags, and the RSS feed. All expect HTTP 200.
3. Documentation
8 tests covering the docs index plus 7 representative doc sub-pages across different sections (welcome, tech stack, command center, view transitions, storage, tendril graph, CF performance). All expect HTTP 200.
4. Learning & Playground
2 tests: the learn index and the playground index. Both expect HTTP 200.
5. User Portal & Dashboard
3 tests for user-facing pages: user portal, dashboard, and dashboard customization. The user portal and customize page accept either 200 or 302 (redirect to login when unauthenticated).
6. Command Center
1 test for the command hub at /command/. Expects HTTP 200.
7. Auth
2 tests for login and logout pages. Both accept 200 or 302 since they may redirect depending on auth state.
8. Ansible
3 tests: Ansible docs, help, and sandbox pages. All expect HTTP 200.
9. Health & Status APIs
4 API tests for public health endpoints: cache status (accepts 200 or 503), lab engine health, AI services status, and auth identity (/api/auth/me). All are same-origin API calls.
10. Auth-Protected APIs
5 API tests for endpoints that require authentication: federation health, playground health, auth roles, dashboard services, and CF pages. Each accepts 200 (authenticated) or 401 (unauthenticated). Since the test runs from an admin session, these should return 200.
11. Admin Pages
18 tests for every admin route: index, chat, cloudflare, content lab, homelab, jobs, openclaw, pentest, settings, site-test (self-referential), build swarm, docs hub, servers, API dashboard, workbench, RAG, security, and LinkedIn studio. Each accepts 200 or 403 depending on whether CF Access grants access.
12. Admin API Endpoints
5 API tests for admin-only endpoints: content index, cloudflare status, dashboard profiles, argonaut status, and argonaut models. The argonaut status endpoint additionally accepts 500 or 503 since it depends on an external service.
13. Static Assets & Images
12 tests for files that must exist at exact paths: favicon.svg, favicon.ico, apple-touch-icon.png, both Android Chrome icons (192 and 512), site.webmanifest, robots.txt, journal hero image in WebP and PNG, blog hero image in WebP and JPG, and the OG image SVG.
14. SEO & Feeds
3 tests for RSS feed, sitemap index, and sitemap page 0. All expect HTTP 200.
How It Works
The test runner is a single Astro page with an inline <script> block. No API endpoint, no server-side component.
Execution model:
- On page load, a skeleton UI renders all 14 suites with pending dots for each test.
- Clicking “Run All Tests” iterates through suites sequentially. Within each suite, tests fire in batches of 6 concurrent
fetch()calls. - Each request uses a 15-second
AbortControllertimeout. Requests that exceed this are marked as failures with “Timeout (15s)”. - Responses are evaluated against expected status codes. Each test defines one or more acceptable HTTP status codes (e.g.,
[200, 302]).
Result classification:
| Result | Condition |
|---|---|
| Pass (green) | HTTP status matches one of the expected values |
| Fail (red) | 404 Not Found, 500+ Server Error, network error, or timeout |
| Warn (amber) | Unexpected status (e.g., got 302 when expecting 200), or 401/403 on a page that should be accessible |
| Soft-404 detection | 200 responses on non-API pages with less than 500 bytes are flagged as warnings (“Tiny response”) |
Post-run behavior:
- Summary cards update in real time with pass/fail/warn/skip counts and total elapsed time.
- Suites where all tests passed are automatically collapsed.
- The header badge shows “All Clear” (green) or “N Failures” (red).
- Filter tabs (All / Failures / Warnings / Passes) toggle row visibility across all suites.
How to Use
- Navigate to
/admin/site-test. - Click Run All Tests. The button swaps to a red Stop button during execution.
- Watch results populate in real time. Each test row gets a colored dot, HTTP status code, and response time.
- Use the filter tabs to focus on failures or warnings.
- Click any suite header to collapse or expand its test rows.
- After fixing issues, click Run All Tests again. The UI resets and re-runs everything.
The “Stop” button sets an abort flag between batches. In-flight requests within the current batch will still complete.
Audit History (2026-02-27)
Initial spider audit found 5 issues. All were fixed in commit 148bf5b. A 6th issue (build failure) was found and fixed in b3dea76:
| Issue | Root Cause | Fix | Commit |
|---|---|---|---|
| PNG/JPG images 404 in production | scripts/optimize-images.mjs deleted originals after WebP conversion | Removed fs.unlinkSync — originals now kept alongside WebP | 148bf5b |
site.webmanifest broken icon paths | Optimizer only processed .html, not .webmanifest | Extended glob to *.{html,webmanifest} and stopped deleting originals | 148bf5b |
No favicon.ico | Only favicon.svg existed | Added /favicon.ico → /favicon.svg redirect in _redirects | 148bf5b |
| Missing placeholder image | BlogPost.astro fell back to non-existent /images/placeholders/default.jpg | Changed fallback to /images/journal/default-terminal.webp | 148bf5b |
| Dashboard redirect breaking pages | Stale _redirects rule sent /dashboard/* to /blog | Removed the redirect — real dashboard pages exist | 148bf5b |
| CF Pages build failure | src/content/docs/ai/rag-system.md missing required pubDate field | Added pubDate: 2026-02-27 to frontmatter | b3dea76 |
Related
| Item | Value |
|---|---|
| Source file | src/pages/admin/site-test.astro |
| Module registration | Not yet registered (standalone admin page) |
| API dependency | None (client-side only) |
| Auth requirement | CF Access (admin) |
| Server-side rendering | Yes (export const prerender = false) |