Skip to content

Epic: fail-closed guards contain proportionately and recover automatically #3813

Closed
11 of 11 issues completed
Closed

Description

@schlessera

Outcome

A fail-closed guard contains a failure to what that failure actually puts at risk. It recovers by itself whenever recovery needs no judgment, and it runs restricted or degraded instead of refusing whenever the threat model allows. A single turn, file, record or cleanup failure never makes the whole host unusable, or unbootable, until a restart or a manual repair.

Why

A hosted instance refused every turn in every chat after one turn's safety-recording write failed. The guard had latched the whole brain, and the only recovery was a hand-run script that needed no judgment (#3810, #3812). An audit of the other guards found the same pattern in several places, listed in the tasks below.

Principle (maintainer ruling, 2026-11-09)

  1. Narrowest scope. Restrict the turn, chat, record or allowance whose state is uncertain, not the brain or the process.
  2. Restrict before refusing. Where a restricted policy (tainted mode, read-only, degraded health) satisfies the threat model, use it. Refuse only when the restriction itself cannot be enforced.
  3. Recover automatically when no judgment is needed. Keep conservative charges and permanent gap facts, but keep reconciling until the uncertainty resolves. Never stop at a fixed retry count and wait for a restart.
  4. Boot. A recoverable historical record (a corrupt object, a bad intent, an interrupted cleanup) is quarantined and marked, and the host boots. It boots restricted if it must, and never refuses to serve.
  5. Diagnosable. Every latch, give-up or quarantine records its cause durably, logs one structured line, and is visible to the owner.

The principle never weakens a security property. An unknown never becomes clean, and an uncertain charge is never released early.

Decision record

docs/decisions/proportionate-containment.md (#3814) states the rule, what it does not change, the checklist every guard PR answers, and the two boot gates #3817 traced and retained.

Tasks

The native sub-issue list is the progress.

Out of scope

Definition of done

  • Every sub-issue is closed.
  • No guard in the tasks above stops reconciling at a fixed retry count, refuses every chat for one chat's failure, or refuses boot over a recoverable historical record, except the two retained boot gates.
  • Each changed guard's PR answers the decision record's checklist, and has a test showing a failure in one scope leaves another scope usable.
  • Each latch, give-up, quarantine or restricted boot records its cause durably and is visible to the owner (principle 5).
  • The decision record and agent guidance match what shipped.

2026-11-10 triage: added the decision record pointer, the later children, the retained boot gates as an exclusion, and a definition of done.

Activity

  1. added
    area: ui-server
    priority: p0
    on Nov 9, 2026
  2. added
    epic
    type: fix
    area: ui-sdk
    area: backends
    area: ui-react
    and removed on Nov 10, 2026
  3. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    2026-11-10 triage at main 3aadc8df5, and epic state.

    Labels. type: epic is not a manifest label. Replaced it with the meta label epic, so project sync keeps this out of Ready, and with type: fix: every coding child restores promised behaviour. Added area: ui-sdk, area: backends and area: ui-react, which #3815, #3816, #3821 and #3810 touch. Kept priority: p0 as set at filing. It matches the manifest's urgency: one failed write left a hosted instance refusing every turn in every chat (#3812, also p0).

    Body. Added a pointer to the decision record, the children filed since (#3821, #3825, #3826), the two boot gates the record retains (as an exclusion), and a definition of done.

    Breakdown. Attached #3489. It gives a reservation with no retry owner a recovery path, which is principle 3. It is the Claude counterpart of #3821. Its 2026-11-08 ruling chose five retries and a terminal "charged until restart". #3815 has since removed that give-up from the shared reconciler, so #3489's policy text needs reconciling before it is picked up.

  4. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Every task under this epic has merged, all on 0.45.0:

    Two follow-ups stay open outside this epic: #3962 (a chat whose first login was pruned, needs a decision) and #3963 (continuing a chat by voice from another device).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendsarea: ui-reactarea: ui-sdkarea: ui-serverepicpriority: p0type: fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions