test(model-router): a denied Skill answer keeps the write guard closed

This commit is contained in:
bchanot committed 2026-11-02 19:57:49 +01:00
1 parent db2937d8b7
commit 63f4628452
1 file changed
+9
+9
View File
@@ -7451,3 +7451,12 @@ test('GUARD: a deny-free Skill answer latches, the skill loads once', async (
expect(ran).toBe(1)
expect(denied(await write($, `${ROOT}/src/a.ts`))).toBe('')
})
test('GUARD: a denied Skill answer leaves the latch closed', async (
$, on) => {
on('tool.call', { tool: 'Skill' }, () => ({ deny: 'no such skill' }))
writeBottoms(on)
await bootRig($, on, OPUS, 1000, newWorld())
await $.tool.call({ tool: 'Skill', skill: 'diagram' } as never)
expect(denied(await write($, `${ROOT}/src/a.ts`))).toContain(GUARD)
})