chore: initialize POM 2 repo (docs guards green; release gates recorded NOT RUN pending install)

This commit is contained in:
Antigravity
2026-08-19 10:31:00 +02:00
commit 7ffd00b5c5
111 changed files with 12522 additions and 0 deletions

15
tests/events.test.ts Normal file
View File

@@ -0,0 +1,15 @@
import assert from "node:assert/strict";
import test from "node:test";
import { shouldBlockProjectCommand } from "../src/policy";
test("destructive-command policy blocks recursive deletion from or against project root", () => {
const root = "/work/clockwork-sea";
assert.equal(shouldBlockProjectCommand("rm -rf .", root, "clockwork-sea", root), true);
assert.equal(shouldBlockProjectCommand("rm --recursive --force \"$PWD\"", root, "clockwork-sea", root), true);
assert.equal(shouldBlockProjectCommand("find . -delete", root, "clockwork-sea", root), true);
assert.equal(shouldBlockProjectCommand("git reset --hard HEAD~1", root, "clockwork-sea", root), true);
assert.equal(shouldBlockProjectCommand("Remove-Item -Recurse -Force .", root, "clockwork-sea", root), true);
assert.equal(shouldBlockProjectCommand("rm -rf /tmp/scratch", root, "clockwork-sea", "/tmp"), false);
assert.equal(shouldBlockProjectCommand("rm -rf /work/clockwork-sea", root, "clockwork-sea", "/tmp"), true);
assert.equal(shouldBlockProjectCommand("rm notes.txt", root, "clockwork-sea", root), false);
});