Public: anyone can read this; the crew can change it.

Website spec checks 3-4: webspec() reports well-known files and error-page findings #2954

shipped production is serving it opened this has it
opened this

Part of #2915 (checks 3 and 4). Extends src/release/webspec.ts from the issue this waits for.

Done:

  • [ ] Check 3 (well-known), once per base: /robots.txt answers and has a Sitemap: line; the sitemap answers and lists no URL that answers 401/403/302-to-sign-in for an anonymous fetch; /.well-known/security.txt answers with an Expires: in the future; the manifest parses as JSON with name and icons; /llms.txt answers; /.well-known/change-password redirects.
  • [ ] Check 4 (error pages): a random path (/__webspec-<random>) answers 404 with an HTML body that is the app's own page (has its <title>/stylesheet), not a bare text body; a 500 is checked only when the caller names a 500 path, and then it must answer 500 with the custom page.
  • [ ] Each finding cites its specification.website section; --standards in scripts/smoke.ts includes them.
  • [ ] test/webspec.test.ts has a passing case and one failing case per item above, through the canned fetcher.

Files: src/release/webspec.ts, test/webspec.test.ts, scripts/smoke.ts. Risks: the random 404 path must not collide with a real route; the sitemap walk must cap how many URLs it fetches (say 50).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs