feat(automations): add test-run gate to creation - #16915
XiaoFeiCode wants to merge 1 commit into
Conversation
❌ Mock-LLM E2E Tests63/66 passed · 1 failed · 2 skipped Commit: Details
🔍 Failure details (1)❌ automations/mock-llm-automation.spec.ts › mock-LLM automation lifecycle › step 2: create automation and dispatch run via the UIPosted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses) |
|
🚦 CI is currently failing on this PR's latest commit. Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request This is an automated check - no AI was used to generate this comment. |
1 similar comment
|
🚦 CI is currently failing on this PR's latest commit. Please fix the failing checks before OpenHands reviews it - this is re-checked automatically once you push a new commit. (A maintainer can also request This is an automated check - no AI was used to generate this comment. |
HUMAN:
I manually verified both the successful and failed test-run flows. When a test run fails, the enable action is no longer shown, the error output remains visible, and the test can be retried. After a successful test run, the automation can be enabled. The overall workflow behaves as expected.
AGENT:
The automation setup flow was exercised end to end against the stateful Mock Local backend: a bundle was created disabled, manually dispatched, polled through completion, linked to its spawned conversation, and enabled only after the successful run. The failure state was also reproduced with preserved service output and no enable action.
Why
Creating an automation currently redirects users as soon as the record exists, even though integrations, runtime execution, or the automation itself may still fail. The first scheduled or event-triggered execution can therefore run untested automation code.
Summary
Issue Number
Fixes #16567
How to Test
Automated checks run locally:
npm test -- --run __tests__/api/automation-handlers.test.ts __tests__/manifests/manifest-actions.test.ts __tests__/components/manifest/manifest-setup-dialog.test.tsx— 36/36 tests passednpm run lint— passed with 0 errors; 3 unrelated pre-existing warnings remainnpm run check-translation-completeness— passednpm run build— passedgit diff --check— passedManual reproduction:
npm run dev:mockand select the Mock Local backend.Video/Screenshots
Successful test run — rerun or enable/finalize:
Failed test run — actionable error preserved and no enable action:
Type
Notes
Raw bundle automations need the companion backend change in OpenHands/automation#387 so the record can be created disabled atomically. Prompt/plugin creation already supports the same field.