20260826 两宿主全线正本/回执/状态 + 协议正本地图v1.2 + 模板/镜面/坑清单(元审计收敛commit;前人未提交改动未碰)

This commit is contained in:
冰朔 2026-08-26 16:23:44 +08:00
commit 59fc9bfd7b
670 changed files with 133422 additions and 129 deletions

View file

@ -0,0 +1,26 @@
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('channel surface gives every visible entry its own layout slot', () => {
const source = read('src/main.tsx')
const styles = read('src/styles.css')
const channel = source.match(/\{worldStage === 'channel'[\s\S]*?\n \{worldStage === 'enterpriseWork'/)?.[0]
assert.ok(channel, 'channel world source must remain discoverable')
assert.match(channel, /className="channel-primary"/)
assert.match(channel, /className="channel-marketplace"/)
assert.equal((channel.match(/className="channel-main"/g) || []).length, 0)
assert.match(styles, /\.channel-primary\s*\{/)
assert.match(styles, /\.channel-marketplace\s*\{/)
})
test('the domain stage has exactly one atmosphere owner', () => {
const source = read('src/main.tsx')
assert.match(
source,
/\{!\(worldStage === 'domain' && surface === 'world'\) && <LakeAtmosphere awake=\{motionAwake\}\/>\}/,
)
})