Skip to content

refactor: relocate misplaced utility functions to semantically correct files#25460

Merged
pelikhan merged 2 commits intomainfrom
copilot/refactor-semantic-function-clustering
Apr 9, 2026
Merged

refactor: relocate misplaced utility functions to semantically correct files#25460
pelikhan merged 2 commits intomainfrom
copilot/refactor-semantic-function-clustering

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Semantic clustering analysis identified three functions whose placement diverges from their file's primary purpose. Moves them to files that already own their concern.

Changes

  • formatCompilerMessage (compiler.gocompiler_error_formatter.go): Was a shared diagnostic formatter living in the compilation driver. Now co-located with formatCompilerError, formatCompilerErrorWithPosition, and isFormattedCompilerError.

  • validateNetworkAllowedDomains + validateDomainPattern + isEcosystemIdentifier (safe_outputs_validation.gonetwork_firewall_validation.go): General network domain validation was mishoused in the safe-outputs validator. validateSafeOutputsAllowedDomains remains in place (it is safe-outputs-specific) and continues to call the helpers from the same package. Log messages updated to use networkFirewallValidationLog.

  • GenerateMultiSecretValidationStep (runtime_step_generator.goengine_helpers.go): Engine secret validation step generation belonged with its sole caller BuildDefaultSecretValidationStep. shellJoinArgs was already in shell.go and required no move. Logger reference updated from runtimeStepGeneratorLog to engineHelpersLog.

No logic changes — pure relocation within the pkg/workflow package.

Warning

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
    • Triggering command: /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 .cfg 6688848/b417/vet--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git kflows/test-no-egit /tmp/go-build332rev-parse 1/x64/bin/node git (http block)
    • Triggering command: /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 git /usr/sbin/bash git rev-�� --show-toplevel bash /usr/bin/git runs/20260409-12git git /usr/lib/git-cor--show-toplevel git (http block)
    • Triggering command: /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 git /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel node /usr/bin/git /usr/bin/git git /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -c=4 -nolocalimports -importcfg /tmp/go-build3326688848/b411/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/tar.go conf�� (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name go1.25.8 (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name --show-toplevel rk /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel epo}/actions/runrev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel -tests /usr/bin/git 1749194169 0188605/b013/vetrev-parse 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linuTest User /usr/bin/git ger.test 0188605/b100/vetrev-parse ortcfg.link git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel t /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git ache/node/24.14.1/x64/bin/node 5726/001/stabiligit git 64/pkg/tool/linu--show-toplevel ache/node/24.14.1/x64/bin/node 2658�� y 64/pkg/tool/linux_amd64/vet /usr/bin/git --show-toplevel git ache/node/24.14.--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git om/myorg/repo.git --abbrev-ref HEAD x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node '**/*.ts' '**/*.git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /opt/hostedtoolcache/node/24.14.1/x64/bin/node --show-toplevel git /usr/bin/git node /tmp�� run_id }} git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/ls git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha se 0188605/b192/vet.cfg .cfg --ignore-path .prettierignore --log-level=erro-v ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -c "prettier" --write '../../../**/*.json' '!../../../pkg/workflow/js/**/*.json' --ignore-path ../.git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git 1rfMVZiro 0188605/b231/vetrev-parse ache/node/24.14.--show-toplevel git rev-�� --show-toplevel tail /usr/bin/git 2605504586 stmain.go /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --git-dir x_amd64/compile /usr/bin/infocmp --noprofile .cfg 64/pkg/tool/linu--show-toplevel infocmp -1 xterm-color 64/pkg/tool/linurev-parse /usr/bin/git y_with_repos=pubgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel Secret /usr/bin/git te 'scripts/**/*git .cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linuorigin /usr/bin/git ithout_min-integgit on 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha uest|push_to_pull_request_branch)" ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git om/owner/repo.gi--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha it} --local odules/npm/node_-nilfunc committer.email (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ../pkg/workflow/js/**/*.json' --ignore-path ../../../.prettierignore gpg.program x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha ../pkg/workflow/js/**/*.json' ---p commit.gpgsign x_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linuremote /usr/bin/git te 'scripts/**/*git .cfg 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linux_amd64/vet /usr/bin/git y_with_repos_arrgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha user.email test@example.com /usr/bin/git LsRemoteWithRealgit LsRemoteWithRealrev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git y_with_explicit_git git 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git 1/x64/bin/node git conf�� --get remote.origin.url /usr/bin/git --show-toplevel /usr/lib/git-correv-parse 1/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git te 'scripts/**/*git .cfg 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linux_amd64/vet /usr/bin/git te '../../../**/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha user.name Test User ache/node/24.14.1/x64/bin/node --show-toplevel git /usr/bin/git ache/node/24.14.1/x64/bin/node 4901�� --show-toplevel git /usr/bin/git y_with_explicit_git git 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel /opt/hostedtoolcpull 1/x64/bin/node git conf�� --get s/test.md /usr/bin/git 71/001/test-frongit /usr/lib/git-correv-parse 1/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel -tests om/testowner/testrepo.git get --local on-clustering git rev-�� --show-toplevel git /usr/bin/git yphen3791839203/git yphen3791839203/rev-parse ache/uv/0.11.5/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha -m initial commit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha /usr/bin/git git /usr/bin/git --show-toplevel git /usr/bin/infocmp--show-toplevel git rev-�� --show-toplevel infocmp /usr/bin/git xterm-color git /opt/hostedtoolcgithub.event.inputs.tag git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git --noprofile .cfg 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linux_amd64/vet /usr/bin/git y-test.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git 1325898284/.githgit git /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --show-toplevel git /usr/bin/git b/workflows git 1/x64/bin/node git rev-�� --show-toplevel git /usr/bin/git 01 git 1/x64/bin/node git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha 6688848/b437/_pkg_.a -test.v=true e/git -test.timeout=10git b/gh-aw/pkg/stylrev-parse -test.short=true--show-toplevel e/git rev-�� LImZ/9lTwiRU7I2H98zpKLImZ cB-MrgPZhxrn clusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle ./../pkg/workflogit committer.name x_amd64/compile 6688848/b437/importcfg (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --all-progress-implied --revs /usr/bin/git --thin --delta-base-offrev-parse -q git -C /tmp/TestGuardPolicyMinIntegrityOnlymin-integrity_with_repos=public_2248234363/001 config /usr/bin/gh remote.origin.urgit git /usr/bin/git gh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha /usr/bin/git git /bin/sh --show-toplevel git /usr/bin/git /bin/sh -c /v1.2.3 git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch2408938409/001' /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha git-upload-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch3969246236/001' l /usr/bin/git on' --ignore-patgit --local k/_temp/ghcca-no--show-toplevel git -C /tmp/TestGuardPolicyBlockedUsersApprovalLabelsCompiledOutput43792870/001 config /usr/bin/git remote.origin.urgit committer.name x_amd64/cgo git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_-s git-receive-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_-w /usr/bin/git port PATH="$(fingit git /usr/bin/git git rev-�� --show-toplevel git e/git --show-toplevel git /usr/bin/git e/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha ithub/workflows/agent-performance-analyzer.md git /usr/bin/git --show-toplevel git /usr/bin/infocmp--show-toplevel git add . infocmp /usr/bin/git xterm-color git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name git At,event,headBranch,headSha,displayTitle --show-toplevel 1/x64/bin/node /usr/bin/git git rev-�� faultBranchFromLsRemoteWithRealGitbranch_with_hyphen2319007635/0-p faultBranchFromLsRemoteWithRealGitbranch_with_hyphen2319007635/0main ache/node/24.14.1/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 security 64/bin/bash rkflow/js/**/*.jgit -d erignore ache/go/1.25.8/xtest@example.com (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch2635012693/001' '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch2635012693/001' /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 security ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet rkflow/js/**/*.jgit -d erignore ache/go/1.25.8/xTest User (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name git e/git-receive-pack --show-toplevel ache/go/1.25.8/xrev-parse /usr/bin/git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name git e/git-upload-pack --show-toplevel 1/x64/bin/node /usr/bin/git git faul�� --show-toplevel git 001961/b430/testutil.test --show-toplevel git /usr/bin/git 001961/b430/testutil.test (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name .cfg .cfg rkflow/js/**/*.jgit (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name git /usr/bin/git --show-toplevel 1/x64/bin/node /usr/bin/git git rev-�� '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch2324093420/001' '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch2324093420/001' 001961/b428/styles.test --show-toplevel git /usr/bin/git 001961/b428/styles.test (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name git /usr/bin/git s-in-body.md 1/x64/bin/node /usr/bin/git git rev-�� --show-toplevel =my-default /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name git /usr/bin/git --show-toplevel 1/x64/bin/node /usr/bin/git git rev-�� '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen2319007635/001' '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen2319007635/001' 001961/b202/vet.cfg --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path on' --ignore-path ../../../.prettierignore credential.username k/_temp/uv-python-dir/bash (http block)
    • Triggering command: /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 (http block)
    • Triggering command: /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 journal-or-kmsg _TOKEN"; }; f ache/go/1.25.8/x64/pkg/tool/linurev-parse diff�� --name-only HEAD 64/pkg/tool/linux_amd64/link ./../.prettieriggit (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu--json /usr/bin/git /tmp/go-build127git tNetwork\|TestDorev-parse ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 6688848/b417/_pkgit -buildtags 6688848/b417=> git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts /opt/hostedtoolcache/node/24.14.1/x64/bin/node .artifacts[].namgit git /usr/bin/git /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� No expressions here git /usr/bin/git '/tmp/TestParsegit '/tmp/TestParserev-parse /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha add remote2 /usr/bin/git 2329019056 git ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm /usr/bin/git --show-toplevel git /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha kflow.test security ortcfg.link OUTPUT -d 168.63.129.16 rBEFqd9hvdnYqLyRTest User /opt�� prettier --write x_amd64/compile **/*.ts **/*.json --ignore-path x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git git show�� --verify --quiet x_amd64/vet --show-toplevel ache/go/1.25.8/xapi /usr/bin/git x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha ster.patch git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha FETCH_HEAD (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha --show-toplevel infocmp /usr/bin/git xterm-color 64/pkg/tool/linu-C /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git /x64"; export PAgit 64/pkg/tool/linuconfig /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha ub/workflows git 1/x64/bin/node --show-toplevel e/git /usr/bin/git git ance�� d git 1/x64/bin/node --show-toplevel 1/x64/bin/node /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha FETCH_HEAD k/gh-aw/gh-aw/pkg/workflow/engine_helpers.go x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha rd (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha --show-toplevel /usr/lib/git-core/git /usr/bin/git REDACTED REDACTED /usr/bin/git xq3TT-m/TVpfzxW3remote rev-�� --show-toplevel git /bin/sh --show-toplevel 64/pkg/tool/linurev-parse /usr/bin/git /bin/sh (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha rd (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel /bin/sh /usr/bin/git f() { test "$1" /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link f() { test "$1" -o /usr/bin/git git rev-�� lGitbranch_with_-s lGitbranch_with_-w /usr/bin/git bin 2>/dev/nullgit 64/pkg/tool/linu-C /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha --show-toplevel /opt/hostedtoolc--jq 1/x64/bin/node ${{ github.actorgit git /usr/bin/git git rev-�� --show-toplevel git 1/x64/bin/node --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha /workflows security .cfg estValidateDomaigit -d 168.63.129.16 ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /opt�� prettier --write ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet **/*.ts **/*.json --ignore-path ache/go/1.25.8/x64/pkg/tool/linurev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linuconfig /usr/bin/git git rev-�� HEAD git x_amd64/compile --show-toplevel x_amd64/compile /usr/bin/git x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion /../../.prettiergit erignore (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git 1/x64/bin/node --show-toplevel git /usr/bin/git 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion -m Add new feature /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 86_64/bash (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo ode_modules/.bin-nilfunc (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /usr/bin/git -pack /tmp/go-build332rev-parse /usr/bin/git git rev-�� --show-toplevel git /opt/hostedtoolcache/node/24.14.1/x64/bin/node --get remote.origin.urrev-parse /usr/bin/gh node (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build3326688848/b397/cli.test /tmp/go-build3326688848/b397/cli.test -test.testlogfile=/tmp/go-build3326688848/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true committer.name (http block)
    • Triggering command: /tmp/go-build304001961/b224/cli.test /tmp/go-build304001961/b224/cli.test -test.testlogfile=/tmp/go-build304001961/b224/testlog.txt -test.paniconexit0 -test.timeout=10m0s rev-�� --show-toplevel git (http block)
    • Triggering command: /tmp/go-build130708769/b370/cli.test /tmp/go-build130708769/b370/cli.test -test.paniconexit0 -test.timeout=10m0s -test.count=1 rev-�� --show-toplevel git /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/infocmp --show-toplevel git /usr/bin/git infocmp (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name on' --ignore-path ../../../.prettierignore credential.username /opt/hostedtoolcache/go/1.25.8/x64/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name --show-toplevel git /usr/bin/git --show-toplevel x_amd64/compile /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linu-atomic /usr/bin/infocmp-bool git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name install --package-lock-only /usr/bin/git --show-toplevel git /usr/bin/git git rev-�� --show-toplevel git /usr/bin/sed --show-toplevel git /usr/bin/git sed (http block)

If you need me to access, download, or install something from one of these locations, you can either:

- Move formatCompilerMessage from compiler.go to compiler_error_formatter.go
- Move validateNetworkAllowedDomains, validateDomainPattern, isEcosystemIdentifier
  and related vars from safe_outputs_validation.go to network_firewall_validation.go
- Move GenerateMultiSecretValidationStep from runtime_step_generator.go to engine_helpers.go
- Remove unused 'strings' import from runtime_step_generator.go
- Remove unused 'regexp' import from safe_outputs_validation.go

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/072b6485-56a3-4918-b2e1-e3fb0c4d6439

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor outlier functions and misplaced utilities from semantic analysis refactor: relocate misplaced utility functions to semantically correct files Apr 9, 2026
Copilot AI requested a review from pelikhan April 9, 2026 12:46
@pelikhan pelikhan marked this pull request as ready for review April 9, 2026 12:52
Copilot AI review requested due to automatic review settings April 9, 2026 12:52
@pelikhan pelikhan merged commit e212d9d into main Apr 9, 2026
67 of 68 checks passed
@pelikhan pelikhan deleted the copilot/refactor-semantic-function-clustering branch April 9, 2026 12:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors pkg/workflow by relocating a few utility/validation helpers into files that more directly match their semantic “ownership” (compiler error formatting, network firewall validation, and engine helper utilities).

Changes:

  • Moved formatCompilerMessage from compiler.go to compiler_error_formatter.go alongside related formatting helpers.
  • Moved network-domain validation helpers (validateNetworkAllowedDomains, validateDomainPattern, isEcosystemIdentifier) into network_firewall_validation.go.
  • Moved GenerateMultiSecretValidationStep from runtime_step_generator.go to engine_helpers.go and updated its logger usage accordingly.
Show a summary per file
File Description
pkg/workflow/safe_outputs_validation.go Removes network-domain helpers from safe-outputs validation; safe-outputs now relies on shared helpers in the same package.
pkg/workflow/runtime_step_generator.go Removes GenerateMultiSecretValidationStep from runtime setup generator (now lives in engine helpers).
pkg/workflow/network_firewall_validation.go Adds network allowed-domain validation + shared domain-pattern helpers; uses networkFirewallValidationLog.
pkg/workflow/engine_helpers.go Adds GenerateMultiSecretValidationStep next to its sole caller and uses engineHelpersLog.
pkg/workflow/compiler.go Removes formatCompilerMessage from the compiler driver.
pkg/workflow/compiler_error_formatter.go Adds formatCompilerMessage next to other compiler error formatting helpers.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 1


// formatCompilerMessage creates a formatted compiler message string (for warnings printed to stderr)
// filePath: the file path to include in the message (typically markdownPath or lockFile)
// msgType: the message type ("error" or "warning")
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The doc comment for formatCompilerMessage says msgType is "error" or "warning", but the function is also used with "info" (e.g., create_discussion.go). Update the comment (or tighten accepted values) so it accurately reflects supported message types.

Suggested change
// msgType: the message type ("error" or "warning")
// msgType: the message type ("error", "warning", or "info")

Copilot uses AI. Check for mistakes.
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] Semantic Function Clustering Analysis: Outlier Functions and Misplaced Utilities

3 participants