Skip to content

feat(delegation): approving delegated work, doctor line, end-to-end test, docs - #757

Merged
ajianaz merged 1 commit into
developfrom
feat/approval-docs
Nov 14, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/approval-docs

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What

Part 6, the last of #714: the user guide, the threat-model rows, the "as built" record, a tole doctor line and an end-to-end test against the real binary. The default of [delegation] approvals stays off (see Why).

Why

The end-to-end test measured what the planned default owner would change for existing users: a delegated child's non-allowlisted Write no longer fails at once, it parks for up to approval_secs (900 s by default, up to the node's deadline) and stalls an unattended mission until nobody answers. That is a behavior change for everyone who uses delegate today, and it would surprise them, so owner and chain are both opt-in and off ships as the default. The test pins it (off and unset: denied at once, no approvals log). Flipping the default later is one line (#[default] on ApprovalsMode) plus a changelog line; the design note records the decision.

Changes

  • docs/approving-delegated-work.md: how to turn it on, list and decide with tole delegation approvals and /approvals in serve, opt into chain and the delegate_decide grant with --allow, timeouts, what a denial looks like. README section and links, docs/mobile-control.md already has the routes.
  • docs/threat-model.md: "Delegation approvals (design: an owner approval surface for delegated children (durable queue, parked and resumed) #714)" with a row each for injection through a request text, a child asking for more than its parent holds, a parent approving on injected instruction, replay, confused deputy, race between levels, orphaned requests, flood and forged record, each with mitigation and residual, plus the always-owner classes.
  • docs/automation-design.md: the reviewer text (read-only permanently, never asks) and a section 13 "as built"; docs/epics.md; the design note (default decision, threat rows moved).
  • tole doctor prints delegation approvals: off|owner|chain with the wait and who answers.
  • tests/delegated_approval_e2e.rs: a child started the way delegate starts one (delegation log and node in its environment) with a mock provider: owner allows via the CLI and the child writes the file and the audit says decided and consumed; owner denies and nothing is written; a timeout denies (waited for the window, audit says expired); off and unset deny at once with no approvals log; doctor names each mode.
  • CHANGELOG.

Closing #714

Everything in the issue's scope is built: the durable fingerprint-bound queue with the chain recorded per request, the child that parks and is denied on timeout, a parent that decides through a Write-tier tool limited to its own authority, the owner's CLI and /approvals under the #700 rules, docs, threat model and tests with mutation checks. Left, none of it needed for the scope: the awaiting_approval count in delegate_poll, a fact/approval_<id> register on the child's own session, an SSE frame for serve, rotation of the approvals log, exit-and-resume for waits over an hour (owner decision 1), and a cheaper origin signal from the registry than the short built-in tool list.

Testing

  • The five end-to-end tests above (real binary; about 2 s).
  • Mutation checks of the new pieces: default owner, the doctor mode text, the doctor config read and the doctor line itself all fail the end-to-end tests.
  • fmt, clippy --workspace --all-targets --all-features -D warnings and -p tole-cli --all-targets --no-default-features, cargo test --workspace, tole-cli with --no-default-features.

Closes #714

…est, docs

Part 6 of #714. Adds the user guide docs/approving-delegated-work.md,
the threat-model rows for the approval queue, the automation-design "as
built" section, a tole doctor line (delegation approvals:
off|owner|chain) and an end-to-end test against the real binary and a
mock provider: a delegated child asks for a Write, the owner allows it
and the child proceeds, the owner denies, a timeout denies, and with
approvals off or unset the child is denied at once as before.

The default stays off: with owner a child's non-allowlisted Write would
park for up to approval_secs instead of failing at once, which would
stall unattended missions for every existing user of delegate. owner and
chain are both opt-in.

Closes #714
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 22efa99 into develop Nov 14, 2026
22 checks passed
@ajianaz
ajianaz deleted the feat/approval-docs branch November 20, 2026 08:36
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.

design: an owner approval surface for delegated children (durable queue, parked and resumed)

2 participants