Skip to content

Align max-turns integration test with current frontmatter schema semantics#36521

Merged
pelikhan merged 1 commit into
mainfrom
copilot/fix-test-or-code
Jun 2, 2026
Merged

Align max-turns integration test with current frontmatter schema semantics#36521
pelikhan merged 1 commit into
mainfrom
copilot/fix-test-or-code

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 2, 2026

CI was failing in pkg/workflow because TestMaxTurnsValidation still treated a string literal max-turns value as valid. Current schema rules reject string literals for max-turns and only accept numeric values (or expression-based forms in allowed contexts).

  • Problem alignment

    • Updated the failing test case in TestMaxTurnsValidation from a “valid string” expectation to an invalid-case expectation.
    • Renamed the subtest to reflect intent (invalid string max-turns).
  • Behavior codified

    • The test now asserts compile failure for max-turns: "5" with engine: claude, matching schema enforcement.
    • Existing valid cases (integer and zero) remain unchanged.
  • Representative change

    # before (test expected success)
    engine:
      id: claude
      max-turns: "5"
    
    # after (test now expects failure)
    engine: claude
    max-turns: "5"

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title test(workflow): fix max-turns validation test for CI failure Align max-turns integration test with current frontmatter schema semantics Jun 2, 2026
Copilot AI requested a review from pelikhan June 2, 2026 20:02
@pelikhan pelikhan marked this pull request as ready for review June 2, 2026 21:01
Copilot AI review requested due to automatic review settings June 2, 2026 21:01
@pelikhan pelikhan merged commit 4b3bfc1 into main Jun 2, 2026
@pelikhan pelikhan deleted the copilot/fix-test-or-code branch June 2, 2026 21:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates TestMaxTurnsValidation to match current frontmatter schema behavior: max-turns must be a YAML integer (or a ${{ ... }} expression in allowed contexts), and numeric strings like "5" are invalid and should fail compilation.

Changes:

  • Flip the max-turns: "5" case from “expected success” to “expected failure”.
  • Rename the subtest to reflect the invalid-input intent.
  • Adjust the YAML snippet for the invalid case to use the current top-level max-turns form (engine: claude, max-turns: ...).
Show a summary per file
File Description
pkg/workflow/max_turns_test.go Aligns the max-turns validation test expectation with the schema’s templatable_integer rules (reject numeric strings).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

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