#3538·Archon

bug(workflows): trigger_rule all_done does not neutralize an upstream provider failure

Author: skargaklopCreated Sep 26, 2026Updated Sep 26, 2026

Problem

trigger_rule: all_done schedules the downstream node, but it does not clear the upstream failure from the enclosing loop/run.

Observed on Archon 0.10.1 with an ordered reviewer fallback:

  1. Reviewer candidate A ended in a provider 503.
  2. Its all_done adapter wrote a structured REVIEW_UNAVAILABLE result.
  3. Reviewer candidate B then produced a valid REVIEW_READY.
  4. The enclosing loop still stayed failed because candidate A remained terminally failed.

So a designed fallback cannot recover the workflow. The downstream node runs, but the parent status is still poisoned by the earlier provider failure. Unsupported soft-failure keys are ignored, so there is no workflow-level way to say "this upstream failure is an expected fallback input."

This blocks a common pattern: try provider A, and only if it is unavailable try provider B, without the first 503 killing the packet loop.

Possible solution

Treat an expected fallback failure as structured data instead of a terminal parent failure.

One engine-level fix:

  • Add an explicit node/edge outcome such as on_failure: continue or failure_policy: fallback for nodes that already use trigger_rule: all_done.
  • When that policy is set, record the upstream error on the node result, mark the node completed_with_failure (or equivalent), and do not fail the enclosing loop solely because that node failed.
  • Keep the default unchanged: all_done without the new policy still surfaces the upstream failure.
  • Emit the upstream error as a bounded field (node, error_class, message) so the downstream adapter can read it without scraping logs.

A composition-level fix that works with the current engine:

  • Put each provider candidate in its own discoverable workflow.
  • Call one candidate at a time through a one-item composed fan-out with join: all_done.
  • A failed instance should become a structured archon_failed aggregate marker while the outer node completes successfully.
  • The parent workflow then runs the next candidate only when the normalized marker says ready: false.
  • Document that max_parallel: 1 limits concurrency, not total calls.
  • Add an engine regression where candidate A fails, candidate B succeeds, and the parent loop status is success.

The current workaround is the composition pattern above. It is easy to get wrong, and dry-run currently fails on reachable composed fan-out nodes, so an explicit fallback policy would be the smaller user-facing fix.