Reversibility Gate
Path:
_archive/loom-stale-pre-sprint-snapshot/src/execution/reversibility-gate.tsRelative: loom-stale-pre-sprint-snapshot/src/execution/reversibility-gate.tsSubproject: _archiveCategory: archivedLines: 51Bytes: 1,860Imports: 2Exports: 2
Content Preview
- import { verifyApprovalToken } from "../lib/hmac";
- import type { AllowedTool, Reversibility } from "../types/contracts";
- /**
- * H3.3 — Reversibility gate (HC-4).
- * Tools are stamped read|recoverable|destructive by the envelope (H2.2).
- * Destructive execution requires a valid, unconsumed HMAC approval token
- * minted by Loop 1. Deny → TOKEN_DENIED, never a silent pass.
- */
- export type GateDecision =
- | { allow: true; reversibility: Reversibility }
- | { allow: false; detail: string };
- expor