Skip to content

fix(workflows): validate dispatch defaults - #4181

Open
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/workflow-default-validation
Open

fix(workflows): validate dispatch defaults#4181
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/workflow-default-validation

Conversation

@WOLIKIMCHENG

@WOLIKIMCHENG WOLIKIMCHENG commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate workflow-level integration, model, and options defaults before dispatch
  • reject malformed defaults before unvalidated execution can create run state
  • cover invalid, valid, and null default shapes

Verification

  • All checks passed!
  • focused workflow default validation tests (16 passed)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Validates workflow dispatch defaults before initial execution.

Changes:

  • Preserves malformed defaults for validation.
  • Adds shape validation and pre-execution safeguards.
  • Adds validation and execution tests.
Show a summary per file
File Description
src/specify_cli/workflows/engine.py Adds default validation and execution guard.
tests/test_workflows.py Covers valid, invalid, and null defaults.

Review details

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +993 to +995
dispatch_default_errors = _dispatch_default_errors(definition)
if dispatch_default_errors:
raise ValueError(" ".join(dispatch_default_errors))

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address Copilot feedback and fix test & lint errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants