Skip to content

Normalize string manifest includes consistently - #77550

Merged
pelikhan merged 4 commits into
mainfrom
copilot/refactor-extract-manifest-includes
Nov 14, 2026
Merged

pelikhan merged 4 commits into
mainfrom
copilot/refactor-extract-manifest-includes

Conversation

Copilot AI commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

extractManifestIncludes handled []string entries differently from []any, skipping trimming and manifest-import path validation. Both slice forms now share per-entry normalization.

  • Normalization: Trim entries and clean manifest-import paths for either slice type; invalid imports return an error.
  • Filtering: Unsupported paths are omitted with a warning, and normalized duplicates are deduplicated.
  • Coverage: Tests compare both slice forms for whitespace, imports, invalid imports, and unsupported paths.

For example, []string{" nested/../aw.yml "} now produces the same normalized import (aw.yml) as []any{" nested/../aw.yml "}.

Copilot AI changed the title [WIP] Refactor extractManifestIncludes to normalize includes consistently Normalize string manifest includes consistently Nov 13, 2026
Copilot AI requested a review from gh-aw-bot November 13, 2026 20:56
@pelikhan
pelikhan marked this pull request as ready for review November 13, 2026 22:32
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 22:32
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

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.

Generated by PR Specification Reviewer for #77550 · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #77550 · codex · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: sonnet55 high · ~6 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-777e985d-5108-4b11-bfb0-579c7a79d5d3","parents":[],"payload":{"id":"ldg-712fcb11-b824-43a9-8fa1-dc9c2265229d","operation":"append","value":{"finding_count":0,"head_sha":"596375bdee5da72a2c0d3dbfca84b5c5c43e2f48","outcome":"no_findings"}},"sha":"sha256:a3783715eb14de14256e5bd94cff1af99565c48bd035a000aa4b4cdf45ce6636","timestamp":"2026-11-13T22:39:27.231Z","type":"ledger_append","version":1}
History

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 []string entries 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)

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-68b5b8b9-0b72-43c0-85af-22187c1f87ee","parents":[],"payload":{"id":"ldg-cafde0aa-5d61-43a4-a51f-604b4bba277b","operation":"append","value":{"finding_count":0,"head_sha":"596375bdee5da72a2c0d3dbfca84b5c5c43e2f48","outcome":"aligned"}},"sha":"sha256:fcebbe13dc30d4b173a48501a566100c0c2e3698284008b1d1b05a24bb7a57cc","timestamp":"2026-11-13T22:40:46.654Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 TestExtractManifestIncludes on this branch. All pass, including all 9 TestExtractManifestIncludesSliceNormalization subtests.
  • Reverted only the []string hunk in add_package_manifest_includes.go and re-ran the new test. The []string trim, 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 -l reports 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: wantWarning never varies across rows (see inline comment).

Positive Highlights

  • ✅ The []string branch now reuses appendRawEntry, 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 []string callers.
  • ✅ 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,
},
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added duplicate-normalization coverage for both []any and []string. Commit: 00691c27.

Comment thread pkg/cli/add_package_manifest_test.go Outdated
name string
include string
wantSource string
wantWarning bool

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed wantWarning and asserted the warning text directly. Commit: 00691c27.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/cli/add_package_manifest_test.go:1696): address unresolved feedback - Review comment
  3. Review (pkg/cli/add_package_manifest_test.go:1673): address unresolved feedback - Review comment

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 13, 2026 23:12
…act-manifest-includes

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@pelikhan
pelikhan merged commit a16bae3 into main Nov 14, 2026
67 checks passed
@pelikhan
pelikhan deleted the copilot/refactor-extract-manifest-includes branch November 14, 2026 02:50
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] Route []string includes through shared normalization in extractManifestIncludes

4 participants