Skip to content

Use type: terminate for polyphony error-terminal nodes (conductor type:terminate) #538

Description

@PolyphonyRequiem

Summary

conductor v0.1.18 ships type: terminate (#219) — a step that ends a workflow explicitly with status: success or status: failed, producing:

  • A typed workflow_completed / workflow_failed event with is_explicit: true
  • CLI exit code 0 (success) or non-zero (failed)
  • A termination_reason field in the event

Polyphony currently routes error-terminal paths to $end with no typed signal. Wagner's PR #535 (error-gate migration) auto-routes 16 error gates to abort_run which calls polyphony run abort — but the workflow still exits through $end, not a typed terminal.

What to do

After error-routing PR #229 merges (it adds CLI exit code 3 for UnhandledWorkflowError), replace abort-path $end routes with type: terminate nodes:

abort_terminal:
  type: terminate
  status: failed
  reason: "{{ abort_run.output.reason | default('run aborted') }}"

This aligns with P7 (Fail Honestly, Don't Auto-Approve) — makes the failure mode explicit and machine-readable.

Dependencies

Effort/Risk

~1-2h. Low semantic risk — additive change to terminal paths only.

References

/cc Epic #521

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions