Skip to content

feat(flows): remove require_approval / HITL-approval from Workflows entirely#4667

Closed
graycyrus wants to merge 2 commits into
tinyhumansai:mainfrom
graycyrus:feat/flows-remove-approval
Closed

feat(flows): remove require_approval / HITL-approval from Workflows entirely#4667
graycyrus wants to merge 2 commits into
tinyhumansai:mainfrom
graycyrus:feat/flows-remove-approval

Conversation

@graycyrus

Copy link
Copy Markdown
Contributor

Removes the require_approval / HITL-approval concept from Workflows entirely — flow runs never park for approval. A Run-button/scheduled flow run has no thread_id/client_id, so a parked approval could never surface → deadlock (hit repeatedly in testing). Per product decision: workflows only; chat approval untouched.

Backend

  • approval/gate.rsTrustedAutomationSource::Workflow now always returns Allow (no park path). The "workflow run has require_approval enabled — parking" log is gone.
  • agent/turn_origin.rsWorkflow is now a unit variant (dropped the require_approval field).
  • tinyflows/caps.rs — removed escalated_origin_for_prompt / the Supervised-tier prompt escalation. ⚠️ Behavior change: a Supervised-tier flow's http_request/code node no longer forces a HITL prompt — it runs unattended (matches "flows never park"). The hard Block floor is kept.
  • flows/require_approval removed from types/ops/schemas/tools/builder_tools/bus; store column kept but always written 0 and no longer read.

Frontend

  • Removed all flow approval UI: WorkflowPromptBar (no more hardcoded true), ChatRuntimeProvider/flowsApi proposal mapping, WorkflowProposalCard hint, canvasDraft, FlowCanvasPage, FlowsPage; deleted FlowApprovalCard; FlowRunInspectorDrawer pending-approval banner removed (still shows pending_approval as a normal status). i18n: 11 dead keys removed across all 14 locales.
  • Untouched (chat approval): ApprovalRequestCard + approvalApi (0 diff). The per-node config.requires_approval checkpoint (flows_resume) is a distinct feature, left intact.

Verification

cargo check/fmt clean · flows:: 241 · tinyflows:: 91 · approval:: 82 (+ a "workflow origin never parks" test) · typecheck/lint/vitest 879/879 green · clean merge with #4665 + #4662.

graycyrus added 2 commits July 8, 2026 00:57
… Workflows entirely

Workflow runs never park for approval. A Run-button/scheduled flow run has no
thread_id/client_id, so a parked approval could never surface -> deadlock. Per product
decision (workflows only; chat approval untouched), rip out flow approval end to end.

- approval/gate.rs: TrustedAutomationSource::Workflow always returns Allow (no park path).
- agent/turn_origin.rs: Workflow is now a unit variant (dropped require_approval field).
- tinyflows/caps.rs: removed escalated_origin_for_prompt / the Supervised-tier prompt
  escalation (BEHAVIOR CHANGE: a Supervised flow's http_request/code node no longer forces
  a HITL prompt — it runs unattended, matching "flows never park"). Hard Block floor kept.
- flows/: removed require_approval from types/ops/schemas/tools/builder_tools/bus; store
  column kept but always written 0 and no longer read.
- frontend: removed all flow approval UI (WorkflowPromptBar, ChatRuntimeProvider proposal
  mapping, WorkflowProposalCard hint, canvasDraft, FlowCanvasPage, FlowsPage, deleted
  FlowApprovalCard; FlowRunInspectorDrawer pending-approval banner removed). i18n: 11 dead
  keys removed across all 14 locales.
- UNTOUCHED (chat approval): ApprovalRequestCard + approvalApi (0 diff). Per-node
  config.requires_approval checkpoint (flows_resume) is a distinct feature, left intact.

cargo check/fmt clean; flows:: 241, tinyflows:: 91, approval:: 82 pass; typecheck/lint/
vitest 879/879 green.
@graycyrus graycyrus requested a review from a team July 7, 2026 19:29
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4eb9f24f-85f2-4c4f-aa0c-a25db833291c

📥 Commits

Reviewing files that changed from the base of the PR and between cd0b08e and f5e41f0.

📒 Files selected for processing (54)
  • app/src/components/chat/WorkflowProposalCard.test.tsx
  • app/src/components/chat/WorkflowProposalCard.tsx
  • app/src/components/flows/FlowListRow.test.tsx
  • app/src/components/flows/FlowRunInspectorDrawer.tsx
  • app/src/components/flows/SuggestedWorkflows.test.tsx
  • app/src/components/flows/WorkflowCopilotPanel.test.tsx
  • app/src/components/flows/WorkflowPromptBar.test.tsx
  • app/src/components/flows/WorkflowPromptBar.tsx
  • app/src/components/flows/__tests__/FlowRunInspectorDrawer.test.tsx
  • app/src/components/notifications/FlowApprovalCard.test.tsx
  • app/src/components/notifications/FlowApprovalCard.tsx
  • app/src/components/notifications/NotificationCenter.tsx
  • app/src/hooks/useWorkflowBuilderChat.test.ts
  • app/src/lib/flows/canvasDraft.ts
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/pages/FlowCanvasPage.tsx
  • app/src/pages/FlowsPage.test.tsx
  • app/src/pages/FlowsPage.tsx
  • app/src/pages/__tests__/FlowCanvasPage.test.tsx
  • app/src/providers/ChatRuntimeProvider.tsx
  • app/src/providers/__tests__/ChatRuntimeProvider.test.tsx
  • app/src/services/api/flowsApi.test.ts
  • app/src/services/api/flowsApi.ts
  • app/src/store/chatRuntimeSlice.ts
  • gitbooks/developing/architecture/flows-on-tinyagents.md
  • src/openhuman/agent/turn_origin.rs
  • src/openhuman/approval/gate.rs
  • src/openhuman/flows/agents/workflow_builder/prompt.md
  • src/openhuman/flows/builder_tools.rs
  • src/openhuman/flows/builder_tools_tests.rs
  • src/openhuman/flows/bus.rs
  • src/openhuman/flows/ops.rs
  • src/openhuman/flows/ops_tests.rs
  • src/openhuman/flows/schemas.rs
  • src/openhuman/flows/store.rs
  • src/openhuman/flows/store_tests.rs
  • src/openhuman/flows/tools.rs
  • src/openhuman/flows/tools_tests.rs
  • src/openhuman/flows/types.rs
  • src/openhuman/tinyflows/caps.rs
  • src/openhuman/tools/ops.rs

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5e41f07da

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

<FlowApprovalCard key={item.id} notification={item} />
) : (
{coreActionItems
.filter(item => !isFlowApproval(item))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore a resume path for paused flow runs

When a workflow still has a node-level config.requires_approval checkpoint, the Rust side still records the run as pending_approval and publishes a flow-pending-approval:* notification with the node ids (src/openhuman/flows/ops.rs::notify_pending_approval), and resumeFlow is still the client RPC for continuing it. Filtering these notifications here removes the only UI that extracted those ids and called flows_resume, so affected runs cannot be approved from the app and remain parked until TTL/cancel even though the checkpoint feature was left in place.

Useful? React with 👍 / 👎.

@graycyrus

Copy link
Copy Markdown
Contributor Author

Closing — over-scoped. The ask is just to DEFAULT require_approval to false for workflow-created flows, keeping the require_approval concept/field/gate/UI intact. Replacing with a minimal default-false fix.

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