<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dan Mercede</title>
    <description>The latest articles on DEV Community by Dan Mercede (@danmercede).</description>
    <link>https://dev.to/danmercede</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3923648%2F1e0611d1-7f32-4988-be5c-ff9c989aee10.png</url>
      <title>DEV Community: Dan Mercede</title>
      <link>https://dev.to/danmercede</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danmercede"/>
    <language>en</language>
    <item>
      <title>Pre-Execution Authority Gates: Why Governance Must Be Evaluated Before State Mutation</title>
      <dc:creator>Dan Mercede</dc:creator>
      <pubDate>Sat, 20 Jun 2026 07:37:55 +0000</pubDate>
      <link>https://dev.to/danmercede/pre-execution-authority-gates-why-governance-must-be-evaluated-before-state-mutation-3cl9</link>
      <guid>https://dev.to/danmercede/pre-execution-authority-gates-why-governance-must-be-evaluated-before-state-mutation-3cl9</guid>
      <description>&lt;p&gt;Part I — Runtime Governance Engineering&lt;/p&gt;

&lt;p&gt;The runtime governance control plane begins with a non-negotiable premise: governance cannot operate as a post-hoc advisory function. Advisory governance depends on observability layers and probabilistic alerts triggered after state mutation has already occurred. This architecture accepts that unauthorized actions can execute before intervention. That latency is systemic risk. Governance evaluated after execution is telemetry. Telemetry is not enforcement. To mitigate systemic risk, governance must exist as a deterministic constraint evaluated strictly before any state mutation occurs.&lt;/p&gt;

&lt;p&gt;When an execution framework treats governance as an external observer rather than a foundational constraint, it inevitably permits untrusted compute nodes to initiate actions that must subsequently be mitigated. True governance demands deterministic enforcement at the execution boundary, ensuring that an agent physically cannot execute a disallowed command. By shifting the evaluation entirely to the pre-execution phase, the system guarantees that no network packet leaves the agent enclave and no database transaction is initialized without explicit cryptographic authorization. The intelligence layer determines its intended action, but the physics of the control plane dictate what is physically possible to execute.&lt;/p&gt;

&lt;p&gt;The architecture enforces a non-bypassable control plane. This means the execution substrate physically and cryptographically lacks the network routing, identity credentials, and memory pathways to interact with external APIs or databases directly. To enforce this, AI models and agents are treated as untrusted compute nodes. They are strictly isolated in ephemeral, lane-isolated memory enclaves, implemented natively as distinct namespaces or microVMs.&lt;/p&gt;

&lt;p&gt;Within these hardware-isolated lanes, agents are physically incapable of resolving external DNS or establishing direct outbound TCP connections. All tools provided to the agent are actually internal RPC stubs. When an agent attempts an action, it merely passes a structured intent payload to the RPC stub, which forwards it to the control plane. Because the execution node is stripped of routing primitives and external credentials, the authority gate becomes structurally non-bypassable. Every intended action must traverse the control plane, where it is subjected to deterministic evaluation. Enforcement occurs precisely at this juncture: at the structural boundary between the execution substrate and external state or API layers.&lt;/p&gt;

&lt;p&gt;The Runtime Governance Control Plane is the sole routing and enforcement boundary. It is explicitly designed to be devoid of probabilistic reasoning; it operates purely on deterministic logic. The Pre-Execution Authority Gate inspects the intended state mutation payload. To ensure that human intent is enforced with sub-millisecond evaluation latency at runtime, high-level human policies are compiled into low-level deterministic rules. These execution roles map to Attribute-Based Access Control (ABAC) and Role-Based Access Control (RBAC) constraints defined in the signed policy.&lt;/p&gt;

&lt;p&gt;The validation engine architecture isolates the request payload and evaluates it against the loaded, compiled policy constraints in memory. Simultaneously, signature verification mechanisms verify the identity signature of the requesting agent and check it against the active session ledger. Evaluation logic within this engine is strictly binary. The architecture maintains a default-deny posture; if the request lacks necessary context, or if the policy does not explicitly permit the action, the state is flagged as indeterminate. Ambiguity translates directly to an execution halt. There is no fallback to probabilistic scoring or secondary inference models. The compiled policy must explicitly match the intended intent, or the action is denied at the threshold.&lt;/p&gt;

&lt;p&gt;When validation fails, enforcement is instantaneous and absolute. Enforcement occurs synchronously in memory at RPC ingress. On failure, execution halts instantly. The payload is discarded before routing is ever established. If ambiguity exists in either the execution intent or the policy mapping, the system defaults to a hard execution halt. The state mutation request is dropped, and the execution thread is suspended or terminated.&lt;/p&gt;

&lt;p&gt;Any attempt to bypass the RPC stubs and communicate directly with external IP addresses results in packet drops at the container boundary. Furthermore, if a halt is triggered, the engine freezes the agent's memory state and opens an escalation pathway, routing the frozen context back to the human authority layer for review. This ensures that the agent cannot autonomously retry or attempt to subvert the blocked request; the execution thread remains cryptographically locked in its frozen state until explicitly unblocked or destroyed by the human-defined escalation protocol.&lt;/p&gt;

&lt;p&gt;A deterministic enforcement system requires immutable cryptographic proof that a policy was evaluated and either permitted or blocked. At the Authority Gate layer, the artifact that proves enforcement is a trace log detailing the specific boolean evaluation failure. If an execution boundary bypass is attempted, substrate network egress rejection logs serve as the proof of enforcement.&lt;/p&gt;

&lt;p&gt;For deeper state tracking, the immutable receipts service guarantees that every material action, whether approved or denied, generates a receipt. This architecture provides absolute non-repudiation. Receipts are written to an append-only ledger using cryptographic hash chaining, such as Merkle trees. The receipt journals the state mutation by including the agent's exact request payload, the specific policy version evaluated, the cryptographic signatures of both, and the timestamp. For a denied request, the artifact that proves enforcement is the cryptographic hash generated by the Immutable Receipt Service. Because the system requires synchronous receipt generation before finalizing the mutation, no action can occur off the books. If the receipt cannot be written to the ledger, the transaction is rolled back and execution halts. Enforcement is not inferred. It is cryptographically attested by the chained ledger entry representing the constrained state transition.&lt;/p&gt;

&lt;p&gt;If governance is not deterministically enforced before state mutation, it is not governance. It is hope.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.danmercede.com/2026-05-20-pre-execution-authority-gates/" rel="noopener noreferrer"&gt;danmercede.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>security</category>
      <category>softwareengineering</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>The Authority Gate, Made Runnable: Fail-Closed Merge Admission for Agent-Written Code</title>
      <dc:creator>Dan Mercede</dc:creator>
      <pubDate>Sat, 20 Jun 2026 07:37:54 +0000</pubDate>
      <link>https://dev.to/danmercede/the-authority-gate-made-runnable-fail-closed-merge-admission-for-agent-written-code-2199</link>
      <guid>https://dev.to/danmercede/the-authority-gate-made-runnable-fail-closed-merge-admission-for-agent-written-code-2199</guid>
      <description>&lt;p&gt;Part I — The Gate, Made Runnable&lt;/p&gt;

&lt;p&gt;Every argument for runtime governance eventually meets the same objection: show me. The pre-execution authority gate is a clean idea — evaluate authority before state mutation, halt on ambiguity, never fall back to probabilistic scoring — but an idea is not an artifact. failclosed is the artifact: the authority gate applied to one narrow, high-frequency mutation boundary, the merge.&lt;/p&gt;

&lt;p&gt;The choice of boundary is deliberate. A merge is small, concrete, and constant, and it is where AI-written code crosses from proposal into production state. It is also where the current generation of tooling fails in a specific, instructive way.&lt;/p&gt;

&lt;p&gt;Part II — Why Advisory Review Fails Open&lt;/p&gt;

&lt;p&gt;The dominant pattern in AI code review relays the model's own verdict. A reviewer model reads a diff, decides whether it looks acceptable, and the surrounding tool treats that decision as the gate. When the model says "looks good," the change is mergeable. This is advisory governance, and advisory governance fails open by construction.&lt;/p&gt;

&lt;p&gt;Consider the failure that matters most: the reviewer's output is not clean. It is truncated by a token limit, malformed by a formatting slip, or internally contradictory — a verdict of "needs fixes" attached to a findings list where not one finding cites a file or a line. A human reading that output distrusts it immediately. An advisory tool does the opposite. With no clean verdict to relay, it defaults to permitting the merge, because permitting is the path of least resistance and no deterministic rule forces a stop. The reviewer becomes a single point of silent failure precisely when its output is least trustworthy.&lt;/p&gt;

&lt;p&gt;The cost is not abstract. A merge is a state mutation. An ungoverned merge of agent-written code is an irreversible state change with no attestation of who, or what, authorized it. In a regulated environment, that is audit indefensibility — the inability to prove, after the fact, that a change was admitted under an enforced rule rather than a model's good mood.&lt;/p&gt;

&lt;p&gt;Part III — Distrust the Reviewer&lt;/p&gt;

&lt;p&gt;failclosed treats the reviewer the way the control plane treats an agent: as an untrusted compute node whose output is inadmissible until proven. It runs the reviewer, and then it refuses to trust the verdict.&lt;/p&gt;

&lt;p&gt;The output passes through a deterministic parser. The gate refuses to report MERGE_READY when that output is unparseable, schema-invalid, or self-contradictory. Take the contradictory case: verdict "fix," no finding citing a file. An advisory tool, finding no actionable findings, reports the change clean and admits it. failclosed reads the same output, recognizes that a "fix" verdict with no located finding is an indeterminate state, and halts. Ambiguity translates to a stop. There is no fallback to "probably fine," because a fallback to "probably fine" is the precise mechanism by which ungoverned actions execute.&lt;/p&gt;

&lt;p&gt;This is the posture of the pre-execution authority gate, narrowed to the merge boundary: enforcement precedes the mutation, the default is deny, and a merge that cannot be deterministically evaluated does not proceed. The reviewer's confidence is an input to be checked, not an authority to be obeyed.&lt;/p&gt;

&lt;p&gt;Part IV — Receipts Over Logs&lt;/p&gt;

&lt;p&gt;A decision that cannot be inspected is not enforcement; it is a side effect. Every failclosed run emits a structured, inspectable record — what was reviewed, what failed the gate, and why the final status is what it is. This is attestation, not telemetry. A log says an event happened. A receipt says a decision was made, on this input, under this rule, with this outcome, and it can be read back and reproduced.&lt;/p&gt;

&lt;p&gt;That distinction is what makes the gate auditable. An auditor does not have to trust that failclosed ran, or that it ran correctly. They read what it decided. The verdict and its grounds are durable artifacts, not transient console output discarded after the build.&lt;/p&gt;

&lt;p&gt;Part V — The Boundary Is the Example, Not the Point&lt;/p&gt;

&lt;p&gt;The merge is a small case, chosen because it is public and runnable in two minutes. The principle does not depend on the case. Anywhere an AI system's output gates a state mutation — a deployment, a payment, a configuration change, a database write — the same structure holds. The model proposes. A deterministic gate disposes. The gate distrusts the model's own confidence and defaults to deny when the input is ambiguous. Capability is removed at the boundary, not requested politely from a system free to ignore the request.&lt;/p&gt;

&lt;p&gt;failclosed is not a novel reviewer; better reviewers keep arriving. It is the discipline around the reviewer — the parser, the fail-closed gate, the receipt — and that discipline is the part that does not depend on which model reads the diff this quarter. The model is replaceable. The gate is the product.&lt;/p&gt;

&lt;p&gt;That is the difference between governance and hope. failclosed is public and runnable: github.com/OrionArchitekton/failclosed. The same enforcement model, applied across an enterprise agent stack rather than a single merge gate, is a Runtime Governance Readiness Scan at danmercede.com.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.danmercede.com/2026-06-08-authority-gate-made-runnable/" rel="noopener noreferrer"&gt;danmercede.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>devops</category>
      <category>security</category>
    </item>
  </channel>
</rss>
