Repository navigation
feat(delegation): approving delegated work, doctor line, end-to-end test, docs - #757
Merged
Merged
Conversation
…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
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part 6, the last of #714: the user guide, the threat-model rows, the "as built" record, a
tole doctorline and an end-to-end test against the real binary. The default of[delegation] approvalsstaysoff(see Why).Why
The end-to-end test measured what the planned default
ownerwould change for existing users: a delegated child's non-allowlisted Write no longer fails at once, it parks for up toapproval_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 usesdelegatetoday, and it would surprise them, soownerandchainare both opt-in andoffships as the default. The test pins it (offand unset: denied at once, no approvals log). Flipping the default later is one line (#[default]onApprovalsMode) plus a changelog line; the design note records the decision.Changes
docs/approving-delegated-work.md: how to turn it on, list and decide withtole delegation approvalsand/approvalsin serve, opt intochainand thedelegate_decidegrant with--allow, timeouts, what a denial looks like. README section and links,docs/mobile-control.mdalready 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 doctorprintsdelegation approvals: off|owner|chainwith the wait and who answers.tests/delegated_approval_e2e.rs: a child started the waydelegatestarts 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);offand unset deny at once with no approvals log; doctor names each mode.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
/approvalsunder the #700 rules, docs, threat model and tests with mutation checks. Left, none of it needed for the scope: theawaiting_approvalcount indelegate_poll, afact/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
owner, the doctor mode text, the doctor config read and the doctor line itself all fail the end-to-end tests.--workspace --all-targets --all-features -D warningsand-p tole-cli --all-targets --no-default-features,cargo test --workspace,tole-cliwith--no-default-features.Closes #714