Reversibility Gate.Test
Path:
loom-sprint-scaffold/loom/tests/execution/reversibility-gate.test.tsRelative: loom/tests/execution/reversibility-gate.test.tsSubproject: loom-sprint-scaffoldCategory: testsLines: 203Bytes: 6,855Imports: 3Exports: 0has tests
Content Preview
- /**
- * Tests for reversibility-gate (H3.3).
- *
- * Proves:
- * - allowlist lookup accepts allowed tools and denies unknown
- * - destructive tools require valid HMAC approval token
- * - valid HMAC token allows destructive action
- * - invalid/missing token denies destructive action
- * - read/recoverable tools pass without token
- * - makeTokenDeniedEvent has correct shape
- * - uses WebCrypto (not node:crypto)
- */
- import { describe, expect, test } from "bun:test";
- import {
- checkAllowlist,
- makeToke