test(04-04): commit the CR13/CS5 shadow-law gate updates (missed in 54a2b54 staging)

This commit is contained in:
araharah-executor
2026-10-24 12:00:09 +08:00
parent 4212d1acd0
commit 7da7c2019c
2 changed files with 16 additions and 5 deletions
+5 -2
View File
@@ -393,8 +393,11 @@ test("CR13 the registration script derives the /cari scope from helpMenu", () =>
"utf8",
);
assert.ok(src.includes('["help", "privacy", "cari"]'), "the hardcoded command list gained cari");
const fetchCalls = src.match(/\bawait fetch\(/g) ?? [];
assert.equal(fetchCalls.length, 2, "still exactly two fetch calls (default + ms scopes)");
// Device-gate incident: all_private_chats SHADOWS default — /cari must be
// armed in the shadowing scope too, not only default.
const allPrivate = src.indexOf('"all_private_chats"');
assert.notEqual(allPrivate, -1, "all_private_chats scope must be armed explicitly (shadow law)");
assert.ok(src.includes("menuFor"), "every armed scope derives its set from helpMenu");
});
/* ————— CR14 — the alternates swap produces a new venue card ————— */