feat: hard floors, parked approvals for unattended runs, and why every call was allowed - #249
Merged
Merged
Conversation
Pattern credit: OpenWorker (Andrew Ng and contributors) — dangerous operations are human-only, always. Every path past Prax's HIGH-risk gate could be lowered or skipped: earned trust downgrades browser login steps on self-reported success; the fallback lets the model confirm by calling again; one confirmation can unlock every HIGH tool for the turn; inside spokes the gate isn't enforced unless SPOKE_GOVERNANCE_ENABLED (off in production); a timed grant approves on arrival; and browser_login / browser_credentials, which hand the model a stored password, weren't classified at all. HARD_FLOORS_ENABLED (default off): logging in or revealing credentials, installing or activating code with Prax's authority, and starting a billable GPU run only on a person's decision about that exact call — checked before all of the above. The decision is an out-of-band TeamWork approval that a timed grant did not give (decided_by is now carried through), or, with approvals off, the user's own message naming the action and its target. HARD_FLOOR_EXTRA_TOOLS adds floors; built-ins can't be removed.
Pattern credit: OpenWorker (Andrew Ng and contributors) — unattended runs never self-approve; requests park in an inbox. A scheduled or task-runner turn that reached an action needing a person waited APPROVAL_WAIT_SECONDS for someone who wasn't there, was refused, and lost the work. With PARKED_APPROVALS_ENABLED it creates the TeamWork request with a long lifetime (PARKED_APPROVAL_HOURS, needs teamwork's expires_in_seconds), records what would re-run the task and which exact action is waiting, and ends saying so. A poller re-runs the task when a person approves, spending that approval on that exact action once; refusal or expiry is reported as "not done". A different action asks again, up to PARKED_MAX_RESUMES per task. The store survives restarts. Also: approval outcomes carry expires_at; hard-floor refusals pass a parked message through so the model says the task is waiting.
Pattern credit: OpenWorker (Andrew Ng and contributors) — approval provenance on every tool call. The audit entry of an executed call now carries approval: person:<id>, user_message, auto:user_request, auto:earned_trust, model_reconfirmed, earlier_confirmation, high_risk_not_enforced, or none_needed. The two weak paths — the model confirming itself, and HIGH-risk tools in unenforced spokes — were invisible before; now they're named on every call. Recorded per call, not on the shared turn state, because parallel tool calls share it.
This was referenced Oct 2, 2026
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.
This PR now carries #247 and #248 as well: it was stacked on them, and stacked PRs re-conflict after every squash merge. Both are closed with a pointer. Merge this one.
#247 Hard floors
Some actions always need a person's decision: credentials and logins, plugin install/activate/write, self-deploy, and GPU power-on.
enforce.HARD_FLOORS_ENABLED; extra floors viaHARD_FLOOR_EXTRA_TOOLS. Idea credit: OpenWorker (Andrew Ng et al.).#248 Parked approvals
An unattended run (scheduler or task runner) parks its TeamWork approval instead of failing.
PARKED_APPROVALS_ENABLED,PARKED_APPROVAL_HOURS(24),PARKED_MAX_RESUMES(3).expires_in_seconds).#249 Approval provenance
Every executed call's audit entry records why it was allowed to run:
person:<id>,user_message,auto:user_request,auto:earned_trust,model_reconfirmed,earlier_confirmation,high_risk_not_enforced,none_needed.Original #249 description
Stacked on #248 (itself on #247). Merge those first; I'll rebase this onto
mainafterwards.Pattern credit: OpenWorker (Andrew Ng and contributors): approval provenance on every tool call.
The audit entry of each executed call now carries
approval:person:<id>user_messageauto:user_requestauto:earned_trustmodel_reconfirmedearlier_confirmationhigh_risk_not_enforcednone_neededThe two bold paths were invisible before. Provenance is recorded per call, not on the shared turn state, because parallel tool calls share that. The trifecta gate is covered too; behaviour is unchanged.
Tests:
tests/test_approval_provenance.py(8).make ci: green; no secrets-proxy requests during the run.