Skip to content

🔧 Fix Import Path Detection in Workflow Specification#16208

Merged
dsyme merged 7 commits intomainfrom
wfs
Feb 16, 2026
Merged

🔧 Fix Import Path Detection in Workflow Specification#16208
dsyme merged 7 commits intomainfrom
wfs

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Feb 16, 2026

Summary

  • Refined isWorkflowSpecFormat() to strictly check for workflow specifications using @ version separator
  • Added comprehensive test cases for import path detection
  • Improved git command execution with spinner support in various utility functions

Key Changes

  • Updated import path detection logic to only consider paths with @ as workflow specifications
  • Introduced new test cases covering various path scenarios in imports_test.go
  • Added spinner support for git commands in workflow and repository-related operations
  • Improved error handling and logging for git command executions


✨ PR Review Safe Output Test - Run 22075674041

💥 [THE END] — Illustrated by Smoke Claude

Copilot AI review requested due to automatic review settings February 16, 2026 19:53
@pelikhan
Copy link
Contributor

@dsyme any way to add integrations tests for this in ci.yml?

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 refines import path detection to fix a bug where three-part relative paths (e.g., shared/mcp/arxiv.md) were incorrectly treated as workflowspecs. The fix simplifies the detection logic to only consider paths with @ version separators as workflowspecs, and adds comprehensive test coverage. Additionally, the PR introduces spinner support for git clone operations to improve user feedback during repository operations.

Changes:

  • Simplified isWorkflowSpecFormat() to strictly check for @ version separator, fixing incorrect detection of three-part relative paths
  • Added comprehensive unit and integration tests for import path detection
  • Introduced RunGit() and RunGitCombined() helpers in pkg/workflow/git_helpers.go for git operations with spinner feedback
  • Updated git clone operations in trial repository and package download flows to use spinner-enabled git helpers

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/cli/imports.go Simplified isWorkflowSpecFormat() to only check for @ separator, removing complex path part counting logic
pkg/cli/imports_test.go Added comprehensive test coverage for import path detection including edge cases
pkg/workflow/git_helpers.go Added RunGit() and RunGitCombined() helpers with spinner support for interactive terminals
pkg/cli/trial_repository.go Updated clone operations to use workflow.RunGitCombined() for spinner feedback
pkg/cli/packages.go Added manual spinner management for git clone operations (inconsistent with trial_repository.go approach)

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

@dsyme dsyme merged commit d514e82 into main Feb 16, 2026
52 checks passed
@dsyme dsyme deleted the wfs branch February 16, 2026 20:48
@github-actions github-actions bot mentioned this pull request Feb 16, 2026
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