Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkg/workflow/stop_after.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,11 @@ func (c *Compiler) processSkipIfMatchConfiguration(frontmatter map[string]any, w
}
workflowData.SkipIfMatch = skipIfMatchConfig

if c.verbose && workflowData.SkipIfMatch != nil {
if workflowData.SkipIfMatch != nil {
if workflowData.SkipIfMatch.Max == 1 {
fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skip-if-match query configured: %s (max: 1 match)", workflowData.SkipIfMatch.Query)))
stopAfterLog.Printf("Skip-if-match query configured: %s (max: 1 match)", workflowData.SkipIfMatch.Query)
} else {
fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skip-if-match query configured: %s (max: %d matches)", workflowData.SkipIfMatch.Query, workflowData.SkipIfMatch.Max)))
stopAfterLog.Printf("Skip-if-match query configured: %s (max: %d matches)", workflowData.SkipIfMatch.Query, workflowData.SkipIfMatch.Max)
}
}
Comment on lines +358 to 364
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

While the conversion of skip-if-match console output to debug logging is good, there's an inconsistency with similar stop-after diagnostic messages in the same file (lines 81, 83, 90, 103, 105) that still use fmt.Fprintln(os.Stderr, console.FormatInfoMessage(...)) with verbose checks. For consistency and to reduce console noise uniformly, consider converting those messages to debug logging as well using stopAfterLog.Printf(). All these messages are diagnostic information in the same category (workflow:stop_after namespace), so they should follow the same pattern.

Copilot uses AI. Check for mistakes.

Expand All @@ -375,11 +375,11 @@ func (c *Compiler) processSkipIfNoMatchConfiguration(frontmatter map[string]any,
}
workflowData.SkipIfNoMatch = skipIfNoMatchConfig

if c.verbose && workflowData.SkipIfNoMatch != nil {
if workflowData.SkipIfNoMatch != nil {
if workflowData.SkipIfNoMatch.Min == 1 {
fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skip-if-no-match query configured: %s (min: 1 match)", workflowData.SkipIfNoMatch.Query)))
stopAfterLog.Printf("Skip-if-no-match query configured: %s (min: 1 match)", workflowData.SkipIfNoMatch.Query)
} else {
fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skip-if-no-match query configured: %s (min: %d matches)", workflowData.SkipIfNoMatch.Query, workflowData.SkipIfNoMatch.Min)))
stopAfterLog.Printf("Skip-if-no-match query configured: %s (min: %d matches)", workflowData.SkipIfNoMatch.Query, workflowData.SkipIfNoMatch.Min)
}
}

Expand Down