Guard extension contract and the weakest-link decision #1986

Closed
opened 2026-11-14 14:42:48 +00:00 by sam · 2 comments
Owner

Guards are extensions. Each judges one concrete action and returns a verdict: a ceiling on the five-level scale, findings with evidence, the strength of the evidence, and blind spots. The action runs at the lowest ceiling; a sequence takes the lowest level of its actions. A guard with no concern returns act quietly. A guard that fails, times out, answers partially or lacks its evidence sets propose and wait, unless it is advisory: an advisory guard's verdict is recorded and sets no ceiling. Every verdict is recorded with the decision.

Done when: two guards judge the same action and the lower ceiling wins; a failing guard holds the action; an advisory guard's verdict is recorded without affecting the level.

Spec: section 5, decision tree 8.3, R22.

Guards are extensions. Each judges one concrete action and returns a verdict: a ceiling on the five-level scale, findings with evidence, the strength of the evidence, and blind spots. The action runs at the lowest ceiling; a sequence takes the lowest level of its actions. A guard with no concern returns act quietly. A guard that fails, times out, answers partially or lacks its evidence sets propose and wait, unless it is advisory: an advisory guard's verdict is recorded and sets no ceiling. Every verdict is recorded with the decision. Done when: two guards judge the same action and the lower ceiling wins; a failing guard holds the action; an advisory guard's verdict is recorded without affecting the level. Spec: section 5, decision tree 8.3, R22.
sam added the featurehigh labels 2026-11-14 14:42:48 +00:00
sam added a new dependency 2026-11-14 14:42:59 +00:00
sam added a new dependency 2026-11-14 14:43:01 +00:00
sam added a new dependency 2026-11-14 16:02:46 +00:00
Author
Owner

From the 2026-11-16 module review. Before the first guard lands:

  • Build the judgement module first (ARCHITECTURE 2.1 already names it). It owns the concrete action (connector, action, target kind, environment, input, digest), the verdict with its ceiling and the weakest-link fold, hard rules before guards (#1989), and execution with the digest check (#1990). The agent's tool set and every workflow step that acts go through it. Today the only gate is the read-only filter in modules/runs/investigate.go (offered); that filter becomes a class default, not the gate.
  • The action class lives in judgement, not in modules/connectors. Connectors keep the contract's effect declaration; a guard must not import connectors to learn what an action is.
  • Guards are hosted by the connectors module (2.1: it hosts connectors, guards and secret engines). Judgement calls them through its API, so no new copy of the extension host is needed.
  • One acceptance shape. Connectors and MCP servers are accepted through two hand-written request types, and only MCP declares its actions at acceptance. Merge them into one acceptance with a transport variant, shared validation, and declared actions required for every package, so judgement can enumerate what any connector may run before it starts.
From the 2026-11-16 module review. Before the first guard lands: - **Build the judgement module first** (ARCHITECTURE 2.1 already names it). It owns the concrete action (connector, action, target kind, environment, input, digest), the verdict with its ceiling and the weakest-link fold, hard rules before guards (#1989), and execution with the digest check (#1990). The agent's tool set and every workflow step that acts go through it. Today the only gate is the read-only filter in `modules/runs/investigate.go` (`offered`); that filter becomes a class default, not the gate. - **The action class lives in judgement**, not in `modules/connectors`. Connectors keep the contract's effect declaration; a guard must not import connectors to learn what an action is. - **Guards are hosted by the connectors module** (2.1: it hosts connectors, guards and secret engines). Judgement calls them through its API, so no new copy of the extension host is needed. - **One acceptance shape.** Connectors and MCP servers are accepted through two hand-written request types, and only MCP declares its actions at acceptance. Merge them into one acceptance with a transport variant, shared validation, and declared actions required for every package, so judgement can enumerate what any connector may run before it starts.
Author
Owner

Done (archie-core 55077620b, archipelago 40121f6): proto/guard/v1 contract; guards are accepted packages (PUT/DELETE /api/guards/{name}) judged in parallel with the built-in guards under a host-enforced deadline; the lowest ceiling wins, a failing, timed-out or ceiling-less guard holds at propose and wait unless advisory, and every verdict records the package name, version and digest. Table test covers each rule through the extension path. Example guard: archipelago guards/business-hours.

Done (archie-core 55077620b, archipelago 40121f6): proto/guard/v1 contract; guards are accepted packages (PUT/DELETE /api/guards/{name}) judged in parallel with the built-in guards under a host-enforced deadline; the lowest ceiling wins, a failing, timed-out or ceiling-less guard holds at propose and wait unless advisory, and every verdict records the package name, version and digest. Table test covers each rule through the extension path. Example guard: archipelago guards/business-hours.
sam closed this issue 2026-11-15 18:24:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1986