Skip to content

feat(netwatch): real Governor approval loop via guardrail-fabric - #42

Merged
mdheller merged 1 commit into
mainfrom
feat/netwatch-governor-loop
Aug 3, 2026
Merged

feat(netwatch): real Governor approval loop via guardrail-fabric#42
mdheller merged 1 commit into
mainfrom
feat/netwatch-governor-loop

Conversation

@mdheller

@mdheller mdheller commented Aug 3, 2026

Copy link
Copy Markdown

Closes the security-critical half of gap #2 (the observe→act loop): netwatch's proposed actions no longer route into the void. The env-var approval stub becomes a real guardrail-fabric PolicyDecision.

The Governor surface

  • turtle-netwatch decide --action A --target T --approve|--deny [--reason R] — records a real guardrail-fabric PolicyDecision (allow/deny). Fail-closed: without guardrail-fabric a network mutation cannot be authorized (explicit $PROPHET_GUARDRAIL_FABRIC honored alone — no silent sibling fallback).
  • turtle-netwatch pending — proposed actions still awaiting a Governor decision.
  • propose: consent-admit → Governor. Default ESCALATE (human required); a recorded ALLOW + --apply ⇒ applied; a recorded DENY ⇒ refused. Decisions keyed by (capability, target), consistent across propose/decide/pending.

Proven end-to-end (real policy-fabric + guardrail-fabric engines)

approve → applied · deny → refused (exit 3) · undecided → pending · default → escalate. 11 tests pass (4 new hermetic Governor unit tests incl. the fail-closed-without-guardrail case). Runbook updated with the decide/pending flow.

Also fixed the same explicit-root fail-closed bug in the consent-plane binding (an explicit $PROPHET_POLICY_FABRIC miss now fails closed instead of falling through to a sibling).

Remaining half of loop #2 (graph memory): hellgraph ingestion of the agent.v1 KnowledgeUpdate delta — needs a small TS ingest entrypoint in hellgraph (its graph API is addNode/addEdge, no JSON-CLI). Tracked as the paired follow-on.

Closes the security-critical half of loop #2: netwatch proposals no longer route
into the void. The env-var approval stub is replaced by a real guardrail-fabric
PolicyDecision.

- decide --action A --target T --approve|--deny: records a guardrail-fabric
  PolicyDecision (allow/deny). Fail-closed — without guardrail-fabric a network
  mutation cannot be authorized (explicit $PROPHET_GUARDRAIL_FABRIC honored alone).
- pending: lists proposed actions still awaiting a Governor decision.
- propose: consent-admit -> Governor. Default ESCALATE (human required); a
  recorded ALLOW + --apply => applied; a recorded DENY => refused. Decisions keyed
  by (capability, target), consistent across propose/decide/pending.
- also fixed the same explicit-root fail-closed bug in the consent-plane binding.

Proven end-to-end (real policy-fabric + guardrail-fabric): approve->applied,
deny->refused (exit 3), undecided->pending, default->escalate. 11 tests pass
(4 new Governor unit tests, hermetic). Runbook updated with the decide/pending flow.

Remaining half of loop #2 (graph memory): hellgraph ingestion of the agent.v1
KnowledgeUpdate delta (needs a TS ingest entrypoint) — tracked separately.
@mdheller
mdheller merged commit 9272447 into main Aug 3, 2026
6 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant