fix(hololake): preserve persona boundaries in agent docs

This commit is contained in:
冰朔 2026-08-12 07:07:37 +08:00
commit 392d205341
2 changed files with 34 additions and 4 deletions

View file

@ -1,7 +1,7 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import { normalizeDocPath, sectionForFile } from './build-agent-docs.mjs'
import { buildAgentInstructions, normalizeDocPath, sectionForFile } from './build-agent-docs.mjs'
test('normalizes Windows doc paths before section grouping', () => {
const docPath = normalizeDocPath('concepts\\ai.md')
@ -9,3 +9,14 @@ test('normalizes Windows doc paths before section grouping', () => {
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/)
})