feat(execution): propagate trigger context from CLI, HTTP, and MCP hosts#6
Draft
aryasaatvik wants to merge 1 commit intofeat/execution-engine-persistencefrom
Draft
Conversation
Flows the trigger: { kind, meta } option the engine added in the
previous PR end-to-end so the runs UI can facet by attribution
surface. Also promotes recording writes from Effect.ignore to a
defect-absorbing variant so a misconfigured storage backend can't
take down an execution.
Surfaces:
- HTTP API (packages/core/api): /executions POST now declares an
x-executor-trigger optional header. Handler reads it (defaulting to
"http") and passes it as the engine's trigger option.
- MCP host (packages/hosts/mcp): explicit trigger: { kind: "mcp" } on
engine.execute (inline elicitation path) and engine.executeWithPause
(paused flow).
- CLI: stamps every /executions call from executeCode with
x-executor-trigger: cli. Covers call, search, describe, sources —
every subcommand that runs code goes through this helper.
Engine robustness:
- Introduced silent helper (Effect.catchAllCause(() => Effect.void))
and swapped every bookkeeping .pipe(Effect.ignore) over to it.
Effect.ignore only catches typed failures; a synchronous throw
inside an adapter (e.g. storage-drizzle when the schema is missing
the execution model) becomes a defect and was bypassing ignore.
With silent, misconfigured storage just means no row — the
execution itself succeeds.
Verified by the MCP stdio integration test which previously leaked
the [storage-drizzle] unknown model error into the MCP tool result
text. Now returns the expected code result.
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.
Stacked review copy of upstream RhysSullivan#399 · stacked on RhysSullivan#398.
Prev:
feat/execution-engine-persistenceNext:
feat/app-drizzle-schemas-executionsSee upstream PR #399 for full description.