You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix execution skill: recognize "Completed" as a terminal success status (#52)
* Fix execution skill: recognize "Completed" as a terminal success status
trigger_workflow.py --wait and monitor_execution.py were checking only
for a "Succeeded" status, but live testing against the execution-results
API showed a normal successful execution reports "Completed" instead —
so both scripts polled to their full timeout and exited 1 on every
successful run, misreporting success as failure/timeout.
Add "completed" to TERMINAL_STATUSES and a new SUCCESS_STATUSES set in
get_execution_results.py (the shared source of truth both other scripts
import from), use it for monitor_execution.py's exit code, and document
the Succeeded/Completed distinction in SKILL.md.
Verified against two real executions: monitor_execution.py now reports
"Completed" within seconds (previously ran to the full timeout), and
trigger_workflow.py --wait no longer false-timeouts on a normal run.
* Add regression tests and changelog entry for terminal-status fix
- test_get_execution_results.py: guard "completed" is terminal, and add
a TestSuccessStatuses class covering SUCCESS_STATUSES.
- test_monitor_execution.py: regression test reproducing the reported
bug (a "Completed" result must exit 0, not fall to the non-zero branch).
- test_trigger_workflow.py: regression test for poll_results recognizing
"Completed" as terminal (previously ran to the full --wait timeout).
- CHANGELOG.md: document the fix under [Unreleased] / Fixed.
* docs: reflect completed as a success status in console-verification table
get_execution_results.py now treats succeeded or completed as success (SUCCESS_STATUSES); update the console-verification 'Determine success' row to match.
---------
Co-authored-by: Matt Raible <matt.raible@crowdstrike.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
12
12
13
13
### Fixed
14
14
15
+
-**`monitor_execution.py` and `trigger_workflow.py --wait` no longer misreport a successful execution as a failure/timeout.** Both polled only for a `Succeeded` terminal status, but live testing against the execution-results API showed a normal successful execution reports `Completed` — so every successful run polled to its full timeout and exited non-zero. `get_execution_results.py`'s shared `TERMINAL_STATUSES` now includes `completed`, and a new `SUCCESS_STATUSES` set (both scripts' single source of truth for the exit-code decision) treats `succeeded` and `completed` as success.
15
16
-**`validate.py` now flags `WorkflowCustomVariable.<name>` references to variables that nothing declares** — a release-only failure. A reference to a custom variable that no `CreateVariable` (or `UpdateVariable` setter) declares imports and validates cleanly, then fails at release with `property "..." contains unknown variable "WorkflowCustomVariable.<name>"`. The validator now collects declared variable names and reports an undeclared reference before you deploy.
16
17
-**`validate.py` no longer rejects valid action IDs that aren't 32-char hex.** The action-ID check assumed every ID was a 32-character hex string (or a `<hex>_<hex>` / `<hex>~<hex>` compound), but real catalog actions carry other shapes — a 26-character ULID joined to a hex id (custom IOC / API-integration actions), unequal compound halves (event query actions), and longer hex strings (RTR actions). Those imported fine yet were flagged as invalid locally. IDs are now treated as opaque catalog identifiers, so the check still rejects placeholders (UPPER_SNAKE tokens, punctuation, all-same-character) without blocking real IDs. Docs updated to describe action IDs as identifiers you look up rather than "32-char hex".
Copy file name to clipboardExpand all lines: skills/execution/SKILL.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,9 @@ metadata:
35
35
36
36
This skill runs Fusion workflows that are already deployed and released, watches them to completion, retrieves their output, and helps debug failures. Writing the YAML happens in the **authoring** skill; importing and releasing happens in the **deployment** skill.
37
37
38
-
An execution moves through states and ends in a **terminal** state. The terminal states are `Succeeded`, `Failed`, `Canceled`, `NonRecoverable`, and `ActionRequired`. (`ActionRequired` is terminal for polling: it waits on human input and will not progress on its own.) Anything else means the execution is still running.
38
+
An execution moves through states and ends in a **terminal** state. The terminal states are `Succeeded`, `Completed`, `Failed`, `Canceled`, `NonRecoverable`, and `ActionRequired`. (`ActionRequired` is terminal for polling: it waits on human input and will not progress on its own.) Anything else means the execution is still running.
39
+
40
+
> **`Succeeded` vs `Completed`.** Live testing against the execution-results API found that a normal successful execution reports its top-level `status` as `Completed`, not `Succeeded` — the scripts in this skill treat both as success (see `SUCCESS_STATUSES` in `get_execution_results.py`). Don't assume `Succeeded` is the only success value when reading raw API output yourself.
39
41
40
42
> **Running the scripts.** Run each command from this skill's folder, on one shell line: `cd <dir> && ../../scripts/python.sh scripts/<name>.py` (a sibling skill's script is `../<skill>/scripts/<name>.py`). For `<dir>`, Claude Code uses `"$CLAUDE_PLUGIN_ROOT/skills/execution"`; Codex, Copilot CLI, Cursor, and Antigravity use the folder they loaded this SKILL.md from (e.g. `~/.agents/skills/execution`). The wrapper bootstraps its own Python venv.
41
43
@@ -145,7 +147,7 @@ Parameters come from `--params` (a JSON string) or interactive prompts derived f
Defaults: `--interval 5`, `--timeout 300`. Prints status updates to stderr and the final result to stdout. Exits `0` only when the execution `Succeeded`; non-zero on any other terminal state or timeout, so CI can react.
150
+
Defaults: `--interval 5`, `--timeout 300`. Prints status updates to stderr and the final result to stdout. Exits `0` only on a successful terminal state (`Succeeded` or `Completed`); non-zero on any other terminal state or timeout, so CI can react.
0 commit comments