Skip to content

Fix parallel smoke test: stub do_action for the run-completed hook#398

Merged
chubes4 merged 1 commit into
mainfrom
fix/parallel-smoke-do-action-stub
Jul 3, 2026
Merged

Fix parallel smoke test: stub do_action for the run-completed hook#398
chubes4 merged 1 commit into
mainfrom
fix/parallel-smoke-do-action-stub

Conversation

@chubes4

@chubes4 chubes4 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

#397 added do_action( 'wp_agent_workflow_run_completed', … ) at the runner's terminal funnel. tests/workflow-parallel-smoke.php defines its own inline WordPress stubs but only had add_filter/apply_filters/add_action — not do_action — so run() under those stubs hit "Call to undefined function do_action()" and the smoke job fataled (exit 255). This adds the missing do_action stub (dispatching callbacks registered via the existing add_action/add_filter stubs).

Production code is correct — WordPress provides do_action; only this test's harness lacked the stub. All workflow smoke tests pass locally after the fix.

Fixes the PHP smoke tests failure introduced by #397.

AI assistance

  • AI assistance: Yes
  • Tool(s): Claude Opus 4.8 via Claude Code
  • Used for: Diagnosing the missing-stub CI failure and adding the do_action stub.

workflow-parallel-smoke.php defines its own inline WordPress stubs and had
add_filter/apply_filters/add_action but not do_action. The runner now fires
do_action( 'wp_agent_workflow_run_completed', ... ) at the terminal funnel, so
run() under this stub set hit "Call to undefined function do_action()" and the
test fataled (exit 255). Add the missing do_action stub — it dispatches the
callbacks registered via the add_action/add_filter stubs — so the completion
hook fires in the test the same way it does under WordPress. Production code is
unaffected; only the test harness lacked the stub.

## AI assistance
- **AI assistance:** Yes
- **Tool(s):** Claude Opus 4.8 via Claude Code
- **Used for:** Diagnosing the missing-stub CI failure and adding the do_action stub.
@chubes4 chubes4 merged commit 11f43f3 into main Jul 3, 2026
2 checks passed
@chubes4 chubes4 deleted the fix/parallel-smoke-do-action-stub branch July 3, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant