Repository navigation
feat(platform): let one automation write without approval - #4763
Merged
Merged
Conversation
An owner or admin can now allow ONE automation to make ONE write action (slack.send_message, http.send, ...) without a person approving each run, instead of auto-approving the action for every automation in the organization's approval_policy. - Migration 0197: app.automation_approval_allowances (org, automation, connector, action, granted_by, granted_at_ms, note). - The gate reads the allowance for an automation's step (also the policy-only inline path). A rule requiring a person for the action still wins; resolveApprovalDecision says on whose word a write runs. - setApprovalAllowances reconciles the set under the automation's name lock, one audit row per grant or withdrawal; only write actions of the shipped catalog; removed with the automation; an erased granter becomes the pseudonym (erasure pass automationAllowances). - App routes: GET /automations/:name/approval-allowances (authors) lists the latest version's write actions with their allowances and who granted them; PUT sets them (owner or admin only). - APV-R13.
- General tab: a "Runs without approval" section, one switch per write action the latest version makes (and per allowance no step uses any more), saying who allowed it and when. An owner or admin changes it, saved with the tab's one Save; a developer sees it read-only. - Canvas: an allowed write's box carries a "Runs without approval" chip, and its write mark says an owner or admin allowed it; the node inspector says the same. - App contract and adapter for the allowance read and write; the change emits the automation's hint so open editors refresh. - en/de/fr strings.
Respond to a waiting workflow gains a section on the General tab's Runs without approval (who grants it, what it lets through, that a policy rule requiring a person still wins, the audit trail); the operator's approval policy page says where an allowance sits among the rules. en/de/fr.
AUTO-F135: an owner allows one automation's Slack send, a live run posts without a card, the canvas and audit log say so, another automation still waits, a developer sees it read-only, and a require_approval rule makes the run wait again. German strings use Schreibzugriff, as the run catalog does.
A checkApprovalAllowances lane: a granted allowance lets that automation's Slack send pass the gate while another automation still asks; the General tab's read names the granter; withdrawing it makes the write ask again; deleting the automation removes what is left.
A write on the platform's own surface (tasks, documents, conversations) never waits by default, and an approval_policy rule decides an action whatever an allowance says. So: - writeActionOf refuses platform-auth connectors: the General tab lists, and the store accepts, only writes to an outside system. - Each row says when the organization's approval policy decides it (a rule that requires a person, or one that already allows it), instead of claiming the write asks before each run. - The docs say which writes the section lists.
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
A write that waits for a person on every run can now be allowed for one automation, without loosening the organization's approval policy for every other automation.
0197_automation_approval_allowances): one row per automation and write action, with who granted it and when.automation.approval_allowance.granted|revoked).resolveApprovalDecision: a policy rule decides first, then the allowance, then the default.source: 'automation').source: 'connector', so an allowance never widens them.GET /api/app/automations/:name/approval-allowancesfor authors, returningcanGrant.PUTfor Owner and Admin only.approvals-in-workflows(en/de/fr) with a screenshot, plus a note in the self-hosted approvals configuration page.checkApprovalAllowances.Verification (local)
tsc, oxlint on changed files, and oxfmt check.lint:links,lint:manual,knip.checkApprovalAllowanceson a throwaway Postgres after rebasing on main: 82/82.http.sendlive run waits for a person.PUTanswers 403.Later