fix: harden release gate and page delivery
Memind CI / Test, build, and release guards (push) Failing after 12m3s
Memind CI / Test, build, and release guards (push) Failing after 12m3s
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
import test from 'node:test';
|
||||
|
||||
const generator = fs.readFileSync(
|
||||
new URL('../skills/docx-generate/generate_docx.py', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
const sandbox = fs.readFileSync(
|
||||
new URL('../mindspace-sandbox-mcp.mjs', import.meta.url),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
test('MS-09 DOCX generator has no runtime network/font dependency and delivery verifies real bytes', () => {
|
||||
const importLines = generator
|
||||
.split('\n')
|
||||
.filter((line) => /^(?:from|import)\s+/.test(line))
|
||||
.join('\n');
|
||||
assert.doesNotMatch(importLines, /\b(?:requests|urllib|httpx|socket)\b/);
|
||||
assert.doesNotMatch(generator, /download.*font|font.*download/i);
|
||||
assert.match(generator, /zipfile/);
|
||||
assert.match(sandbox, /脚本执行后未找到/);
|
||||
assert.match(sandbox, /体积异常/);
|
||||
assert.match(sandbox, /output_path 必须是 \.docx/);
|
||||
});
|
||||
Reference in New Issue
Block a user