feat(flows): remove require_approval / HITL-approval from Workflows entirely#4667
feat(flows): remove require_approval / HITL-approval from Workflows entirely#4667graycyrus wants to merge 2 commits into
Conversation
… 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.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (54)
Comment |
There was a problem hiding this comment.
💡 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)) |
There was a problem hiding this comment.
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 👍 / 👎.
|
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. |
Removes the
require_approval/ HITL-approval concept from Workflows entirely — flow runs never park for approval. A Run-button/scheduled flow run has nothread_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.rs—TrustedAutomationSource::Workflownow always returnsAllow(no park path). The"workflow run has require_approval enabled — parking"log is gone.agent/turn_origin.rs—Workflowis now a unit variant (dropped therequire_approvalfield).tinyflows/caps.rs— removedescalated_origin_for_prompt/ the Supervised-tier prompt escalation.http_request/codenode no longer forces a HITL prompt — it runs unattended (matches "flows never park"). The hardBlockfloor is kept.flows/—require_approvalremoved from types/ops/schemas/tools/builder_tools/bus; store column kept but always written0and no longer read.Frontend
WorkflowPromptBar(no more hardcodedtrue),ChatRuntimeProvider/flowsApiproposal mapping,WorkflowProposalCardhint,canvasDraft,FlowCanvasPage,FlowsPage; deletedFlowApprovalCard;FlowRunInspectorDrawerpending-approval banner removed (still showspending_approvalas a normal status). i18n: 11 dead keys removed across all 14 locales.ApprovalRequestCard+approvalApi(0 diff). The per-nodeconfig.requires_approvalcheckpoint (flows_resume) is a distinct feature, left intact.Verification
cargo check/fmtclean ·flows::241 ·tinyflows::91 ·approval::82 (+ a "workflow origin never parks" test) ·typecheck/lint/vitest879/879 green · clean merge with #4665 + #4662.