hololake-system-architecture/product-source/hololake-platform/scripts/build-agent-docs.test.mjs

22 lines
946 B
JavaScript

import assert from 'node:assert/strict'
import test from 'node:test'
import { buildAgentInstructions, normalizeDocPath, sectionForFile } from './build-agent-docs.mjs'
test('normalizes Windows doc paths before section grouping', () => {
const docPath = normalizeDocPath('concepts\\ai.md')
assert.equal(docPath, 'concepts/ai.md')
assert.equal(sectionForFile(docPath), 'concepts')
})
test('keeps current persona, system-body and node authority boundaries in every generated bundle', () => {
const instructions = buildAgentInstructions()
assert.match(instructions, /HLP-CURRENT-ARCH-001/)
assert.match(instructions, /GH-PNCC/)
assert.match(instructions, /AGE is the Guanghu persona species/)
assert.match(instructions, /Root\/SSH is not node identity/)
assert.match(instructions, /One human has one independently operated canonical node/)
assert.match(instructions, /never pools users into a shared multi-tenant runtime/)
})