Skip to content

feat(platform): let one automation write without approval - #4763

Merged
yannickmonney merged 11 commits into
mainfrom
feat/automation-approval-allowances
Oct 11, 2026
Merged

yannickmonney merged 11 commits into
mainfrom
feat/automation-approval-allowances

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

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.

  • Allowances (migration 0197_automation_approval_allowances): one row per automation and write action, with who granted it and when.
    • Granted and withdrawn by an Owner or Admin on the automation's General tab, in a new section, Runs without approval.
    • Each change writes an audit row (automation.approval_allowance.granted|revoked).
    • Deleting the automation removes its allowances.
    • Erasure pseudonymises the granter instead of withdrawing the allowance.
  • Gate:
    • resolveApprovalDecision: a policy rule decides first, then the allowance, then the default.
    • The gate reads the allowance only for an automation's own step (source: 'automation').
    • A rule that requires a person still wins.
    • Agent tool calls are gated as source: 'connector', so an allowance never widens them.
  • Only outside writes: reads, and writes on Tale's own surface (tasks, documents, conversations), are refused as allowances. Reads are never gated and platform writes never wait by default, so an allowance would change nothing for them.
  • UI:
    • The section lists each outside write the latest version makes, plus any allowance no step uses any more.
    • Each row says when a policy rule decides instead.
    • A Developer sees the section read-only.
    • The canvas marks an allowed step Runs without approval, but not when a policy rule still requires a person.
  • Routes:
    • GET /api/app/automations/:name/approval-allowances for authors, returning canGrant.
    • PUT for Owner and Admin only.
  • Docs and tests:
    • New section in approvals-in-workflows (en/de/fr) with a screenshot, plus a note in the self-hosted approvals configuration page.
    • Spec card APV-R13 and manual box AUTO-F135.
    • Integration lane checkApprovalAllowances.

Verification (local)

  • tsc, oxlint on changed files, and oxfmt check.
  • Platform server+pii suite: 87,486 tests.
  • The automations, settings and notifications UI suites: 3,021 tests.
  • The automations browser tests: 93 tests.
  • shared and docs tests, lint:links, lint:manual, knip.
  • Integration lane checkApprovalAllowances on a throwaway Postgres after rebasing on main: 82/82.
  • Live run on a local stack:
    1. An http.send live run waits for a person.
    2. The Owner turns the switch on with the keyboard and saves; the row says who allowed it.
    3. The next live run makes the call straight away.
    4. The canvas step shows the chip.
    5. A Developer sees the switch disabled with the read-only note; their PUT answers 403.

Later

  • MCP settings kind for allowances.
  • The run record's "allowed without approval" line.

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.
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