Repository navigation
Conversation
Strix Security Review✅ No open security findings. PR summary: The PR scopes the flow engine's substitution of the router result with the stored human-feedback object to the method that actually produced that feedback, so ordinary routers and later kickoffs keep their own return values. It also deep-copies declarative state defaults instead of shallow-copying them and gives each flow instance its own id when it inherits a shared class-level state default. Review summaryNo security vulnerabilities found in the changed code. I traced the two new feedback-scoping guards, the deep-copied state defaults and the per-instance id re-minting through their callers and consumers; all three independently validated payload suspicions were rejected because the changed lines only narrow a previously broader substitution, never reach a decision an outside party controls, and the identity/id changes strictly improve per-flow isolation. Two non-security notes for the author: the Ruled out (4)
Review 1 on this PR · Reviewed by Strix |
Related issue
Fixes #9586
Summary
When a Flow records human feedback (or in repeated kickoffs of the same Flow instance),
self.last_human_feedbackremains stored on the flow. Previously,_execute_listenersand_execute_start_methodunconditionally fell back toself.last_human_feedbackfor any router result payload without checking whether the triggering router was actually the method that produced the feedback. As a result, subsequent ordinary routers (such as an invoice router or a conditional branching router on a second kickoff) had their return values overridden by the earlierHumanFeedbackResult, leading toAttributeErrorin downstream listeners.This fix verifies that
self.last_human_feedback.method_namematches the triggering method before substituting the router outcome payload with the feedback result. Ordinary routers and later clean kickoffs preserve their own return values as listeners' arguments, while actual@human_feedback(emit=...)routers continue to deliver their feedback payload to their listeners.Verification
self.last_human_feedbackexists from a previous step or run.@human_feedbackcontinue to correctly deliver their feedback object to downstream listeners.Additional context
Note: This PR was prepared with AI assistance and verified locally.