fix(executor): materialize annotated field defaults#2811
Open
Harshirchauhan-log wants to merge 2 commits into
Open
fix(executor): materialize annotated field defaults#2811Harshirchauhan-log wants to merge 2 commits into
Harshirchauhan-log wants to merge 2 commits into
Conversation
452e806 to
3bccfd1
Compare
|
✅ No security or compliance issues detected. Reviewed everything up to 45d10ed. Security Overview
Detected Code Changes| Change Type | Relevant files ... (code changes summary truncated to fit VCS comment limits.) |
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
Testing
uv run pytest -q tests/unit/test_registry_repository.py tests/unit/executor/test_service_arg_defaults.py tests/unit/executor/test_minimal_runner_protocol.py tests/unit/executor/test_test_backend_no_registry_action.py tests/unit/executor/test_untrusted_runner.pyuv run ruff check tracecat/executor/service.py tracecat/executor/minimal_runner.py tracecat/executor/backends/test.py tracecat/executor/untrusted_runner.py tracecat/validation/common.py tests/unit/test_registry_repository.py tests/unit/executor/test_service_arg_defaults.py tests/unit/executor/test_minimal_runner_protocol.py tests/unit/executor/test_test_backend_no_registry_action.py tests/unit/executor/test_untrusted_runner.pyuv run basedpyright tracecat/executor/service.py tracecat/executor/minimal_runner.py tracecat/executor/backends/test.py tracecat/executor/untrusted_runner.py tracecat/validation/common.py tests/unit/test_registry_repository.py tests/unit/executor/test_service_arg_defaults.py tests/unit/executor/test_minimal_runner_protocol.py tests/unit/executor/test_test_backend_no_registry_action.py tests/unit/executor/test_untrusted_runner.pygit diff --checkRelated Issues
Fixes #2620
Screenshots / Recordings
N/A, backend execution fix.
Steps to QA
Run the regression tests above, or create a workflow using an action with
Annotated[..., Field(default=...)], omit that input, and confirm execution succeeds.Summary by cubic
Materializes
AnnotatedFielddefaults for omitted UDF inputs across runners and applies frozen registry manifest defaults in the service layer to prevent runtime errors. Preserves optional defaults during JSON Schema →pydanticround-trips. Fixes #2620.materialize_annotated_field_defaultsin minimal, untrusted (after stripping__tracecat), and test backends; support mutable defaults (copy on use), per-call and data-aware default factories; do not deep-copy factory results.prepare_resolved_contextand_prepare_step_contextwithout overwriting provided values.pydanticconversion: preserve optional defaults, supportanyOf/oneOfunions andnull, and avoid replacing provided defaults withNone.Written for commit 45d10ed. Summary will update on new commits.