fix: correct if-condition assertion in task job generation test#28841
fix: correct if-condition assertion in task job generation test#28841
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/604587cf-c5bc-4069-9b13-e0c0d17be40c Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates an integration test to assert the correct if: condition format emitted into compiled lock files.
Changes:
- Adjusted
TestTaskJobGenerationFix/task_job_for_if_conditionto expectif: github.ref == 'refs/heads/main'(without${{ }}). - Clarified the test comment to document the lock file
if:formatting.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/task_job_generation_fix_test.go | Updates the lock-file assertion for if: conditions to match the compiler’s output format. |
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
🧪 Test Quality Sentinel ReportTest Quality Score: 90/100✅ Excellent test quality
Test Classification Details
What ChangedThis PR corrects a single assertion in the This is a behavioral contract fix — the test now correctly verifies that the compiled lock file contains the Language SupportTests analyzed:
Verdict
📖 Understanding Test ClassificationsDesign Tests (High Value) verify what the system does:
Implementation Tests (Low Value) verify how the system does it:
References: §25032434900
|
The test
TestTaskJobGenerationFix/task_job_for_if_conditionwas asserting the wrong format forif:conditions in compiled lock files.What changed
if: github.ref == 'refs/heads/main'instead ofif: ${{ github.ref == 'refs/heads/main' }}The compiler strips
${{ }}wrappers fromif:fields when generating YAML — consistent with every otherif:condition across all.lock.ymlfiles in the repo. The test was written with the wrapped form, which never matches the actual output.