Oleksandr Kuzmenko, EditorPublished 7 min readAI-assisted · editor-reviewed
TL;DR
- Focuses on adversarial lifecycle edge cases including stale replay and credential rotation
- Uses a zero-dependency Node 24+ core running via decoupled JSONL subprocess IPC
- Separates security regressions (FAIL) from undeclared runtime capabilities (UNSUPPORTED)
Testing Authority Invariants in Agentic Workflows
When AI agents execute mutations on production environments, revoking permissions must instantly freeze all in-flight and queued actions. The agent-governance-test-harness project provides an automated adversarial suite designed to test boundary conditions across lifecycle transitions. Instead of certifying generic agent behavior, it evaluates explicit qualification closeouts.
Tested transition scenarios include:
- Approval revocation restart stale replay: An action is approved, its write capability is revoked, the system undergoes a graceful restart, and the original approval is replayed. The harness verifies execution remains rejected.
- Foreign principal ingress refusal: A second authenticated principal presents a prior principal's valid review ID. The gateway must refuse execution before review consumption.
- Authority contraction across credential rotation: Tests capability attenuation when credentials are replaced in memory and SQLite storage.
Subprocess Architecture and Integration
The harness core requires Node 24+ and carries zero runtime dependencies. Runtime testing works via a decoupled JSONL subprocess protocol, meaning you do not need to rewrite your agent in TypeScript. Python 3 standard library adapters are bundled for reference.
Run the test runner against the reference subprocess adapter:
npm run harness -- run --runtime subprocess-reference --suite currentThe test suite classifies outputs into PASS, FAIL, or UNSUPPORTED. An UNSUPPORTED flag indicates that the target runtime does not declare a required capability (such as persistent storage or human-review workflows), separating missing feature sets from active security regressions.
