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: 4 additions & 8 deletions pkg/workflow/known_needs_expressions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ This workflow has custom jobs before and after activation.

// Find the substitution step and check it has the known needs expressions
substStepStart := strings.Index(lockStr, "- name: Substitute placeholders")
require.Greater(t, substStepStart, 0, "Substitution step not found")
require.Positive(t, substStepStart, "Substitution step not found")

// Get the next 100 lines after the substitution step
substSection := lockStr[substStepStart:]
Expand All @@ -519,14 +519,10 @@ This workflow has custom jobs before and after activation.

// Verify prompt creation step does NOT have the known needs expressions
promptStepStart := strings.Index(lockStr, "- name: Create prompt with built-in context")
require.Greater(t, promptStepStart, 0, "Prompt creation step not found")
require.Positive(t, promptStepStart, "Prompt creation step not found")

// Get the prompt creation section
promptSection := lockStr[promptStepStart:]
nextStepIdx = strings.Index(promptSection[50:], "- name:")
if nextStepIdx > 0 {
promptSection = promptSection[:50+nextStepIdx]
}
// Get the prompt creation section (not currently used but kept for potential future checks)
_ = lockStr[promptStepStart:]

Comment on lines +524 to 526

Copilot AI Feb 17, 2026

Copy link

Choose a reason for hiding this comment

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

Computing a value just to assign it to the blank identifier is unnecessary and wasteful. If this section extraction is not being used for any assertions, both the comment and the computation should be removed entirely. The test already verifies the prompt step exists via the require.Positive check at line 522 and the assert.Contains check at line 530.

Suggested change
// Get the prompt creation section (not currently used but kept for potential future checks)
_ = lockStr[promptStepStart:]

Copilot uses AI. Check for mistakes.
// Prompt creation should NOT have the known needs expressions (only markdown-extracted ones)
// We can't make strong assertions here because markdown might contain needs expressions
Expand Down