Skip to content

fix(dsl): structure trigger validation errors - #3152

Open
tracerat[bot] wants to merge 1 commit into
mainfrom
fix/trigger-validation-error-envelope
Open

fix(dsl): structure trigger validation errors#3152
tracerat[bot] wants to merge 1 commit into
mainfrom
fix/trigger-validation-error-envelope

Conversation

@tracerat

@tracerat tracerat Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • convert trigger-schema validation failures into the standard ActionErrorInfo map
  • preserve individual field errors as children in the TRIGGER expression context
  • keep workflow error handlers and parent workflows from receiving nested tuple/list details

Testing

  • uv run pytest --confcutdir=tests/unit tests/unit/test_dsl_workflow_error_unwrap.py -q
  • uv run ruff check tracecat/dsl/workflow.py tests/unit/test_dsl_workflow_error_unwrap.py tests/temporal/test_workflows.py
  • uv run ruff format --check tracecat/dsl/workflow.py tests/unit/test_dsl_workflow_error_unwrap.py tests/temporal/test_workflows.py
  • uv run basedpyright tracecat/dsl/workflow.py tests/unit/test_dsl_workflow_error_unwrap.py tests/temporal/test_workflows.py
  • uv run pre-commit run --files tracecat/dsl/workflow.py tests/unit/test_dsl_workflow_error_unwrap.py tests/temporal/test_workflows.py

The existing Temporal trigger-validation regression assertion was tightened for the new envelope and will run in CI; the local host does not provide the required service stack.


Summary by cubic

Standardizes trigger input validation errors by wrapping them in an action-compatible ActionErrorInfo envelope with TRIGGER context. Prevents tuple/list detail payloads from leaking to workflow error handlers while preserving field-level errors.

  • Bug Fixes
    • Convert trigger-schema failures into a single ActionErrorInfo map in ApplicationError.details (root ref <root>, type ValidationError).
    • Keep field errors as children with expr_context TRIGGER (e.g., default_number, ticket_key), using the original pydantic error type and message.
    • Tighten Temporal tests to assert the new error shape and compatibility with ActionErrorInfoAdapter.

Written for commit 8e1d63a. Summary will update on new commits.

Review in cubic

@tracerat tracerat Bot added engine Improvements or additions to the workflow engine fix Bug fix logging labels Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine Improvements or additions to the workflow engine fix Bug fix logging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants