Skip to content

Commit 9d021ad

Browse files
authored
fix(docs): repair #8182 fallout — audit manifest route files, mangled runner YAML snippet, kill-switch route assertion (#8192)
Three drift tests went red on main when #8182 replaced the per-page docs routes with the dynamic docs.$slug.tsx route: - selfhost-docs-audit's manifest pointed at the deleted docs.*.tsx files; its entries now name the pages' real sources (content/docs/<slug>.mdx). - The whole-tree format pass in that PR stripped the indentation out of self-hosting-operations.mdx's multi-runner docker-compose example, leaving invalid YAML operators would copy-paste; the snippet is restored verbatim (mdx code blocks are not formatter-enforced in CI — eslint-only). - kill-switch-incident-runbook's route assertion now checks the dynamic route that actually serves the page.
1 parent 5467233 commit 9d021ad

4 files changed

Lines changed: 46 additions & 40 deletions

File tree

apps/loopover-ui/content/docs/self-hosting-operations.mdx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -495,29 +495,31 @@ repeat the extension block in your override file:
495495
TEMP: /tmp/runner/tmp
496496
497497
services:
498-
runner-2-tmp-init:
499-
image: alpine:3.20
500-
profiles: ["runners"]
501-
volumes: - runner-work-2:/tmp/runner
502-
command: ["sh", "-c", "mkdir -p /tmp/runner/tmp && chmod 1777 /tmp/runner/tmp"]
503-
504-
runner-2:
505-
image: myoung34/github-runner:ubuntu-jammy
506-
profiles: ["runners"]
507-
depends_on:
508-
runner-2-tmp-init:
509-
condition: service_completed_successfully
510-
environment:
511-
<<: \*runner-tmp-env
512-
RUNNER_NAME: loopover-runner-2
513-
RUNNER_SCOPE: \${RUNNER_SCOPE:-repo}
514-
REPO_URL: \${RUNNER_REPO_URL:-}
515-
RUNNER_TOKEN: \${RUNNER_TOKEN:-}
516-
RUNNER_WORKDIR: /tmp/runner
517-
volumes: - runner-work-2:/tmp/runner
498+
runner-2-tmp-init:
499+
image: alpine:3.20
500+
profiles: ["runners"]
501+
volumes:
502+
- runner-work-2:/tmp/runner
503+
command: ["sh", "-c", "mkdir -p /tmp/runner/tmp && chmod 1777 /tmp/runner/tmp"]
504+
505+
runner-2:
506+
image: myoung34/github-runner:ubuntu-jammy
507+
profiles: ["runners"]
508+
depends_on:
509+
runner-2-tmp-init:
510+
condition: service_completed_successfully
511+
environment:
512+
<<: *runner-tmp-env
513+
RUNNER_NAME: loopover-runner-2
514+
RUNNER_SCOPE: \${RUNNER_SCOPE:-repo}
515+
REPO_URL: \${RUNNER_REPO_URL:-}
516+
RUNNER_TOKEN: \${RUNNER_TOKEN:-}
517+
RUNNER_WORKDIR: /tmp/runner
518+
volumes:
519+
- runner-work-2:/tmp/runner
518520
519521
volumes:
520-
runner-work-2:`}
522+
runner-work-2:`}
521523
/>
522524

523525
## Enabling Sentry (your own DSN)

apps/loopover-ui/src/lib/selfhost-docs-audit.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,75 +3,77 @@
33
export type SelfHostDocsPageLink = {
44
title: string;
55
path: string;
6-
routeFile: string;
6+
/** The page's real source since the #8182 dynamic-route migration: content/docs/<slug>.mdx (the
7+
* one docs.$slug.tsx route serves every page — there is no per-page .tsx to point at anymore). */
8+
contentFile: string;
79
};
810

911
export const SELFHOST_DOCS_PAGES = [
1012
{
1113
title: "Quickstart",
1214
path: "/docs/self-hosting-quickstart",
13-
routeFile: "docs.self-hosting-quickstart.tsx",
15+
contentFile: "self-hosting-quickstart.mdx",
1416
},
1517
{
1618
title: "Configuration",
1719
path: "/docs/self-hosting-configuration",
18-
routeFile: "docs.self-hosting-configuration.tsx",
20+
contentFile: "self-hosting-configuration.mdx",
1921
},
2022
{
2123
title: "GitHub App and Orb",
2224
path: "/docs/self-hosting-github-app",
23-
routeFile: "docs.self-hosting-github-app.tsx",
25+
contentFile: "self-hosting-github-app.mdx",
2426
},
2527
{
2628
title: "AI providers",
2729
path: "/docs/self-hosting-ai-providers",
28-
routeFile: "docs.self-hosting-ai-providers.tsx",
30+
contentFile: "self-hosting-ai-providers.mdx",
2931
},
3032
{
3133
title: "REES enrichment",
3234
path: "/docs/self-hosting-rees",
33-
routeFile: "docs.self-hosting-rees.tsx",
35+
contentFile: "self-hosting-rees.mdx",
3436
},
3537
{
3638
title: "REES analyzer reference",
3739
path: "/docs/self-hosting-rees-analyzers",
38-
routeFile: "docs.self-hosting-rees-analyzers.tsx",
40+
contentFile: "self-hosting-rees-analyzers.mdx",
3941
},
40-
{ title: "RAG indexing", path: "/docs/self-hosting-rag", routeFile: "docs.self-hosting-rag.tsx" },
42+
{ title: "RAG indexing", path: "/docs/self-hosting-rag", contentFile: "self-hosting-rag.mdx" },
4143
{
4244
title: "Operations",
4345
path: "/docs/self-hosting-operations",
44-
routeFile: "docs.self-hosting-operations.tsx",
46+
contentFile: "self-hosting-operations.mdx",
4547
},
4648
{
4749
title: "Backup and scaling",
4850
path: "/docs/self-hosting-backup-scaling",
49-
routeFile: "docs.self-hosting-backup-scaling.tsx",
51+
contentFile: "self-hosting-backup-scaling.mdx",
5052
},
5153
{
5254
title: "Releases and images",
5355
path: "/docs/self-hosting-releases",
54-
routeFile: "docs.self-hosting-releases.tsx",
56+
contentFile: "self-hosting-releases.mdx",
5557
},
5658
{
5759
title: "Release checklist",
5860
path: "/docs/self-hosting-release-checklist",
59-
routeFile: "docs.self-hosting-release-checklist.tsx",
61+
contentFile: "self-hosting-release-checklist.mdx",
6062
},
6163
{
6264
title: "Security",
6365
path: "/docs/self-hosting-security",
64-
routeFile: "docs.self-hosting-security.tsx",
66+
contentFile: "self-hosting-security.mdx",
6567
},
6668
{
6769
title: "Troubleshooting",
6870
path: "/docs/self-hosting-troubleshooting",
69-
routeFile: "docs.self-hosting-troubleshooting.tsx",
71+
contentFile: "self-hosting-troubleshooting.mdx",
7072
},
7173
{
7274
title: "Docs accuracy audit",
7375
path: "/docs/self-hosting-docs-audit",
74-
routeFile: "docs.self-hosting-docs-audit.tsx",
76+
contentFile: "self-hosting-docs-audit.mdx",
7577
},
7678
] as const;
7779

test/unit/docs-selfhost-audit-checklist.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111

1212
const REPO_ROOT = resolve(import.meta.dirname, "../..");
1313
const ROUTES_DIR = resolve(REPO_ROOT, "apps/loopover-ui/src/routes");
14+
const CONTENT_DIR = resolve(REPO_ROOT, "apps/loopover-ui/content/docs");
1415
// SPIKE (#6037): these two pages' prose now lives in the migrated content/docs/*.mdx files, not
1516
// the route .tsx, which only orchestrates the fumadocs loader + client-loader -- point the drift
1617
// guard at the actual content source. docs.index.tsx (below, for the docs-hub link check) is the
@@ -28,9 +29,9 @@ describe("self-host docs accuracy audit (#1829)", () => {
2829
const maintainerSource = readFileSync(MAINTAINER_INDEX, "utf8");
2930
const packageJson = JSON.parse(readFileSync(PACKAGE_JSON, "utf8")) as { scripts: Record<string, string> };
3031

31-
it("manifest lists every self-host docs route file on disk", () => {
32+
it("manifest lists every self-host docs content file on disk (pages are content/docs/*.mdx since the #8182 dynamic route)", () => {
3233
for (const page of SELFHOST_DOCS_PAGES) {
33-
expect(existsSync(resolve(ROUTES_DIR, page.routeFile)), page.routeFile).toBe(true);
34+
expect(existsSync(resolve(CONTENT_DIR, page.contentFile)), page.contentFile).toBe(true);
3435
}
3536
});
3637

test/unit/kill-switch-incident-runbook.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010

1111
const repoRoot = process.cwd();
1212
const runbookPath = join(repoRoot, "apps/loopover-ui/content/docs/ams-kill-switch-incident.mdx");
13-
const routePath = join(repoRoot, "apps/loopover-ui/src/routes/docs.ams-kill-switch-incident.tsx");
13+
// #8182 replaced the per-page thin route with the one dynamic docs route — that file now serves this page.
14+
const routePath = join(repoRoot, "apps/loopover-ui/src/routes/docs.$slug.tsx");
1415
const docsNavPath = join(repoRoot, "apps/loopover-ui/src/components/site/docs-nav.tsx");
1516

1617
describe("kill-switch incident runbook (#4809)", () => {
@@ -20,7 +21,7 @@ describe("kill-switch incident runbook (#4809)", () => {
2021
const nav = readFileSync(docsNavPath, "utf8");
2122

2223
expect(runbook).toContain("title: Kill-switch incident runbook");
23-
expect(route).toContain('createFileRoute("/docs/ams-kill-switch-incident")');
24+
expect(route).toContain('createFileRoute("/docs/$slug")');
2425
expect(nav).toContain('to: "/docs/ams-kill-switch-incident"');
2526
});
2627

0 commit comments

Comments
 (0)