Repository navigation
Normalize string manifest includes consistently - #77550
Conversation
Co-authored-by: gh-aw-bot <[email protected]>
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
There was a problem hiding this comment.
No actionable correctness, performance, or maintainability issues found in the changed lines. The []string path now shares the existing normalization and validation logic, and the added tests cover the requested normalization cases.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟢 Approval recommended
The manifest include normalization change has no active review issues blocking approval.
No open issues 🎉
What changed in this PR
Makes manifest include handling consistent in gh aw by routing []string entries through the same normalization used for []any, addressing #77311.
Changes:
- Applies shared whitespace trimming and manifest-import validation to
[]stringentries before existing filtering and deduplication. - Adds parallel table-driven tests covering both slice types for whitespace, normalized imports, invalid imports, and unsupported paths.
| File | Description |
|---|---|
pkg/cli/add_package_manifest_test.go |
Tests equivalent normalization and error handling for both slice types. |
pkg/cli/add_package_manifest_includes.go |
Routes []string entries through shared per-entry normalization. |
Review effort: Balanced (dynamic)
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Skills-Based Review
Applied /tdd and /diagnosing-bugs to a small bug fix. The source change is correct and the regression tests guard it. Two non-blocking test suggestions are left inline.
📋 Key Themes & Highlights
Verification
- Ran
go test ./pkg/cli -run TestExtractManifestIncludeson this branch. All pass, including all 9TestExtractManifestIncludesSliceNormalizationsubtests. - Reverted only the
[]stringhunk inadd_package_manifest_includes.goand re-ran the new test. The[]stringtrim, clean, and reject subtests fail on the pre-fix code, so the test catches the reported bug. - Probed dedup for both slice forms.
["workflows/review.md", " workflows/review.md "]yields one entry in each case. gofmt -lreports no issues on the changed files.
Key Themes
- Coverage gap: the PR description claims normalized duplicates are deduplicated, but no test asserts it for
includes(see inline comment). - Test table nit:
wantWarningnever varies across rows (see inline comment).
Positive Highlights
- ✅ The
[]stringbranch now reusesappendRawEntry, so both slice types share one normalization path and the divergence is removed. - ✅ The production caller only passes YAML-decoded
[]any, so this change is behavior-preserving for real manifests and only affects programmatic[]stringcallers. - ✅ Subtests compare both slice forms side by side, which is the right shape for a parity regression test.
Skill selection came from the pr-triage agent. No fallback heuristic was needed.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| include: "/tmp/aw.yml", | ||
| wantError: true, | ||
| }, | ||
| } |
There was a problem hiding this comment.
[/tdd] The PR description says normalized duplicates are deduplicated, but nothing in the new test covers that for includes. The table feeds one entry per call, so this needs a two-entry subtest. A probe confirmed dedup works for both slice forms, so this is a coverage gap, not a bug.
💡 Suggested test
t.Run("normalized duplicates are deduplicated", func(t *testing.T) {
for _, value := range []any{
[]any{"workflows/review.md", " workflows/review.md "},
[]string{"workflows/review.md", " workflows/review.md "},
} {
includes, warnings, err := extractManifestIncludes(value, "aw.yml")
require.NoError(t, err)
assert.Equal(t, []string{"workflows/review.md"}, manifestIncludeSources(includes))
assert.Empty(t, warnings)
}
})Pinning this keeps the PR dedup claim covered by a test.
@copilot please address this.
There was a problem hiding this comment.
Added duplicate-normalization coverage for both []any and []string. Commit: 00691c27.
| name string | ||
| include string | ||
| wantSource string | ||
| wantWarning bool |
There was a problem hiding this comment.
[/tdd] Nit: wantWarning is true for every row that reaches the warning branch (only "warns for unsupported path" does), so the field never varies. The assert.Equal(t, tt.wantWarning, ...) on line 1726 reads like a toggle but is not one. Asserting the warning text directly is clearer.
💡 Suggested change
require.Len(t, warnings, 1)
assert.Contains(t, warnings[0], "Ignoring includes entry")Drop the wantWarning field from the table in the same change.
@copilot please address this.
There was a problem hiding this comment.
Removed wantWarning and asserted the warning text directly. Commit: 00691c27.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "596375bdee5da72a2c0d3dbfca84b5c5c43e2f48",
"kind": "requested",
"schema_version": "1",
"state": "ff0e006fb32b4d4a8b9278235121722ef0ee0244f4d0b104d863a5e5165eabd9",
"work": [
"3bd785686880a0e8e6c99f5a985d47c7c440eb6757654d34bbf9981f8c2fc568",
"da045ed7e64c3d1719ff7af5c8fb57a0b94fc36ae69cf18366b921ae2c841221"
],
"workflow": "pr-sous-chef"
}
|
…act-manifest-includes Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🎉 This pull request is included in a new release. Release: |
extractManifestIncludeshandled[]stringentries differently from[]any, skipping trimming and manifest-import path validation. Both slice forms now share per-entry normalization.For example,
[]string{" nested/../aw.yml "}now produces the same normalized import (aw.yml) as[]any{" nested/../aw.yml "}.