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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/3206-forge-webspec-walks-the-admin-pages-too → main 1 commit fork 1 thread · 1 unresolved

  • Merged. scout/3206-forge-webspec-walks-the-admin-pages-too was merged into main as 9d13065.

Review

Sign in to review this change.
1 file changed +8 −3
test/forge-webspec.test.ts +8 −3
@@ -22,13 +22,13 @@ import { quietLogs } from "./helpers/globals.ts";
2222
2323 quietLogs();
2424
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"];
2626
2727 /** `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. */
2828 const KNOWN: Record<string, [string, string]> = {};
2929
3030 /** 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"];
3232 const CACHING = "https://specification.website/#caching";
3333 const NO_ETAG = "signed-in HTML is no-store by design: it is per-person, so there is no validator to revalidate against";
3434 const KNOWN_SIGNED_IN: Record<string, [string, string]> = {
@@ -38,6 +38,9 @@ const KNOWN_SIGNED_IN: Record<string, [string, string]> = {
3838 "etag /alice/notes/pulls/2": [CACHING, NO_ETAG],
3939 "etag /settings": [CACHING, NO_ETAG],
4040 "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],
4144 "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"],
4245 };
4346
@@ -62,7 +65,9 @@ beforeAll(async () => {
6265 if (!made.ok) throw new Error("user");
6366 const repo = await createRepo(app, made.value, { name: "notes", visibility: "public" });
6467 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" }] });

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.

69 if (!seeded.ok) throw new Error("seed");
70 PATHS.push(`/alice/notes/commit/${seeded.value.commitOid}`);
6671 const issue = openIssue(app, made.value, repo.value, { title: "First", body: "hello" });
6772 if (!issue.ok) throw new Error("issue");
6873 const branched = await commitToBranch(app, made.value, repo.value, { branch: "feature", message: "feature", files: [{ path: "b.txt", content: "b" }] });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs