Conversation
…ix steps syntax in auto-triage-issues.md Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d42b4d7e-97b3-40a4-acb3-90eca6f7d205 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes two CI failures by correcting assertion argument ordering for testifylint and repairing invalid steps frontmatter syntax so the generated GitHub Actions workflow YAML is schema-compliant.
Changes:
- Reordered
assert.Equalarguments inPATTypeconstant spec tests to satisfy testifylint. - Converted
stepsfrontmatter inauto-triage-issues.mdfrom an invalid map form to a valid flat list. - Updated the compiled workflow lockfile to reflect the corrected frontmatter.
Show a summary per file
| File | Description |
|---|---|
| pkg/stringutil/spec_test.go | Adjusts assert.Equal argument order in PATType constant spec assertions to address testifylint. |
| .github/workflows/auto-triage-issues.md | Fixes frontmatter steps structure to a valid YAML list so compilation produces schema-valid workflow YAML. |
| .github/workflows/auto-triage-issues.lock.yml | Regenerates compiled workflow output to match the updated markdown frontmatter. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
pkg/stringutil/spec_test.go:400
- Same expected/actual readability point for these assertions as well (documented value as expected; constant value as actual) to keep failure diffs easy to interpret.
assert.Equal(t, PATTypeOAuth, PATType("oauth"),
"PATTypeOAuth should have documented value 'oauth'")
assert.Equal(t, PATTypeUnknown, PATType("unknown"),
"PATTypeUnknown should have documented value 'unknown'")
- Files reviewed: 3/3 changed files
- Comments generated: 1
| assert.Equal(t, PATTypeFineGrained, PATType("fine-grained"), | ||
| "PATTypeFineGrained should have documented value 'fine-grained'") | ||
| assert.Equal(t, PATType("classic"), PATTypeClassic, | ||
| assert.Equal(t, PATTypeClassic, PATType("classic"), | ||
| "PATTypeClassic should have documented value 'classic'") |
There was a problem hiding this comment.
These assertions now treat the constant under test as “expected” and the documented literal as “actual”, which makes assertion failure output less intuitive given the message (“…should have documented value…”). If testifylint was complaining about the type-conversion expression, an alternative is to keep the documented value as expected (string literal) and compare it to the constant’s string value, so failures read naturally.
This issue also appears on line 397 of the same file.
See below for a potential fix:
assert.Equal(t, "fine-grained", string(PATTypeFineGrained),
"PATTypeFineGrained should have documented value 'fine-grained'")
assert.Equal(t, "classic", string(PATTypeClassic),
"PATTypeClassic should have documented value 'classic'")
assert.Equal(t, "oauth", string(PATTypeOAuth),
"PATTypeOAuth should have documented value 'oauth'")
assert.Equal(t, "unknown", string(PATTypeUnknown),
🧪 Test Quality Sentinel ReportTest Quality Score: 85/100✅ Excellent test quality
Test Classification Details
What ChangedThe only test change in this PR is a testifylint correction in Before (incorrect order): assert.Equal(t, PATType("fine-grained"), PATTypeFineGrained, "...")
// ^^^ actual ^^^ expected — wrong orderAfter (correct order): assert.Equal(t, PATTypeFineGrained, PATType("fine-grained"), "...")
// ^^^ expected ^^^ actual — correctAll 4 assertions have descriptive message strings ✅. Build tag Why 85 and not 100? 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:
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 85/100. Test quality is acceptable — 0% of new tests are implementation tests (threshold: 30%). The change correctly fixes testifylint expected/actual argument order in TestSpec_Constants_PATType with no guideline violations.
Two CI failures:
lint-godue to reversedassert.Equalarguments, andbuilddue to invalid frontmatter syntax inauto-triage-issues.mdthat produced non-schema-compliant YAML.pkg/stringutil/spec_test.go— testifylintAll 4
PATTypeconstant assertions had(actual, expected)order. Fixed to(expected, actual):.github/workflows/auto-triage-issues.md— invalid steps syntaxThe
stepsfrontmatter used apre-agent:subkey (map) instead of a flat step list. The compiler passed the map throughaddCustomStepsAsIs, which emittedpre-agent:as an inline property of the preceding step — failing GitHub Actions schema validation.