Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 25, 2025

Part of #2388. Semantic function clustering analysis identified validation functions scattered across files. Three validation methods in compiler.go belong in validation.go with related validation logic.

Changes

  • Moved validateHTTPTransportSupport() from compiler.go (line 2949) to validation.go (line 451)
  • Moved validateMaxTurnsSupport() from compiler.go (line 2968) to validation.go (line 470)
  • Moved validateWebSearchSupport() from compiler.go (line 2992) to validation.go (line 494)

All functions retain their *Compiler receiver and exact signatures. All required imports (fmt, os, console) already present in validation.go. Function calls in compiler.go unchanged.

Net change: -60 lines compiler.go, +60 lines validation.go

Original prompt

This section details on the original issue you should resolve

<issue_title>[task] Move validation functions from compiler.go to validation.go</issue_title>
<issue_description>## Objective
Relocate 3 validation functions from pkg/workflow/compiler.go to pkg/workflow/validation.go to improve code organization and separation of concerns.

Context

Part of issue #2388. The semantic function clustering analysis identified that validation functions are scattered across files. Three validation functions are currently misplaced in compiler.go when they should be in validation.go with other validation logic.

Approach

  1. Move validateHTTPTransportSupport() from line 2949 in compiler.go to validation.go
  2. Move validateMaxTurnsSupport() from line 2968 in compiler.go to validation.go
  3. Move validateWebSearchSupport() from line 2992 in compiler.go to validation.go
  4. Ensure all method receivers and imports are properly maintained
  5. Update any references if needed

Files to Modify

  • Move from: pkg/workflow/compiler.go (lines 2949, 2968, 2992)
  • Move to: pkg/workflow/validation.go

Acceptance Criteria

AI generated by Plan Command for #2388</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Move validation functions to validation.go for better organization Move validation functions from compiler.go to validation.go Oct 25, 2025
Copilot AI requested a review from pelikhan October 25, 2025 10:41
@pelikhan pelikhan marked this pull request as ready for review October 25, 2025 10:42
Copilot AI review requested due to automatic review settings October 25, 2025 10:42
Copy link
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

This PR relocates three validation functions from compiler.go to validation.go to improve code organization and separation of concerns. The functions are moved without modification, maintaining their *Compiler receivers and exact signatures.

  • Moved validateHTTPTransportSupport(), validateMaxTurnsSupport(), and validateWebSearchSupport() to validation.go
  • All required imports (fmt, os, console) already exist in validation.go
  • Function calls in compiler.go remain unchanged

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/workflow/validation.go Added three validation functions for HTTP transport, max-turns, and web-search support
pkg/workflow/compiler.go Removed the same three validation functions that were relocated to validation.go

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

@github-actions
Copy link
Contributor

Agentic Changeset Generator triggered by this pull request.

@pelikhan pelikhan merged commit 42172d3 into main Oct 25, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/move-validation-functions branch October 25, 2025 10:54
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.

[task] Move validation functions from compiler.go to validation.go

2 participants