feat: preserve native channel and task continuity

This commit is contained in:
冰朔 2026-08-21 11:00:10 +08:00
commit 30865321a8
31 changed files with 2138 additions and 171 deletions

View file

@ -0,0 +1,22 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import test from 'node:test'
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8')
test('Bingshuo natural-language anchor is a mandatory development and acceptance gate', () => {
const agents = read('AGENTS.md')
const anchor = read('docs/product-intent/BINGSHUO-HOLOLAKE-NATURAL-LANGUAGE-DEVELOPMENT-ANCHOR.md')
const terminal = JSON.parse(read('contracts/programming-ai-terminal-link.json'))
const gateway = JSON.parse(read('contracts/external-ai-gateway.json'))
assert.match(agents, /必须完整读取/)
assert.match(agents, /测试通过只证明实现没有触发已知工程回归,不能替代逐条自然语言验收/)
assert.match(anchor, /MCP 外部连接入口 → HoloLake 握手与门禁 → 切换为光湖原生协议运行时/)
assert.match(anchor, /MCP 断开时只允许暂停运输/)
assert.match(anchor, /不能退回通用 AI 层/)
assert.match(anchor, /结果未知的现实动作先读回再继续/)
assert.equal(gateway.native_runtime.continuity_owner, 'HOLOLAKE')
assert.equal(terminal.continuity.mcp_disconnect_never_falls_back_to_generic_runtime, true)
assert.equal(terminal.native_runtime_checkpoint.transport_disconnect_effect, 'PAUSE_TRANSPORT_KEEP_NATIVE_ENVIRONMENT')
})