Skip to content

docs: design note for approval auto mode (#995) - #996

Merged
ajianaz merged 2 commits into
developfrom
docs/approval-auto-mode
Nov 19, 2026
Merged

ajianaz merged 2 commits into
developfrom
docs/approval-auto-mode

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Step 1 of #995: the design note docs/approval-auto-mode.md and a new "Approval auto mode (#995, proposed)" section in docs/threat-model.md. Docs only, no code.

Why

The owner asked that a pending approval expire at 10 minutes and then an agent judge it. That turns "no answer" from deny into a possible allow and moves the approval security boundary, so the design and the threat model need the owner's read before any implementation (step 2).

Changes

  • docs/approval-auto-mode.md: current behaviour verified in approvals.rs and serve.rs (EXPIRY_SECS = 900 is used for five things; no timer of its own; the real events are approval_requested / approval_resolved, there is no approval_expired or approval_decided), who judges, an owner-written path allow-list (default empty) and the never-auto list with reasons, a fail-closed table, audit-first ordering with a non-announced committing claim, timing (floor 300 s, default 600 s, human hard expiry 900 s) and the race with a late human decision, restart and durability limits, config shape (default off, user config only), insertion points (rows marked verified or to-verify), gateway/desktop/webhook interaction, budget, residual risk (a workspace edit is delayed code execution), test plan, and owner decisions A1 to A18.
  • docs/threat-model.md: one new section with threat rows.
  • docs/epics.md is not changed: its design-note list is the Track E one and does not list webhook or event notes.

Testing

Docs only; nothing built or run. Code references were checked by reading the files. An independent read-only review of the first version said FIX FIRST (wrong claim about the human route's audit failure, judge input built from an 80-character preview, understated code-execution risk, timing and durability gaps, missing never-list entries); every finding is addressed in the current head. A second look at the rewritten audit-first ordering is part of step 2 before any code is written.

Proposes an opt-in judge for approvals nobody answered: who judges, a
code-side allow-list of eligible classes, fail-closed paths, audit,
timing and the race with a late human decision, config shape, insertion
points, test plan and owner decisions A1 to A14. Adds the matching
threat-model section. Design only, no code.
Audit-first order for an auto allow with a non-announced claim, the real
human-route order, judge input from the raw edit with a whole-edit cap,
a path allow-list instead of the guard denylist, delayed code execution
and the judge's limits stated, redaction and provider egress, timing
bounds and retention, durability and restart, TOCTOU and the never list,
decisions A15 to A18, and verified insertion-point markers.
@ajianaz
ajianaz merged commit a0fbb1b into develop Nov 19, 2026
30 checks passed
@ajianaz
ajianaz deleted the docs/approval-auto-mode branch November 20, 2026 08:35
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