Skip to content

Commit 48163ef

Browse files
sahrizviclaude
andcommitted
test: move the policy skip-guard case into its own describe block
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011chv9Rmu7jQXokum1WNcs7
1 parent 26edbc3 commit 48163ef

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎packages/opencode/test/skill/release-v0.12.8-adversarial.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,11 @@ describe("v0.12.8 adversarial: plan-skip fail-closed guards", () => {
521521
const out = applySemanticsSkipGuard({ notes: [null, 3, "ok", "plan-based analysis was skipped"] })
522522
expect(out.skipped).toBe(true)
523523
})
524+
525+
test("a type-confused rule field that stringifies to a skip rule fails closed", () => {
526+
const out = applyPolicySkipGuard({ allowed: true, warnings: [{ rule: ["POLICY_SKIPPED"] }] })
527+
expect(out.allowed).toBe(false)
528+
})
524529
})
525530

526531
describe("v0.12.8 adversarial: permission aliases only tighten", () => {
@@ -552,11 +557,6 @@ describe("v0.12.8 adversarial: permission aliases only tighten", () => {
552557
expect(r.action).toBe("allow")
553558
})
554559

555-
test("a type-confused rule field that stringifies to a skip rule fails closed", () => {
556-
const out = applyPolicySkipGuard({ allowed: true, warnings: [{ rule: ["POLICY_SKIPPED"] }] })
557-
expect(out.allowed).toBe(false)
558-
})
559-
560560
test("an ask via alias tightens an authored allow but not an authored deny", () => {
561561
expect(evaluateRequest(req({ a: [["b"]] }), "a", [rule("allow", "a"), rule("ask", "b")]).action).toBe("ask")
562562
expect(evaluateRequest(req({ a: [["b"]] }), "a", [rule("deny", "a"), rule("ask", "b")]).action).toBe("deny")

0 commit comments

Comments
 (0)