From 946e7887be154250e0beb9bc4d365c3ee25e0ecf Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 10:55:01 -0400 Subject: [PATCH 1/2] fix(nav): list ADRs 0018-0024 in the hive sidebar and guard sync/nav drift Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-389-hive-adr-nav-drift.md | 1 + src/__tests__/page-map-adr-nav-drift.test.ts | 19 +++++++++++++++++++ src/app/docs/page-map.ts | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100644 changelog.d/fixed-389-hive-adr-nav-drift.md create mode 100644 src/__tests__/page-map-adr-nav-drift.test.ts diff --git a/changelog.d/fixed-389-hive-adr-nav-drift.md b/changelog.d/fixed-389-hive-adr-nav-drift.md new file mode 100644 index 0000000..1b5f66a --- /dev/null +++ b/changelog.d/fixed-389-hive-adr-nav-drift.md @@ -0,0 +1 @@ +- List ADRs 0018–0024 in the hive docs sidebar and add a test that fails when the ADR sync list and sidebar navigation drift apart. diff --git a/src/__tests__/page-map-adr-nav-drift.test.ts b/src/__tests__/page-map-adr-nav-drift.test.ts new file mode 100644 index 0000000..a9f8e7b --- /dev/null +++ b/src/__tests__/page-map-adr-nav-drift.test.ts @@ -0,0 +1,19 @@ +import fs from "fs"; +import path from "path"; +import { describe, expect, it } from "vitest"; + +const ADR_RE = /adr\/(\d{4}-[a-z0-9-]+\.md)/g; + +function adrEntries(file: string): string[] { + const src = fs.readFileSync(path.join(process.cwd(), file), "utf8"); + return [...new Set([...src.matchAll(ADR_RE)].map((m) => m[1]))].sort(); +} + +describe("hive ADR navigation stays in step with sync-hive-docs", () => { + it("lists every synced ADR in NAV_STRUCTURE_HIVE", () => { + const synced = adrEntries("scripts/sync-hive-docs.ts"); + const inNav = adrEntries("src/app/docs/page-map.ts"); + expect(synced.length).toBeGreaterThan(0); + expect(inNav).toEqual(synced); + }); +}); diff --git a/src/app/docs/page-map.ts b/src/app/docs/page-map.ts index b665c61..10db28f 100644 --- a/src/app/docs/page-map.ts +++ b/src/app/docs/page-map.ts @@ -174,6 +174,12 @@ const NAV_STRUCTURE_HIVE: Array<{ title: string; items: NavItem[] }> = [ { '0015 CSP style-src scope': 'adr/0015-csp-style-src-scope.md' }, { '0016 CSP script-src scope': 'adr/0016-csp-script-src-scope.md' }, { '0017 Podman Quadlet lifecycle': 'adr/0017-podman-quadlet-lifecycle.md' }, + { '0018 Dashboard design tokens': 'adr/0018-dashboard-design-tokens.md' }, + { '0019 Escalation over stalling': 'adr/0019-escalation-over-stalling.md' }, + { '0020 Spek continuous convergence': 'adr/0020-spek-continuous-convergence.md' }, + { '0022 Opt-in earned Codex reset redemption': 'adr/0022-opt-in-earned-codex-reset-redemption.md' }, + { '0023 Trusted-author automerge': 'adr/0023-trusted-author-automerge.md' }, + { '0024 Provider credential lifecycle': 'adr/0024-provider-credential-lifecycle.md' }, ] }, { 'Environment variable reference': 'env-vars.md' }, ] From 1763639ffbdd49d71c75164fdc4fd42d2d608f72 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 11:10:40 -0400 Subject: [PATCH 2/2] style: format page-map-adr-nav-drift test with prettier Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- src/__tests__/page-map-adr-nav-drift.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/page-map-adr-nav-drift.test.ts b/src/__tests__/page-map-adr-nav-drift.test.ts index a9f8e7b..ec62bb2 100644 --- a/src/__tests__/page-map-adr-nav-drift.test.ts +++ b/src/__tests__/page-map-adr-nav-drift.test.ts @@ -6,7 +6,7 @@ const ADR_RE = /adr\/(\d{4}-[a-z0-9-]+\.md)/g; function adrEntries(file: string): string[] { const src = fs.readFileSync(path.join(process.cwd(), file), "utf8"); - return [...new Set([...src.matchAll(ADR_RE)].map((m) => m[1]))].sort(); + return [...new Set([...src.matchAll(ADR_RE)].map(m => m[1]))].sort(); } describe("hive ADR navigation stays in step with sync-hive-docs", () => {