Skip to content

Reduce pkg/cli package manifest largefunc backlog - #52218

Open
pelikhan with Copilot wants to merge 8 commits into
mainfrom
copilot/lint-monster-reduce-function-length
Open

Reduce pkg/cli package manifest largefunc backlog#52218
pelikhan with Copilot wants to merge 8 commits into
mainfrom
copilot/lint-monster-reduce-function-length

Conversation

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Daily custom lint flagged oversized pkg/cli helpers. This PR takes a focused first slice by reducing the add_package_manifest.go function-length findings without broad rewrites.

  • Repository package resolution

    • Extracts repo slug parsing, ref resolution, extension-file resolution, and result construction from resolveRepositoryPackage.
  • Manifest parsing

    • Splits YAML/root validation, version checks, and metadata population out of parseRepositoryPackageManifest.
  • Skill file resolution

    • Separates skill directory normalization, manifest/auto-scan merging, marker validation, and recursive file listing.
manifest, warnings, err := parseRepositoryPackageManifest(manifestPath, manifestContent)
installationSources, includeSkillDirs, includeAgentFiles, err :=
	resolveRepositoryPackageInstallablePaths(ctx, owner, repo, packagePath, ref, host, manifest, manifestPath)
extensionFiles, err := resolveRepositoryPackageExtensionFiles(ctx, repositoryPackageExtensionFilesRequest{...})

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 26 AIC · ⌖ 5.66 AIC · ⊞ 8.5K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 37.2 AIC · ⌖ 6.36 AIC · ⊞ 8.5K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 14.4 AIC · ⌖ 5.73 AIC · ⊞ 8.5K ·
Comment /souschef to run again


Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.25 AIC · ⌖ 5.07 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Triage: pr-type:refactor · pr-risk:low · Score 35/100 (impact 10, urgency 10, quality 15)

Recommended action: batch_review (batch: lintmonster-refactor)

Function-length reduction in add_package_manifest.go (1 file, +217/-108). Single-file, mechanical extraction. Draft, CI not yet run. Grouped with #52220, #52219, #52212.

Generated by 🔧 PR Triage Agent · auto · 44.6 AIC · ⌖ 2.44 AIC · ⊞ 7.8K ·

@github-actions

Copy link
Copy Markdown
Contributor

Triage

Largest diff in the batch (217 additions) targeting add_package_manifest.go largefunc backlog. CI unstable — recheck before merge.

Generated by 🔧 PR Triage Agent · auto · 41.1 AIC · ⌖ 2.53 AIC · ⊞ 7.8K ·

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: refactor
  • Risk: low
  • Score: 30/100 (impact 10 + urgency 10 + quality 10)
  • Recommended action: batch_review
  • Batch: lintmonster-refactor
  • Note: refactor, part of lintmonster batch

Generated by 🔧 PR Triage Agent · auto · 39.1 AIC · ⌖ 2.59 AIC · ⊞ 7.8K ·

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage Summary

Total score: 34/100
Breakdown: Impact 15 + Urgency 8 + Quality 11 (draft, no CI yet) -> DEFER (batch: lintmonster-refactor)

Automated triage — see labels applied for classification. Full report in the triage issue.

Generated by 🔧 PR Triage Agent · auto · 43.1 AIC · ⌖ 2.43 AIC · ⊞ 7.8K ·

@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

Category: refactor | Risk: low | Priority: low | Score: 30/100

Score breakdown: impact 15/50, urgency 5/30, quality 10/20

CI: unknown (draft)

Recommended action: batch_review
Batch: lintmonster-refactor

Same batch as 52219/52220 but still draft, mergeable unknown.

Automated triage — run 52218

Generated by 🔧 PR Triage Agent · auto · 67.2 AIC · ⌖ 2.77 AIC · ⊞ 7.8K ·

@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.

Generated by ✂️ Ponytail Reviewer for #52218 · auto · 27.6 AIC · ⌖ 3.17 AIC · ⊞ 6.8K
Comment /ponytail to run again

Comment thread pkg/cli/add_package_manifest.go Outdated
if err != nil {
return nil, err
}
type repositoryPackageExtensionFilesRequest struct {

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.

L177-186: yagni: request struct with 8 fields, built once and read once between one caller and one callee. Pass the params directly to resolveRepositoryPackageExtensionFiles instead.

@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.

Clean refactoring that extracts large functions in add_package_manifest.go into well-named helpers. Logic is preserved faithfully across all extraction sites. No correctness, security, or reliability issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 22.1 AIC · ⌖ 6.26 AIC · ⊞ 5.4K

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Triage nudge from sous-chef. Please address the remaining review feedback, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (newest first):

Failed checks from the candidate set:

Branch update was requested automatically for this run.
Run: https://github.com/github/gh-aw/actions/runs/31729392187

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 26 AIC · ⌖ 5.66 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Triage nudge from sous-chef. Please address the remaining review feedback, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstandi...

Addressed the outstanding review item (removed the yagni request struct, passing params directly) in ed7aa88.

Copilot AI requested a review from gh-aw-bot August 13, 2026 18:25
@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Triage

Category: refactor · Risk: low · Priority score: 32/100 (impact 10, urgency 7, quality 15)
Recommended action: batch_review
Batch: lintmonster-refactor (with #52220, #52212)

Score breakdown:

  • Impact: Extracts helper functions from add_package_manifest.go to reduce function-length lint backlog.
  • Urgency: Low — pure internal refactor.
  • Quality: APPROVED review; mergeable_state=unstable and no check-run data returned — verify CI before merge.

Grouped with other lint-monster function-length refactors for a single batched review pass.

Generated by 🔧 PR Triage Agent · auto · 71.4 AIC · ⌖ 2.63 AIC · ⊞ 7.8K ·

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Triage nudge from sous-chef. Please inspect the latest branch state, review any remaining blockers, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (newest first):

No failed checks were included in the compact candidate set.
Branch update was requested by sous-chef for run https://github.com/github/gh-aw/actions/runs/31731945833.

Generated by 👨🍳 PR Sous Chef
Comment /souschef to run again

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 37.2 AIC · ⌖ 6.36 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Triage nudge from sous-chef. Please inspect the latest branch state, review any remaining blockers, refresh the branch if needed, and run the pr-finisher skill before handing this PR back t...

That review item was already addressed in ed7aa88. Branch is up to date with main (merge commit ffef5a7) and build/tests pass; no further changes needed.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Triage nudge from sous-chef. Please verify whether the previously addressed review item now needs follow-up, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (newest first):

Failed checks from the candidate set:

  • None listed in the compact candidate set.

Branch update was requested automatically for this run.
Run: https://github.com/github/gh-aw/actions/runs/31734986091

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 14.4 AIC · ⌖ 5.73 AIC · ⊞ 8.5K ·
Comment /souschef to run again

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Triage nudge from sous-chef. Please verify whether the previously addressed review item now needs follow-up, refresh the branch if needed, and run the pr-finisher skill before handing this ...

No follow-up needed — the review item remains resolved (ed7aa88). Branch is current with main (merge commit a85f4d8) and builds cleanly.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please verify the remaining gate state on this PR, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (newest first):

Failed checks from the compact candidate set:

  • None listed.

Branch update was requested automatically for this run.
Run: https://github.com/github/gh-aw/actions/runs/31742164290

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 9.25 AIC · ⌖ 5.07 AIC · ⊞ 8.5K ·
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please verify the remaining gate state on this PR, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (newest first):

  • github-actions: Design Decision Gate still requires the ADR linked in the PR body before merge.
  • github-actions: please confirm the previously addressed review discussion at discussion_r3777833034 still needs no follow-up.

Failed checks from the compact candidate set:

  • None listed.

Branch update could not be requested automatically in this run because the local gh aw checks helper was unavailable.
Run: https://github.com/github/gh-aw/actions/runs/31746457772

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 10.9 AIC · ⌖ 7.21 AIC · ⊞ 8.5K ·
Comment /souschef to run again

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot Please link the required ADR in the PR body, confirm the previously addressed review thread no longer needs follow-up, refresh the branch if needed, and run the pr-finisher skill before handing this PR back to maintainers.

Outstanding review items (newest first):

Failed checks from the compact candidate set:

  • None listed.

Branch update was not requested in this run because the latest recent checks were already completed.
Run: https://github.com/github/gh-aw/actions/runs/31749685094

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 13.8 AIC · ⌖ 8.11 AIC · ⊞ 8.5K ·
Comment /souschef to run again

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[lint-monster] reduce pkg/cli function-length backlog (first slice)

4 participants