From bae6731b0ae5ea55a4015dc5fcd0e3a6d9484302 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Thu, 23 Jul 2026 03:12:13 -0700 Subject: [PATCH] =?UTF-8?q?fix(docs):=20repair=20#8182=20fallout=20?= =?UTF-8?q?=E2=80=94=20audit=20manifest=20route=20files,=20mangled=20runne?= =?UTF-8?q?r=20YAML=20snippet,=20kill-switch=20route=20assertion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/.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. --- .../content/docs/self-hosting-operations.mdx | 44 ++++++++++--------- .../src/lib/selfhost-docs-audit.ts | 32 +++++++------- .../docs-selfhost-audit-checklist.test.ts | 5 ++- .../unit/kill-switch-incident-runbook.test.ts | 5 ++- 4 files changed, 46 insertions(+), 40 deletions(-) diff --git a/apps/loopover-ui/content/docs/self-hosting-operations.mdx b/apps/loopover-ui/content/docs/self-hosting-operations.mdx index e1fdcb96a9..9dc8812807 100644 --- a/apps/loopover-ui/content/docs/self-hosting-operations.mdx +++ b/apps/loopover-ui/content/docs/self-hosting-operations.mdx @@ -495,29 +495,31 @@ repeat the extension block in your override file: TEMP: /tmp/runner/tmp services: -runner-2-tmp-init: -image: alpine:3.20 -profiles: ["runners"] -volumes: - runner-work-2:/tmp/runner -command: ["sh", "-c", "mkdir -p /tmp/runner/tmp && chmod 1777 /tmp/runner/tmp"] - -runner-2: -image: myoung34/github-runner:ubuntu-jammy -profiles: ["runners"] -depends_on: -runner-2-tmp-init: -condition: service_completed_successfully -environment: -<<: \*runner-tmp-env -RUNNER_NAME: loopover-runner-2 -RUNNER_SCOPE: \${RUNNER_SCOPE:-repo} -REPO_URL: \${RUNNER_REPO_URL:-} -RUNNER_TOKEN: \${RUNNER_TOKEN:-} -RUNNER_WORKDIR: /tmp/runner -volumes: - runner-work-2:/tmp/runner + runner-2-tmp-init: + image: alpine:3.20 + profiles: ["runners"] + volumes: + - runner-work-2:/tmp/runner + command: ["sh", "-c", "mkdir -p /tmp/runner/tmp && chmod 1777 /tmp/runner/tmp"] + + runner-2: + image: myoung34/github-runner:ubuntu-jammy + profiles: ["runners"] + depends_on: + runner-2-tmp-init: + condition: service_completed_successfully + environment: + <<: *runner-tmp-env + RUNNER_NAME: loopover-runner-2 + RUNNER_SCOPE: \${RUNNER_SCOPE:-repo} + REPO_URL: \${RUNNER_REPO_URL:-} + RUNNER_TOKEN: \${RUNNER_TOKEN:-} + RUNNER_WORKDIR: /tmp/runner + volumes: + - runner-work-2:/tmp/runner volumes: -runner-work-2:`} + runner-work-2:`} /> ## Enabling Sentry (your own DSN) diff --git a/apps/loopover-ui/src/lib/selfhost-docs-audit.ts b/apps/loopover-ui/src/lib/selfhost-docs-audit.ts index ceeab4a3ec..01849371bd 100644 --- a/apps/loopover-ui/src/lib/selfhost-docs-audit.ts +++ b/apps/loopover-ui/src/lib/selfhost-docs-audit.ts @@ -3,75 +3,77 @@ export type SelfHostDocsPageLink = { title: string; path: string; - routeFile: string; + /** The page's real source since the #8182 dynamic-route migration: content/docs/.mdx (the + * one docs.$slug.tsx route serves every page — there is no per-page .tsx to point at anymore). */ + contentFile: string; }; export const SELFHOST_DOCS_PAGES = [ { title: "Quickstart", path: "/docs/self-hosting-quickstart", - routeFile: "docs.self-hosting-quickstart.tsx", + contentFile: "self-hosting-quickstart.mdx", }, { title: "Configuration", path: "/docs/self-hosting-configuration", - routeFile: "docs.self-hosting-configuration.tsx", + contentFile: "self-hosting-configuration.mdx", }, { title: "GitHub App and Orb", path: "/docs/self-hosting-github-app", - routeFile: "docs.self-hosting-github-app.tsx", + contentFile: "self-hosting-github-app.mdx", }, { title: "AI providers", path: "/docs/self-hosting-ai-providers", - routeFile: "docs.self-hosting-ai-providers.tsx", + contentFile: "self-hosting-ai-providers.mdx", }, { title: "REES enrichment", path: "/docs/self-hosting-rees", - routeFile: "docs.self-hosting-rees.tsx", + contentFile: "self-hosting-rees.mdx", }, { title: "REES analyzer reference", path: "/docs/self-hosting-rees-analyzers", - routeFile: "docs.self-hosting-rees-analyzers.tsx", + contentFile: "self-hosting-rees-analyzers.mdx", }, - { title: "RAG indexing", path: "/docs/self-hosting-rag", routeFile: "docs.self-hosting-rag.tsx" }, + { title: "RAG indexing", path: "/docs/self-hosting-rag", contentFile: "self-hosting-rag.mdx" }, { title: "Operations", path: "/docs/self-hosting-operations", - routeFile: "docs.self-hosting-operations.tsx", + contentFile: "self-hosting-operations.mdx", }, { title: "Backup and scaling", path: "/docs/self-hosting-backup-scaling", - routeFile: "docs.self-hosting-backup-scaling.tsx", + contentFile: "self-hosting-backup-scaling.mdx", }, { title: "Releases and images", path: "/docs/self-hosting-releases", - routeFile: "docs.self-hosting-releases.tsx", + contentFile: "self-hosting-releases.mdx", }, { title: "Release checklist", path: "/docs/self-hosting-release-checklist", - routeFile: "docs.self-hosting-release-checklist.tsx", + contentFile: "self-hosting-release-checklist.mdx", }, { title: "Security", path: "/docs/self-hosting-security", - routeFile: "docs.self-hosting-security.tsx", + contentFile: "self-hosting-security.mdx", }, { title: "Troubleshooting", path: "/docs/self-hosting-troubleshooting", - routeFile: "docs.self-hosting-troubleshooting.tsx", + contentFile: "self-hosting-troubleshooting.mdx", }, { title: "Docs accuracy audit", path: "/docs/self-hosting-docs-audit", - routeFile: "docs.self-hosting-docs-audit.tsx", + contentFile: "self-hosting-docs-audit.mdx", }, ] as const; diff --git a/test/unit/docs-selfhost-audit-checklist.test.ts b/test/unit/docs-selfhost-audit-checklist.test.ts index 722cc13893..3b95c7f9c7 100644 --- a/test/unit/docs-selfhost-audit-checklist.test.ts +++ b/test/unit/docs-selfhost-audit-checklist.test.ts @@ -11,6 +11,7 @@ import { const REPO_ROOT = resolve(import.meta.dirname, "../.."); const ROUTES_DIR = resolve(REPO_ROOT, "apps/loopover-ui/src/routes"); +const CONTENT_DIR = resolve(REPO_ROOT, "apps/loopover-ui/content/docs"); // SPIKE (#6037): these two pages' prose now lives in the migrated content/docs/*.mdx files, not // the route .tsx, which only orchestrates the fumadocs loader + client-loader -- point the drift // 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)", () => { const maintainerSource = readFileSync(MAINTAINER_INDEX, "utf8"); const packageJson = JSON.parse(readFileSync(PACKAGE_JSON, "utf8")) as { scripts: Record }; - it("manifest lists every self-host docs route file on disk", () => { + it("manifest lists every self-host docs content file on disk (pages are content/docs/*.mdx since the #8182 dynamic route)", () => { for (const page of SELFHOST_DOCS_PAGES) { - expect(existsSync(resolve(ROUTES_DIR, page.routeFile)), page.routeFile).toBe(true); + expect(existsSync(resolve(CONTENT_DIR, page.contentFile)), page.contentFile).toBe(true); } }); diff --git a/test/unit/kill-switch-incident-runbook.test.ts b/test/unit/kill-switch-incident-runbook.test.ts index 582fc5e0fd..4c0bec7f73 100644 --- a/test/unit/kill-switch-incident-runbook.test.ts +++ b/test/unit/kill-switch-incident-runbook.test.ts @@ -10,7 +10,8 @@ import { const repoRoot = process.cwd(); const runbookPath = join(repoRoot, "apps/loopover-ui/content/docs/ams-kill-switch-incident.mdx"); -const routePath = join(repoRoot, "apps/loopover-ui/src/routes/docs.ams-kill-switch-incident.tsx"); +// #8182 replaced the per-page thin route with the one dynamic docs route — that file now serves this page. +const routePath = join(repoRoot, "apps/loopover-ui/src/routes/docs.$slug.tsx"); const docsNavPath = join(repoRoot, "apps/loopover-ui/src/components/site/docs-nav.tsx"); describe("kill-switch incident runbook (#4809)", () => { @@ -20,7 +21,7 @@ describe("kill-switch incident runbook (#4809)", () => { const nav = readFileSync(docsNavPath, "utf8"); expect(runbook).toContain("title: Kill-switch incident runbook"); - expect(route).toContain('createFileRoute("/docs/ams-kill-switch-incident")'); + expect(route).toContain('createFileRoute("/docs/$slug")'); expect(nav).toContain('to: "/docs/ams-kill-switch-incident"'); });