feat(workflow-executor): add FORCE_AI_ERROR dev mode#1593
Merged
Scra3 merged 8 commits intoMay 26, 2026
Conversation
06cd386 to
cdc58b4
Compare
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (3)
🛟 Help
|
…rror paths locally Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…NV=production) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oduction guard Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… diff Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…dev mode - Fix env var name in always-error-ai-model-port comment (WORKFLOW_EXECUTOR_FORCE_AI_ERROR → FORCE_AI_ERROR) - Restore _config parameter on loadRemoteTools to match AiModelPort interface - Log when production guard silently ignores forceAiError=true - Update logStartup to show 'forced-error (dev only)' as aiConfig when forceAiError is active - Strengthen build-workflow-executor tests: assert mutual exclusion of adapters - Add cli test for FORCE_AI_ERROR='false' (must not activate forceAiError) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…er logStartup branches - Revert accidental mcpServerId → sourceId regression from #1583 (RemoteTool exposes sourceId, not mcpServerId; the TS error blocked the build-workflow-executor test suite) - Add logStartup tests for forceAiError and aiConfigurations branches to reach coverage threshold Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s (regression from merge) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
73a2af7 to
fd00427
Compare
EnkiP
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
AlwaysErrorAiModelPortadapter that makes every AI call fail immediatelyFORCE_AI_ERROR=trueenv var (parsed incli-core.ts, passed asforceAiErroroption)start:with-executor:ai-errorscript inpackages/_examplefor one-command local testingUsage
# in packages/_example yarn start:with-executor:ai-errorOr manually:
Every AI-dependent step returns
status: errorwith"The AI service is unavailable."— lets you exercise all executionType error paths without a real AI service.🤖 Generated with Claude Code
Note
Add
FORCE_AI_ERRORdev mode to workflow-executor to force AI call failuresAlwaysErrorAiModelPortin always-error-ai-model-port.ts, anAiModelPortimplementation whoseinvoke()always rejects withAiModelPortError.FORCE_AI_ERROR=trueactivates this adapter viabuildCommonDependenciesin build-workflow-executor.ts; the flag is silently ignored in production.NODE_ENV=production; in production the flag is ignored and normal AI adapter selection applies.Macroscope summarized fd00427.