Personal Telegram developer console for GitHub
test: enforce final acceptance record and docs invariants
davoodmehraban89 committed
Oct 5, 2026 at 05:18 UTC
00542224dc2c2dd4b39f8021f03a756fc8f04781
1 file changed
+13
-12
test/final-acceptance-contract.test.js
+13
-12
@@ -4,22 +4,23 @@ import fs from 'node:fs';
4
5
const read = path => fs.readFileSync(new URL(`../${path}`, import.meta.url), 'utf8');
6
7
-test('final acceptance docs describe production-accepted workspace and exhaustive menu/security gates', () => {
8
- const memory = read('PROJECT_MEMORY.md');
7
+test('final acceptance record closes workspace, exhaustive menu and security gates', () => {
8
+ const acceptance = read('docs/FINAL_ACCEPTANCE_V2_1.md');
9
const readme = read('README.md');
10
- assert.match(memory, /Repository Workspace.*PRODUCTION ACCEPTED/i);
11
- assert.match(memory, /Telegram Menu.*(COMPLETE|ACCEPTED)/i);
12
- assert.match(memory, /Security Hardening.*(COMPLETE|ACCEPTED)/i);
13
- assert.match(readme, /public \/status.*minimal/i);
10
+ assert.match(acceptance, /Repository Workspace.*PRODUCTION ACCEPTED/is);
11
+ assert.match(acceptance, /Telegram Menu Audit.*COMPLETE/is);
12
+ assert.match(acceptance, /Security Hardening.*COMPLETE/is);
13
+ assert.match(readme, /GET \/status.*حداقلی/i);
14
assert.match(readme, /Safe Approval/i);
15
assert.match(readme, /nexa\/edit-/i);
16
});
17
18
test('production acceptance keeps Telegram and security invariants documented', () => {
19
- const memory = read('PROJECT_MEMORY.md');
20
- assert.match(memory, /4096/);
21
- assert.match(memory, /64.*byte/i);
22
- assert.match(memory, /owner-only/i);
23
- assert.match(memory, /replay/i);
24
- assert.match(memory, /main.*unchanged/i);
19
+ const acceptance = read('docs/FINAL_ACCEPTANCE_V2_1.md');
20
+ assert.match(acceptance, /4096/);
21
+ assert.match(acceptance, /64 UTF-8 bytes/i);
22
+ assert.match(acceptance, /owner-only/i);
23
+ assert.match(acceptance, /replay/i);
24
+ assert.match(acceptance, /main unchanged/i);
25
+ assert.match(acceptance, /public `\/status` remains minimal health-only/i);
26
});