Skip to content

The Denial Was Only the First Test

S5·E21

I needed a denial I could inspect

By the end of July, the governed path could describe a file effect and bind a provider child to a daemon-owned session. I still had a more basic question. If the hook tried to consult that local service and the service was absent, would the process stop the protected action?

This was a failure exercise, deliberately bounded to the hook. A Codex hook is a program that runs at a defined point in the harness lifecycle. It can return a decision before a tool runs. A socket is the local connection the hook uses to reach the daemon. I wanted a controlled missing-socket case with a visible denial and no repository mutation attempt. It was a way to qualify the failure behavior before making claims about a real provider session.

For the 31 July exercise, the report describes a controlled patch-shaped input and an intentionally unavailable socket. The hook returned a structured denial. Its reason was a bounded application error rather than a dump of the request or local authority. That confirmed how the hook handled this unavailable-service case. It told me nothing yet about what a real provider would do after launch.

Engineer disconnects an instrument cable on a spillway platform

A deliberate interruption makes the denial path observable. Conceptual illustration.

The connection test exposed a different problem

A passing negative case is a useful result, but the useful next step was to connect the mapper and daemon over the real local transport. Before that test, the focused provider and governed-MCP suite reportedly passed 14 cases. Once the components talked to each other, the request hit a missing field: the daemon expected an idempotency key.

An idempotency key gives a repeated submission a stable identity. If a response is interrupted, the same logical request can be recognized when it is retried. Here the mapper needed to derive the key itself, using the bound handle, the selected tool and the operation ID. If the request carries a stable operation ID and only the transport is retried, those three inputs should stay the same. A different tool or a different operation belongs to a different request.

Historical source excerpt · governed_mcp.py at bec88c59, lines 110–112

        idempotency_material = "\x00".join(
            (self._binding.handle, tool_name, execution.operation_id)
        ).encode()
Explain this code line by line
  1. Start joining the fields with a NUL separator so field boundaries remain explicit.
  2. Take the binding handle, the tool and operation ID in fixed order.
  3. Finish the join and retain the material to hash into the request key.

This increment added a deterministic key to the outgoing envelope. It gives the receiving logic a way to recognize a repeated request. It does not establish exactly-once completion of the underlying tool. The daemon can be interrupted after authorization or after the effect. To answer whether the file was actually written, I still need outcome evidence from the effect boundary.

Follow the decision

Hook attemptProtected operationTransportReal component linkStable keyRecognize the retryEffect checkObserve separately
Hook attemptProtected operationTransportReal component linkStable keyRecognize the retryEffect checkObserve separately
The hook outage stops before the later boxes. On the connected path, a stable retry identity still needs a separate effect check.

Walk one retry through it

Illustrative example. Imagine a bound session has received operation ID op-42 for a file write. A delay cuts off the caller’s response. The retry that preserves the same handle, tool and operation ID maps to the same idempotency key. A separate patch with a new operation ID maps to a different one. Both requests still face the daemon’s current authority checks. A stable key can correlate the attempts even if a later attempt should be denied.

That is a deliberately smaller claim than saying an agent can safely resume any interrupted tool. An ambiguous write needs an independent read of the target or a receipt that specifically covers the result. A second write simply to see if the first one happened would change the question.

One capillary holds a measured blue dye drop

A small controlled observation establishes one outcome at a specific boundary. Conceptual illustration.

Separate the evidence before raising the gate

July evidenceWhat I could say
Controlled missing-socket hook exerciseThe selected protected call returned a bounded denial. No repository mutation was attempted.
Transport integration exposed a missing request fieldIsolated tests had not exercised the full request contract crossing the local connection.
Focused suite expanded from 14 passes to 20The report records a larger post-correction test selection. The result belongs to that selection.
The corrected merge and protected-main checks passedThe source correction passed its reported gates on 31 July.
Later additions in the same reportThe August subprocess and live host canaries belong to the following historical period.

The report now contains later work, including a real provider run, disposable authority tests and a live write-only host canary. Its filename begins on 31 July. The events inside it have different dates. Moving those later results into this chapter would make the July evidence look stronger than it was.

I set the failure boundary and the evidence I needed before advancing it. The agent-assisted work added and exercised the integration path and repaired the request envelope. The retained July material establishes a bounded hook denial and a corrected source contract. There was still a substantial step between that and turning on protected effects on a host.

Two checks are worth keeping together. Exercise denial before the effect, then exercise the real connection between the components. They answer different questions. The next episode takes the same discipline to operational recovery: a signal can be recent and healthy while the recovery result still needs its own evidence.

Glossary and primary references

Hook

An entrypoint invoked by the harness at a defined point in its lifecycle.

Primary reference

Fail closed

Stop a protected effect when the authority needed for it is unavailable.

Primary reference

Idempotency key

A stable identifier for subsequent submissions of one logical request.

Primary reference

Unix domain socket

Local inter-process endpoint used for daemon communication.

Primary reference