Public: anyone can read this; the crew can change it.
forge-webspec walks the admin pages too: /audit, /backups, /fleet/graph, /crew, a repo's tree, blob and commit #3208
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/3206-forge-webspec-walks-the-admin-pages-too → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +8
−3
test/forge-webspec.test.ts +8 −3
| @@ -22,13 +22,13 @@ import { quietLogs } from "./helpers/globals.ts"; | ||
| 22 | 22 | |
| 23 | 23 | quietLogs(); |
| 24 | 24 | |
| 25 | const PATHS = ["/", "/signin", "/signup", "/explore", "/alice/notes", "/alice/notes/issues", "/alice/notes/issues/1"]; | |
| 25 | const PATHS = ["/", "/signin", "/signup", "/explore", "/alice/notes", "/alice/notes/issues", "/alice/notes/issues/1", "/alice/notes/tree/main", "/alice/notes/blob/main/a.txt"]; | |
| 26 | 26 | |
| 27 | 27 | /** `check path` -> [section, why it stands]. Every one is expected on every page it names; one fixed fails the test, one new fails it too. */ |
| 28 | 28 | const KNOWN: Record<string, [string, string]> = {}; |
| 29 | 29 | |
| 30 | 30 | /** The owner's pages: signed in, so no-store by design; webspec's caching findings on them are not asserted away, they are named. */ |
| 31 | const SIGNED_IN = ["/map", "/system", "/boards", "/settings/crew", "/alice/notes/pulls/2", "/settings"]; | |
| 31 | const SIGNED_IN = ["/map", "/system", "/boards", "/settings/crew", "/alice/notes/pulls/2", "/settings", "/audit", "/settings/backups", "/fleet/graph"]; | |
| 32 | 32 | const CACHING = "https://specification.website/#caching"; |
| 33 | 33 | const NO_ETAG = "signed-in HTML is no-store by design: it is per-person, so there is no validator to revalidate against"; |
| 34 | 34 | const KNOWN_SIGNED_IN: Record<string, [string, string]> = { |
| @@ -38,6 +38,9 @@ const KNOWN_SIGNED_IN: Record<string, [string, string]> = { | ||
| 38 | 38 | "etag /alice/notes/pulls/2": [CACHING, NO_ETAG], |
| 39 | 39 | "etag /settings": [CACHING, NO_ETAG], |
| 40 | 40 | "etag /settings/crew": [CACHING, NO_ETAG], |
| 41 | "etag /settings/backups": [CACHING, NO_ETAG], | |
| 42 | "etag /audit": [CACHING, NO_ETAG], | |
| 43 | "etag /fleet/graph": [CACHING, NO_ETAG], | |
| 41 | 44 | "title /map": ["https://specification.website/#title", "each map node is an inline SVG element whose <title> is its tooltip and accessible name, beside the page's own"], |
| 42 | 45 | }; |
| 43 | 46 | |
| @@ -62,7 +65,9 @@ beforeAll(async () => { | ||
| 62 | 65 | if (!made.ok) throw new Error("user"); |
| 63 | 66 | const repo = await createRepo(app, made.value, { name: "notes", visibility: "public" }); |
| 64 | 67 | if (!repo.ok) throw new Error("repo"); |
| 65 | await commitToBranch(app, made.value, repo.value, { message: "seed", files: [{ path: "a.txt", content: "a" }] }); | |
| 68 | const seeded = await commitToBranch(app, made.value, repo.value, { message: "seed", files: [{ path: "a.txt", content: "a" }] }); | |
| 69 | if (!seeded.ok) throw new Error("seed"); | |
| 70 | PATHS.push(`/alice/notes/commit/${seeded.value.commitOid}`); | |
| 66 | 71 | const issue = openIssue(app, made.value, repo.value, { title: "First", body: "hello" }); |
| 67 | 72 | if (!issue.ok) throw new Error("issue"); |
| 68 | 73 | const branched = await commitToBranch(app, made.value, repo.value, { branch: "feature", message: "feature", files: [{ path: "b.txt", content: "b" }] }); |
new above
offline
PATHS.push at seed time works, but the 'repository pages exist' test only asserts the three old paths. Add the tree, blob and commit paths there, so a 404 on them fails.