Skip to content

Conversation

@jrg94-ua
Copy link

Fixes #3376
/claim #3376

Summary

This PR implements a new CLI command for validating Keep workflow YAML files, addressing issue #3376. The new �alidate command ensures strict syntax and structure compliance for workflow definitions, providing clear feedback and robust error handling.

Features

  • New Command: keep workflow validate --file
  • Strict Validation:
    • Checks for required top-level keys (workflow, id,
      ame, riggers)
    • Ensures correct types and non-empty values
    • Validates triggers, steps, and actions structure
    • Handles all error cases with clear, English messages
  • User Feedback:
    • Success and error messages are styled and informative
    • Outputs summary of validated workflow on success
  • Robust Error Handling:
    • Handles missing files, YAML syntax errors, and invalid structure gracefully

Testing

  • Comprehensive test suite: ests/test_workflow_validate.py (covers all edge cases and error conditions)
  • Manual validation against all real workflows in the repository
  • All outputs and error messages are in English

Demo

A full demo of the new validation command is available here:
YouTube Video Demo

Files Changed

  • keep/cli/cli.py (new �alidate command and logic)
  • ests/test_workflow_validate.py (test cases for validation)

Notes

  • No temporary or demo files are included in this PR.
  • All requirements from the issue and bounty have been strictly followed.
  • Code has been reviewed for style, syntax, and consistency with the repository.

- Implements keep workflow validate --file <path> for robust workflow syntax and structure validation.
- Provides clear, English feedback and error handling.
- Adds comprehensive tests for all edge cases.
- Fully covers requirements from issue keephq#3376 and bounty guidelines.
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 22, 2025

Skipped: This PR does not target one of your configured branches: (refactor/2512-nextjs-15)

@vercel
Copy link

vercel bot commented Dec 22, 2025

@jorgerosgomez is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 22, 2025
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dosubot dosubot bot added the CLI CLI related issues label Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Bounty claim CLI CLI related issues size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[➕ Feature]: Add a way to validate Keep workflows from CI

3 participants