From 3ccb1aea9bc5910e16b92e22e39166a09abce4d9 Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Sat, 26 Sep 2026 11:21:31 -0300 Subject: [PATCH] test(DESIGN1): alinha o spec do gate de arquivos ao DESIGN.md do front/designer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O DESIGN1 liberou só o frontier para evoluir as regras visuais vivas (`DESIGN.md` §7) e manteve o tier degradado propondo — o spec pinava a lista antiga de `permission.edit` e derrubou o `verify` da main (deploy run 36247187381), o que bloqueava qualquer PR. A expectativa vira por agente. --- tests/unit/opencodeAgents.unit.spec.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/unit/opencodeAgents.unit.spec.ts b/tests/unit/opencodeAgents.unit.spec.ts index 784e5f4f..0af762db 100644 --- a/tests/unit/opencodeAgents.unit.spec.ts +++ b/tests/unit/opencodeAgents.unit.spec.ts @@ -91,8 +91,15 @@ describe('design agents share the OPS117 bash write guard', () => { expect(rules).toEqual(expectedBash) }) + // DESIGN1: only the frontier designer evolves the living visual rules + // (`DESIGN.md` §7); the degraded tier proposes and hands the decision back. + const expectedEdit = { + designer: [`'*': deny`, `'docs/plans/*-ui-design*': allow`, `'DESIGN.md': allow`], + 'designer-degraded': [`'*': deny`, `'docs/plans/*-ui-design*': allow`], + } as const + it.each(agents)('%s keeps the file-tool gate fail-closed (OPS113 intact)', (agent) => { - expect(block(agent, 'edit')).toEqual([`'*': deny`, `'docs/plans/*-ui-design*': allow`]) + expect(block(agent, 'edit')).toEqual(expectedEdit[agent]) }) })