Fix: enforce architecture documentation contracts #4

Merged
jarvis-at-skic merged 2 commits from fix/architecture-contract-validation into main 2026-08-24 04:37:21 -07:00
Showing only changes of commit 00415bb359 - Show all commits
+17 -8
View File
@@ -67,14 +67,23 @@ for (const route of ['/', 'architecture-high-level', 'projects', 'teams', 'membe
}
const architectureSidebar = read('sidebars/architecture-high-level.ts');
const architectureEntries = [...architectureSidebar.matchAll(/\{type:\s*'doc',\s*id:\s*'([^']+)',\s*label:\s*'([^']+)'\}/g)]
.map((match) => ({id: match[1], label: match[2]}));
assert.deepEqual(architectureEntries, [
{id: 'context', label: 'Context'},
{id: 'overview', label: 'Overview'},
{id: 'overview-channels', label: 'Overview Channels'},
{id: 'overview-repositories', label: 'Overview Repositories'},
], 'Architecture High Level sidebar must contain exactly the four requested documents in order');
const expectedArchitectureSidebar = `import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {
architectureHighLevelSidebar: [
{type: 'doc', id: 'context', label: 'Context'},
{type: 'doc', id: 'overview', label: 'Overview'},
{type: 'doc', id: 'overview-channels', label: 'Overview Channels'},
{type: 'doc', id: 'overview-repositories', label: 'Overview Repositories'},
],
};
export default sidebars;`;
assert.equal(
architectureSidebar.trim(),
expectedArchitectureSidebar,
'Architecture High Level sidebar must contain exactly the four requested documents in order',
);
const architecturePages = {
context: read('docs/architecture-high-level/context.mdx'),
overview: read('docs/architecture-high-level/overview.mdx'),