32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
import { readFile } from 'node:fs/promises';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
const root = process.cwd();
|
|
|
|
describe('Pi release documentation', () => {
|
|
it('keeps final-product commands and the external Provider waiver distinct', async () => {
|
|
const [readme, runbook] = await Promise.all([
|
|
readFile(`${root}/README.md`, 'utf8'),
|
|
readFile(`${root}/docs/pi-runtime-release-runbook.md`, 'utf8'),
|
|
]);
|
|
|
|
expect(readme).toContain('pnpm run verify:artifact:pi');
|
|
expect(readme).toContain('pnpm run smoke:pi:real');
|
|
expect(readme).toContain('pnpm run perf:pi:release');
|
|
expect(runbook).toContain('realTurnVerified=false');
|
|
expect(runbook).toContain('Explicitly Waived / Accepted Risk');
|
|
expect(runbook).toContain('不得写成 Pass');
|
|
});
|
|
|
|
it('requires all release targets and documents the incompatible rollback boundary', async () => {
|
|
const runbook = await readFile(`${root}/docs/pi-runtime-release-runbook.md`, 'utf8');
|
|
|
|
for (const target of ['Windows x64', 'Linux x64', 'macOS x64', 'macOS arm64']) {
|
|
expect(runbook).toContain(target);
|
|
}
|
|
expect(runbook).toContain('缺少任一目标的独立证据时,结论只能是 `Blocked`');
|
|
expect(runbook).toContain('旧版本不能读取或续写它们');
|
|
expect(runbook).toContain('只支持完整应用版本回滚');
|
|
});
|
|
});
|