Conversation
- Remove formatCompilationSummary, formatActionlintOutput, formatStatsTable thin wrappers from compile_output_formatter.go; update 3 call-sites in compile_orchestration.go to call underlying functions directly - Extract runBatchLockFileTool shared helper in compile_batch_operations.go; refactor runBatchActionlint and runBatchZizmor to use it - Remove deprecated GenerateOutputSchema[T]() from mcp_schema.go; update 3 test files to use GenerateSchema directly - Remove WorkflowSourceInfo type alias from packages.go (no callers) - Remove ShouldSkipRuntimeSetup from runtime_deduplication.go (always returns false) and its pointless test - Migrate 3 SplitRepoSlug call-sites to repoutil.SplitRepoSlug directly; remove cli.SplitRepoSlug wrapper and unused repoutil import from repo.go Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Refactors the codebase to remove deprecated wrappers, dead code, and orphaned symbols identified by semantic clustering, while reducing duplication in batch tool execution.
Changes:
- Removed thin/back-compat wrappers and unused symbols (
cli.SplitRepoSlug,GenerateOutputSchema,WorkflowSourceInfo,ShouldSkipRuntimeSetup) and migrated remaining call sites. - Simplified compile output orchestration by calling display/print helpers directly and keeping only the non-trivial JSON validation formatter.
- Extracted a shared batch helper (
runBatchLockFileTool) to deduplicate actionlint/zizmor batch runner logic.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/runtime_setup_test.go | Removes tests for deleted dead symbol (ShouldSkipRuntimeSetup). |
| pkg/workflow/runtime_deduplication.go | Removes always-false deprecated helper (ShouldSkipRuntimeSetup). |
| pkg/cli/secret_set_command.go | Switches to repoutil.SplitRepoSlug directly. |
| pkg/cli/repo.go | Removes SplitRepoSlug wrapper and its unused import. |
| pkg/cli/pr_command.go | Switches remaining call sites to repoutil.SplitRepoSlug. |
| pkg/cli/packages.go | Removes unused backward-compat type alias (WorkflowSourceInfo). |
| pkg/cli/mcp_tool_schemas_test.go | Migrates tests to GenerateSchema. |
| pkg/cli/mcp_server_defaults_test.go | Migrates tests to GenerateSchema. |
| pkg/cli/mcp_schema_test.go | Renames/migrates tests from GenerateOutputSchema to GenerateSchema. |
| pkg/cli/mcp_schema.go | Removes deprecated GenerateOutputSchema alias. |
| pkg/cli/compile_output_formatter.go | Removes trivial formatting wrappers; keeps JSON validation formatter. |
| pkg/cli/compile_orchestration.go | Updates call sites to invoke display/print helpers directly. |
| pkg/cli/compile_batch_operations.go | Introduces shared batch helper to deduplicate actionlint/zizmor runners. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return fmt.Errorf("%s failed: %w", toolName, err) | ||
| } | ||
| // In non-strict mode, actionlint errors are warnings | ||
| // In non-strict mode, errors are warnings | ||
| if verbose { | ||
| fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("actionlint warnings: %v", err))) | ||
| fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf("%s warnings: %v", toolName, err))) |
There was a problem hiding this comment.
The batch strict/warning messages became less descriptive and inconsistent with the per-file validation errors (e.g., compile_validation.go uses "actionlint linter failed" / "zizmor security scan failed"). Consider letting runBatchLockFileTool accept tool-specific message templates (or an operation description) so strict-mode errors and verbose warnings remain clear and consistent across batch vs per-file paths.
| // # Key Functions | ||
| // | ||
| // Summary Output: | ||
| // - formatCompilationSummary() - Format compilation statistics | ||
| // - formatValidationOutput() - Format validation results as JSON |
There was a problem hiding this comment.
After removing the summary/stats wrapper functions, this file now only formats validation JSON. Please update the surrounding file documentation/"Key Functions" text to match the remaining scope (or consider relocating/renaming the file) so readers aren’t misled about what’s implemented here.
Cleans up 7 items flagged by the semantic function clustering analysis: trivial one-line wrappers, structurally near-duplicate batch runners, a deprecated generic alias, an unused type alias, a stub that always returns
false, and a backward-compat wrapper not fully migrated.Thin wrappers → direct calls (
compile_output_formatter.go,compile_orchestration.go)formatCompilationSummary,formatActionlintOutput,formatStatsTable— each was a single-line delegate with no added valuecompile_orchestration.gonow callprintCompilationSummary,displayActionlintSummary,displayStatsTabledirectlyformatValidationOutputkept (does real work: sanitization + JSON marshaling)Shared batch helper (
compile_batch_operations.go)Extracted
runBatchLockFileToolto eliminate structural duplication betweenrunBatchActionlintandrunBatchZizmor:Both callers are now one-liners.
Dead symbols removed
GenerateOutputSchema[T]()pkg/cli/mcp_schema.goGenerateSchema[T]()— 3 test files migratedWorkflowSourceInfopkg/cli/packages.goFetchedWorkflowwith zero callersShouldSkipRuntimeSetuppkg/workflow/runtime_deduplication.gofalse; test removed tooSplitRepoSlugmigration complete (repo.go,secret_set_command.go,pr_command.go)repoutil.SplitRepoSlugdirectlycli.SplitRepoSlugwrapper and its now-unusedrepoutilimport removed fromrepo.goWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -nolocalimports -importcfg docker pull�� test/concurrent-image:v1.0.0 /home/REDACTED/work/gh-aw/gh-aw/pkg/sliceutil/sliceutil_test.go /usr/bin/git(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw owner/repo 64/bin/go infocmp -1 xterm-color node /usr/bin/git --write scripts/**/*.js de git(http block)https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -unreachable=false /tmp/go-build4199753045/b099/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build4199753045/b246/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -json GO111MODULE 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -json GO111MODULE }} {{context.Compiler}} GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /home/REDACTED/.local/bin/node GOINSECURE GOMOD GOMODCACHE node(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v3/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha s "-s -w -X main.version=2da03cf-dirty" -o gh-aw ./cmd/gh-aw .cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env '**/*.ts' '**/*.json' --ignore-path ../../../.pr.prettierignore GO111MODULE 86_64/node GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha g_.a GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE ole GOMODCACHE 64/pkg/tool/linux_amd64/vet env PWLDsOpmC .cfg x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha ons-test3888389887 -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� s/test.md -tests ache/node/24.13.1/x64/bin/node npx prettier --cgit GOPROXY 64/bin/go infocmp(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel x_amd64/link /usr/bin/git -json GO111MODULE x_amd64/vet git init�� GOMODCACHE x_amd64/vet /usr/bin/gh -json GO111MODULE x_amd64/vet gh(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha g_.a GO111MODULE /opt/hostedtoolcache/go/1.25.0/x-test.short=true GOINSECURE util GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� jpq_JbW5I /tmp/go-build4199753045/b070/vet.cfg 9753045/b314/vet.cfg GOSUMDB GOWORK 64/bin/go ortcfg(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -json GO111MODULE Name,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� 2005-28014/test-4184345559 /tmp/go-build4199753045/b056/vet.cfg 1/x64/bin/node l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha ets.TOKEN }} go /usr/bin/git -json GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git -json GO111MODULE x_amd64/vet git(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha Q-eU/ZpLY0UQ8eaBGOSUMDB GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE 019069/b411/impo-buildtags --ch�� k/gh-aw/gh-aw/pk-errorsas k/gh-aw/gh-aw/pk-ifaceassert 64/bin/go --ignore-path ../../../.pretti-atomic 64/bin/go /opt/hostedtoolc-buildtags(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha go1.25.0 -c=4 -nolocalimports -importcfg /tmp/go-build4199753045/b392/importcfg -pack /tmp/go-build4199753045/b392/_testmain.go -###�� -x c 64/bin/go - ../../../pkg/wor-o 64/bin/go go(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha pkg/mod/github.c-errorsas pkg/mod/github.c-ifaceassert 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolc/tmp/go-build4199753045/b266/vet.cfg -o /tmp/go-build722019069/b370/_pkgGOINSECURE -trimpath 64/bin/go -p testing/internal-o -lang=go1.25 go(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha g_.a GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� atjTay5oJ /tmp/go-build4199753045/b036/vet.cfg 9753045/b337/vet.cfg GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha heck '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*.js' --ignore-path .prettierignore GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha tutil.test GO111MODULE Name,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle GOINSECURE GOMOD GOMODCACHE _hV3O2Cg4KalLpCxFj/loOf-cgjR6MKz0XVD7GS/mRL0tEU7JbrieQ94-F8q -uns�� 2005-28014/test-4184345559 /tmp/go-build4199753045/b044/vet.cfg g_.a l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha heck '**/*.cjs' '**/*.ts' '**/*.@{u} GO111MODULE h GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha e-analyzer.md GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuf() { test "$1" = get && echo "******"; }; f get estl�� -json GO111MODULE .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha -json GO111MODULE ode_modules/.bin/sh GOINSECURE GOMOD GOMODCACHE go env json' --ignore-path ../../../.pr**/*.json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts/usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/node/24.13.1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts/usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json .cfg x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link(http block)/usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/uv/0.10.7/x86_64/node GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts/usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 2248-39808/test-1427563415/.github/workflows GO111MODULE k/_temp/uv-python-dir/node GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts/usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE k/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/sh GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts/usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE k/gh-aw/gh-aw/actions/node_modules/.bin/sh GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts/usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env aw.test GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE k/gh-aw/gh-aw/actions/setup/node_modules/.bin/sh GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts/usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env hub/workflows .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env 2248-39808/test-3634688024/.github/workflows GO111MODULE k/gh-aw/node_modules/.bin/sh GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/github/gh-aw/actions/workflows/usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go --ignore-path .prettierignore 64/bin/go go(http block)/usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 --write 64/bin/go go env -json GO111MODULE x_amd64/cgo GOINSECURE GOMOD GOMODCACHE x_amd64/cgo(http block)/usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha json ]; then \ cp .github/aw/actions-lock.json pkg/workflow/data/action_pins.json; \ echo "���node GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha "prettier" --wriGOINSECURE git 64/bin/go --show-toplevel x_amd64/vet /usr/bin/git sh -c npx prettier --wGOSUMDB git 64/bin/go --show-toplevel 64/pkg/tool/linu/home/REDACTED/.npm/_npx/b388654678d519d9/node_modules/.bin/prettier /usr/bin/git go(http block)https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999/usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha ty-test.md GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha "prettier" --wriGOINSECURE infocmp 64/bin/go xterm-color x_amd64/vet /usr/bin/git sh -c npx prettier --wGOSUMDB git 64/bin/go --show-toplevel 7KRlb0f/T36gUPQZ/home/REDACTED/.npm/_npx/b388654678d519d9/node_modules/.bin/prettier /usr/bin/git go(http block)https://api.github.com/repos/nonexistent/repo/actions/runs/12345/usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env -json .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/uv/0.10.7/x86_64/node GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/owner/repo/actions/workflows/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go --ignore-path .prettierignore 64/bin/go go(http block)/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c "prettier" --che-c=4 sh 64/bin/go npx prettier --w/opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet on 64/bin/go go(http block)/usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go 0 -j ACCEPT node /hom�� --write scripts/**/*.js de .prettierignore --log-level=erro/opt/hostedtoolcache/node/24.13.1/x64/bin/npx /usr/bin/git node(http block)https://api.github.com/repos/owner/repo/contents/file.md/tmp/go-build4199753045/b380/cli.test /tmp/go-build4199753045/b380/cli.test -test.testlogfile=/tmp/go-build4199753045/b380/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE 019069/b375/impo/tmp/go-build4199753045/b144/vet.cfg -c pkg/mod/github.com/stretchr/testGOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go /opt/hostedtoolc/tmp/go-build4199753045/b263/vet.cfg(http block)/tmp/go-build2431660264/b001/cli.test /tmp/go-build2431660264/b001/cli.test -test.paniconexit0 -test.count=1 -test.short=true -test.timeout=2m0s echo "��� Go codGOINSECURE /usr/bin/git 64/bin/go --get-regexp ^remote\..*\.gh-env 1/x64/bin/node node /opt�� prettier --write(http block)https://api.github.com/repos/test-owner/test-repo/actions/secrets/usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name ." GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE npx pret�� --check scripts/**/*.js 64/bin/go .prettierignore GOWORK 64/bin/go go(http block)/usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name npx prettier --wGOINSECURE gh 64/bin/go view 12345 /usr/bin/git sh -c "prettier" --wriGOINSECURE git 64/bin/go tierignore 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/.bin/prettier /usr/bin/git node(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>[refactor] Semantic Function Clustering Analysis — Persistent Wrappers and New Orphaned Dead Code</issue_title>
<issue_description>Analysis of 542 non-test Go source files across 18 packages using Serena LSP + naming-pattern clustering. This run identified 2 issues fixed since the last analysis and 4 new findings on top of the 3 previously reported issues that remain unresolved.
Overview
Two items from the previous analysis (#18721) have been resolved:
pkg/parser/ansi_strip.gowas removed andstringutil.StripANSIEscapeCodeswas deleted. The remaining 3 previously reported items are still present, and this analysis adds 4 new findings: a deprecated generic function with no callers, a type alias with no callers, two deprecated pattern-only functions with no non-test callers, and a function that always returnsfalsewith no non-test callers.Progress Since Last Analysis (2026-02-27)
parser.StripANSIorphaned backward-compat wrapperstringutil.StripANSIEscapeCodesdeprecated aliascompile_output_formatter.gorunBatchActionlint/runBatchZizmornear-duplicatecli.SplitRepoSlugwrapper not fully migratedCritical Issues
1.
pkg/cli/compile_output_formatter.go— Three Trivial One-Line WrappersImpact: Medium — Creates dual-naming confusion across the compile pipeline.
Three of the four functions in this file are pure one-line delegates:
Each is documented as "a wrapper … for consistency." However:
printCompilationSummaryis already called directly incompile_helpers.go:240,324andcompile_watch.go:133,153compile_orchestration.go:492,504,509uses theformat*wrappersThe fourth function
formatValidationOutputdoes real work (JSON marshaling + sanitization) and should be kept.Recommendation: Remove the three trivial wrappers. Update 3 call-sites in
compile_orchestration.goto call the underlying functions directly. KeepformatValidationOutput(or move it tocompile_validation.go).Files affected:
pkg/cli/compile_output_formatter.go,pkg/cli/compile_orchestration.go2.
runBatchActionlint,runBatchZizmor,runBatchPoutine— Structural Near-DuplicatesImpact: Medium — Error-handling and logging changes must be made three times.
runBatchActionlintandrunBatchZizmorinpkg/cli/compile_batch_operations.goare structurally identical (same signature(lockFiles []string, verbose, strict bool) error, same guard, same error handling).runBatchPoutinefollows the same pattern with a slightly different signature (workflowDir stringinstead oflockFiles []string).Side-by-side comparison of the two identical functions
Recommendation: Extract a shared
runBatchLockFileTool(toolName string, lockFiles []string, verbose, strict bool, runner func([]string, bool, bool) error) errorhelper.runBatchActionlintandrunBatchZizmor...🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.