Repository navigation
fix: honor failed workflow dependencies before task dispatch - #5936
MervinPraison merged 1 commit into
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
[Medium impact] The PR appears safe to merge. SummaryThe PR checks failed dependencies before workflow tasks run through either entry point.
No actionable issues were found. Tests were reviewed but not run.
|
|
@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Review changes in this PR. Python SDK: praisonaiagents, praisonai. TypeScript SDK: src/praisonai-ts/. Do NOT modify src/praisonai-rust. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding. MANDATORY READ (before reviewing):
Phase 1: Review per AGENTS.md
MANDATORY COMMENT FORMAT — include this Phase 1 table in your review comment: Phase 1 — AGENTS.md review
For TypeScript PRs (src/praisonai-ts/), also add: Phase 2: FIX Valid Issues Phase 3: Final Verdict |
|
Security review: PASS (Advisory only. This is a fork PR from an outsider, so a maintainer must merge it. I reviewed it from the PR data alone; I did not check out or run any of the code.)
No deterministic risk flags were included in the request, and the checklist above found none. Code reviewWhat it does
The fix is minimal and reuses existing helpers. There are no new params, exports or modules, so it fits AGENTS.md's lightweight rule. Changing Points for the maintainer to verify (I could not read the surrounding code)
Tests: good parametrized coverage, 24 cases (2 entry points × 2 × 2 sync/async combinations × 3 policies). Suggestion: add a 3-task chain (A fails → B skipped → C) to cover the failure propagating more than one step. Verdict: this is a minimal, safe fix that makes failure handling stricter. Once points 1 and 3 are confirmed, it is OK to merge after manual review. |
Problem
A workflow task whose predecessor failed can still dispatch through
next_tasks, despite the default stop-on-dependency-failure policy. The async scheduler checks failed dependencies only inside one batch-flush branch, and the synchronous scheduler does not check them before workflow dispatch.This surfaced in review of #5933, but is independently reproducible on unchanged main: returning
Nonefrom the first task marks it failed and still invokes the second agent. It is not introduced by the guardrail rejection marker, so this fix is separate from that PR.Minimal repair
Reuse the existing
_deps_failedand_should_continue_on_dep_failurechecks at the actual AgentTeam dispatch boundary, after necessary async flushes and before either sync or async task invocation. The synchronous workflow dispatcher uses the same checks. No new router, failure policy, API, or Process-generator rewrite.Explicit dependent
on_error="continue"andskip_on_failure=Truekeep their existing degraded-mode behavior. Successful dependencies retain context propagation.Validation
Base
1aeee2f39eae8ef79b0d5283b0e40448967b835d.Summary by CodeRabbit
Bug Fixes
on_error="continue"orskip_on_failure=True.Tests