Skip to content

[dead-code] chore: remove dead functions — 5 functions removed - #58822

Merged
pelikhan merged 1 commit into
mainfrom
chore/remove-dead-code-33971358925-6bbd2b3dbc6876f9
Sep 5, 2026
Merged

[dead-code] chore: remove dead functions — 5 functions removed#58822
pelikhan merged 1 commit into
mainfrom
chore/remove-dead-code-33971358925-6bbd2b3dbc6876f9

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Functions Removed

Function File
confirmAndInitializeAddRepository pkg/cli/add_init.go
inspectAddWorkingTree pkg/cli/add_interactive_git.go
isManifestIncludeWildcard pkg/cli/add_package_manifest_includes.go
isGradersArtifactRequested pkg/cli/logs_artifact_set.go
extractResources pkg/cli/resources.go

Tests Removed

  • TestConfirmAndInitializeAddRepository (pkg/cli/add_command_test.go)
  • TestInspectAddWorkingTree (pkg/cli/add_interactive_git_test.go)
  • TestIsManifestIncludeWildcard (pkg/cli/add_package_manifest_wildcard_test.go)
  • TestIsGradersArtifactRequested (pkg/cli/logs_artifact_set_test.go)
  • TestExtractResources_BasicList, TestExtractResources_IncludesGraderEvaluator, TestExtractResources_IncludesDisabledGraderEvaluator, TestExtractResources_MacroRejected, TestExtractResources_AllMacrosRejected, TestExtractResources_NoResourcesField (pkg/cli/remote_workflow_test.go)

Verification

  • go build ./...
  • go vet ./...
  • go vet -tags=integration ./...
  • make fmt

https://github.com/github/gh-aw/actions/runs/33971358925

Generated by 🧹 Dead Code Removal Agent · copilot · auto · 59.7 AIC · ⌖ 19.1 AIC · ⊞ 9.9K ·

  • expires on Sep 8, 2026, 6:36 AM UTC-08:00

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review September 5, 2026 15:10
Copilot AI balanced review requested due to automatic review settings September 5, 2026 15:10
@pelikhan
pelikhan merged commit 6db11f8 into main Sep 5, 2026
9 checks passed
@pelikhan
pelikhan deleted the chore/remove-dead-code-33971358925-6bbd2b3dbc6876f9 branch September 5, 2026 15:10
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Security scanning failed for Ponytail Reviewer. Review the logs for details.

Lean already. Ship.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #58822

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

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

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed: PR does not have the 'implementation' label and has ≤100 new lines of code in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Comment Memory

reviewed_at: 2026-09-05T15:13:29Z
review_event: COMMENT
top_themes: []
files_reviewed:
  - pkg/cli/add_command_test.go
  - pkg/cli/add_init.go
  - pkg/cli/add_interactive_git.go
  - pkg/cli/add_interactive_git_test.go
  - pkg/cli/add_package_manifest_includes.go
  - pkg/cli/add_package_manifest_wildcard_test.go
  - pkg/cli/logs_artifact_set.go
  - pkg/cli/logs_artifact_set_test.go
  - pkg/cli/remote_workflow_test.go
  - pkg/cli/resources.go
comment_count: 0

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 29.3 AIC · ⌖ 7.35 AIC · ⊞ 21.8K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

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.

Verdict

I did not find a blocking issue in this dead-code removal.

The deletions are still covered by remaining call sites and tests

I checked the removed wrappers and helper predicates against the current callers in pkg/cli/, and every remaining path now uses the lower-level functions directly (confirmAddRepositoryInitialization + applyAddRepositoryInitialization, inspectAddWorkingTreeAtRoot, manifestIncludeWildcardParent, extractResourceEntries, and applyGradersArtifact / isEvalsArtifactRequested). The deleted tests were also targeting wrappers or aliases whose behavior is still exercised indirectly by the surviving tests around the active entry points, so this PR does not obviously reduce correctness coverage on the changed code paths.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 29.3 AIC · ⌖ 7.35 AIC · ⊞ 21.8K
Comment /review to run again

@github-actions github-actions Bot left a comment

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.

Skills-Based Review 🧠

Reviewed this dead-code removal PR against /codebase-design and /diagnosing-bugs — no actionable issues found.

📋 Verification

Confirmed via repo-wide search that none of the five removed functions (confirmAndInitializeAddRepository, inspectAddWorkingTree, isManifestIncludeWildcard, isGradersArtifactRequested, extractResources) have any remaining callers in non-test code. Their corresponding tests are removed alongside, keeping test/code coverage consistent. go build ./... succeeds.

This is a purely subtractive, mechanical change with no new abstractions, no behavior change, and no logic to test — so /tdd and /codebase-design guidance don't surface anything to improve here.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 20.6 AIC · ⌖ 14.5 AIC · ⊞ 10.3K
Comment /matt to run again

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.

🟡 Changes recommended

Several deleted tests uniquely cover production functions that remain active.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Removes five unused CLI helper functions and their associated tests.

Changes:

  • Deletes dead wrapper/helper functions.
  • Removes related tests, including some still covering active implementations.
File summaries
File Description
pkg/cli/resources.go Removes extractResources.
pkg/cli/remote_workflow_test.go Removes resource extraction tests.
pkg/cli/logs_artifact_set.go Removes unused graders-request helper.
pkg/cli/logs_artifact_set_test.go Removes its unit test.
pkg/cli/add_package_manifest_includes.go Removes wildcard wrapper.
pkg/cli/add_package_manifest_wildcard_test.go Removes wildcard validation cases.
pkg/cli/add_interactive_git.go Removes working-tree wrapper.
pkg/cli/add_interactive_git_test.go Removes working-tree inspection tests.
pkg/cli/add_init.go Removes initialization wrapper.
pkg/cli/add_command_test.go Removes initialization behavior tests.
Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 4
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

})
}

func TestAddResolvedWorkflows_IgnoresBootstrapRequireOwnerTypeDuringInstall(t *testing.T) {
}
}

func TestBuildWorkingTreeResolutionOptions(t *testing.T) {
}
}

func TestExtractManifestIncludesWithWildcard(t *testing.T) {
assert.Equal(t, []string{"./graders/example-operational-value.sh"}, resources)
}

func TestFetchAndSaveRemoteResources_InstallsAndRestoresGraderEvaluator(t *testing.T) {
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.88.5

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.

2 participants