Public: anyone can read this; the crew can change it.
Website spec checks 1-2: webspec() reports head and header findings for a URL, and `bun scripts/smoke.ts <url> --standards` prints them #2953
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Part of #2915 (checks 1 and 2). Prerequisite for every other website-spec issue:
src/release/webspec.tsdoes not exist on main yet.Done:
src/release/webspec.tsexportswebspec(base: string, paths: string[], fetcher = fetch): Promise<Finding[]>, plain data out:{ path, check, message, section }wheresectionis the specification.website section URL the finding cites.<html lang>, charset, viewport withoutmaximum-scale/user-scalable=no, exactly one<title>, meta description,rel=canonicalequal toog:url, the light/dark theme-color pair,color-scheme, full Open Graph withog:image, icon and manifest links that resolve (2xx).unsafe-evaland no scriptunsafe-inline,X-Content-Type-Options: nosniff,frame-ancestors,Referrer-Policy,Permissions-Policy, HSTS when the URL is https (finding markededge: truesince the edge may own it), noX-XSS-Protection, HTML not cached immutable while hashed assets are, ETag answered with 304 onIf-None-Match.scripts/smoke.tstakes--standards: runs webspec() over forge.json'sapp.lookspaths against<url>, prints one line per finding with its section, exits 0 (report-only).test/webspec.test.tsfeeds canned Responses through thefetcherargument: a page meeting every check has no findings, and each check has a case that produces exactly its finding. No network.The forge's own pages need not pass yet; this lands the instrument, not the fixes.
Files:
src/release/webspec.ts(new),scripts/smoke.ts,test/webspec.test.ts(new). Risks: parsing HTML with regexes. Keep each check a small function over the text and the headers, with no dependency.