Skip to content

feat: daily-function-namer analyzes one entire Go package at a time#26432

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-daily-function-namer-package-analysis
Apr 15, 2026
Merged

feat: daily-function-namer analyzes one entire Go package at a time#26432
pelikhan merged 2 commits intomainfrom
copilot/fix-daily-function-namer-package-analysis

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

The workflow was picking up to 6 individual files across pkg/ with a 25-function budget — functions in the same package call each other, so scattered file selection gives poor semantic context and wastes Serena round-trips.

Changes

  • Step 1 rewritten: round-robin now iterates over unique package directories (find pkg … | xargs dirname | sort -u) and selects all non-test .go files from the chosen package each run
  • New Step 2: fast grep -n "^func " sweep across all package files builds a complete function inventory upfront — Serena is only invoked for functions needing deeper semantic analysis
  • Cache schema updated: last_indexlast_package_index; analyzed_files (limit 90) → analyzed_packages (limit 30)
  • Issue template updated: title and body now reference the package rather than a list of individual files
  • Robustness: empty-array guard added to function-count command; removed spurious -r flag from grep in the inventory step
# Step 1 — pick next package
mapfile -t ALL_PKGS < <(find pkg -name '*.go' ! -name '*_test.go' -type f | xargs -I{} dirname {} | sort -u)
PKG_DIR="${ALL_PKGS[$(( LAST_INDEX % TOTAL ))]}"

# Step 2 — enumerate all functions in one pass before touching Serena
grep -n "^func " "${PKG_FILES[@]}" | awk -F: '{printf "%-50s line %-5s %s\n", $1, $2, $3}'

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 4125635/b204/vetrev-parse ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git /tmp/go-build760git -trimpath ache/go/1.25.8/x--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 config /usr/bin/gh git ache�� --show-toplevel nly /usr/bin/git /repos/github/ghbash --jq /opt/hostedtoolc--noprofile 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 show /opt/hostedtoolc--show-toplevel n-continued&#34; rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git -bool -buildtags /usr/bin/git 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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/api-consumption-report.md x_amd64/vet /usr/bin/gh tcfg .cfg 64/pkg/tool/linu--show-toplevel gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts /usr/bin/git .artifacts[].namgit .cfg 64/pkg/tool/linu--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 x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/compile git -C /home/REDACTED/work/gh-aw/gh-aw/.github/workflows rev-parse /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE x_amd64/vet node (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 g_.a 4125635/b052/vet.cfg .cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x12345 estl�� e0RDK6BxT 4125635/b102/vet.cfg ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p weak -lang=go1.25 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 24877/b171/_pkg_git GO111MODULE .test git rev-�� it/ref/tags/v4 .test /usr/bin/git plorer.md 4125635/b033/vetrev-parse .cfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git licyBlockedUsersgit /tmp/go-build421rev-parse /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet otOrdering1046697695/001/go/1.25.0/x64/bin/go -unreachable=falgit /tmp/go-build421rev-parse ache/node/24.14.--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 --show-toplevel ger.test /usr/bin/git se 4125635/b060/vetinit .cfg git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuorigin /usr/bin/git 5412-32511/test-git 4125635/b224/vetrev-parse ache/go/1.25.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -t security x_amd64/compile OUTPUT -d 168.63.129.16 x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -json GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE 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 --get remote.origin.url /usr/bin/git 4/001 GO111MODULE x_amd64/vet git rev-�� --git-dir x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json 9xL6IaqNl 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node (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 add origin /usr/bin/git 084530/001 GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node -h gh-aw.wasm |git GO111MODULE 64/pkg/tool/linu--show-toplevel node (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 ithub/workflows/agent-persona-explorer.md -test.v=true /usr/bin/infocmp -test.timeout=10git -test.run=^Test -test.short=true--show-toplevel infocmp -1 ErrorFormatting1425244669/001 go /usr/bin/git -json GO111MODULE x_amd64/compile git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 01/test2.md -trimpath ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p crypto/internal/rev-parse -lang=go1.25 ortcfg -o /ref/tags/v9 -trimpath 4125635/b203/vet.cfg -p mime/multipart -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuremote (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha /tmp/go-build76024877/b143/_pkg_.a -trimpath ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -p github.com/segmerev-parse -lang=go1.23 ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build4214125635/b019/vet.cfg 64/pkg/tool/linux_amd64/compile go1.25.8 -c=4 -nolocalimports 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 5412-32511/test-872108269 -trimpath (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha --show-toplevel git /usr/bin/git k/gh-aw/gh-aw/.gbash test@example.com--norc ache/node/24.14.--noprofile git rev-�� --show-toplevel ache/node/24.14.-j e/git b.actor }}, Repoinfocmp x_amd64/vet /usr/bin/git e/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha --show-toplevel git /usr/bin/git user.name Test User /opt/hostedtoolc--noprofile git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git -unreachable=falinfocmp resolved$ /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha -m Initial /usr/bin/git --show-toplevel 64/pkg/tool/linu/opt/hostedtoolcache/node/24.14.1/x64/bin/npm /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linu-C /usr/bin/git git (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha --show-toplevel git -summary.lock.ym-f --show-toplevel ache/go/1.25.8/xapi /usr/bin/git git rev-�� --show-toplevel git p/bin/bash --show-toplevel e/git ed } } git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha ithub/workflows git es --show-toplevel ache/go/1.25.8/x-C /usr/bin/git git rev-�� ithub/workflows git /usr/bin/git --show-toplevel e/git /usr/bin/git 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 --get remote.origin.url /usr/bin/git rity2663393404/0git 5.0/internal/docrev-parse x_amd64/vet git rev-�� --show-toplevel x_amd64/vet 4125635/b451/vet.cfg .a QuPWq4ACQ 64/pkg/tool/linu--show-toplevel 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 4125635/b438/_pkg_.a -importcfg 4125635/b438=&gt; -s -w -buildmode=exe git rev-�� o0IW/KSEM5q0eEd8ODRUBo0IW -extld=gcc /usr/bin/git -json GO111MODULE x_amd64/compile 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 --show-toplevel -tests 1/x64/bin/node -json GO111MODULE x_amd64/compile git t-ha�� ithub/workflows/archie.md x_amd64/compile /usr/bin/git -json GO111MODULE x_amd64/compile 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 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 24877/b195/_pkg_.a bYse/Agvt9vB4Z3tFs27lbYse 64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE 24877/b092/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3948768823 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE l 24877/b092/symab--show-toplevel 64/pkg/tool/linux_amd64/compile (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 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env 24877/b184/_pkg_.a .cfg 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 24877/b193/_pkg_.a TJ4J/EoB_P8I8HxwDW6KATJ4J x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/subtle GOMODCACHE 64/pkg/tool/linutest@example.com env til.go o 64/pkg/tool/linux_amd64/compile GOINSECURE fips140/ed25519 GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .cfg 64/pkg/tool/linu-importcfg GOINSECURE 24877/b006/ GOMODCACHE 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/timeutil/format_test.go env 24877/b191/_pkg_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE (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 GO111MODULE 64/pkg/tool/linu-nolocalimports GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu/tmp/go-build4214125635/b444/_testmain.go ortc�� 472665178 stmain.go 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/tls12 GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE randutil GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3948768823/.github/workflows SZyr/UNQkpBpW_IvLZuHOSZyr .cfg GOINSECURE able GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linurev-parse (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 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE 24877/b078/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env 472665178 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE fips140/tls13 ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 om/modelcontextprotocol/go-sdk@v1.5.0/internal/m-ifaceassert 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/check GOMODCACHE 64/pkg/tool/linux_amd64/vet ortc�� 24877/b229/_pkg_.a stmain.go .cfg GOINSECURE contextprotocol/rev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/link (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 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 472665178 go x_amd64/vet GOINSECURE g/x/crypto/chachrev-parse GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env edcfg GO111MODULE .cfg GOINSECURE contextprotocol/rev-parse 24877/b092/symab--show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env 24877/b210/_pkg_.a QuTc/8J1aAAdvjhK6D-KwQuTc .cfg GOINSECURE g/x/crypto/interrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE /execenv GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3948768823/.github/workflows vNkW/MmwpPo_3e3tB-Au8vNkW 64/pkg/tool/linux_amd64/vet GOINSECURE g/x/text/secure/init GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -c=4 -nolocalimports -importcfg /tmp/go-build4214125635/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 env -json 1.5.0/internal/x-ifaceassert x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 boring/sig GOMODCACHE 64/pkg/tool/linux_amd64/vet env 24877/b132/_pkg_.a .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 24877/b087/symab--git-dir 64/pkg/tool/linux_amd64/vet (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 64/pkg/tool/linux_amd64/vet /usr/bin/git sm-opt &gt;/dev/nulgit .cfg 64/pkg/tool/linu--show-toplevel git rev-�� 695/001/go/1.25.0/x64&#34;; export PATH=&#34;$(find &#34;/tmp/TestGetNpmBinPathSetup_GorootOrdering104669769git 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a 4125635/b122/vetrev-list ache/go/1.25.8/x--count 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 24877/b132/_pkg_.a .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 24877/b087/symab--git-dir 64/pkg/tool/linux_amd64/vet (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 -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE 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 -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet 6841�� .a GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (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 -json GO111MODULE x_amd64/link GOINSECURE jsonrpc2 GOMODCACHE x_amd64/link env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha --show-toplevel git $name) { hasDiscussionsEnabled } } HEAD .github/workflow-C /usr/bin/git /opt/hostedtoolcshow inst�� --package-lock-only git /usr/bin/git --show-toplevel x_amd64/vet /opt/hostedtoolc/home/REDACTED/work/gh-aw/gh-aw git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha --show-toplevel git 64/pkg/tool/linux_amd64/vet --show-toplevel ache/go/1.25.8/x-C /usr/bin/infocmp/home/REDACTED/work/gh-aw/gh-aw/.github/workflows 64/pkg/tool/linurev-parse rev-�� --show-toplevel infocmp repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } xterm-color ache/go/1.25.8/x-C /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 rity3092584560/001 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE ntio/asm/ascii ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/vet (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 GOINSECURE fips140/edwards2/tmp/js-hash-test-3204447899/test-hash.js ache/go/1.25.8/x/home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agentic-observability-kit.md 64/pkg/tool/linux_amd64/vet env 24877/b247/_pkg_.a sP8T/7wqnwPqkUSIEmzJIsP8T ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE t/internal GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (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 x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json 1.5.0/jsonrpc/js-ifaceassert x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json ag.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build4214125635/b397/cli.test /tmp/go-build4214125635/b397/cli.test -test.testlogfile=/tmp/go-build4214125635/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)

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

Copilot AI changed the title [WIP] Fix daily-function-namer to analyze one entire package at a time feat: daily-function-namer analyzes one entire Go package at a time Apr 15, 2026
Copilot AI requested a review from pelikhan April 15, 2026 14:11
@pelikhan pelikhan marked this pull request as ready for review April 15, 2026 14:13
Copilot AI review requested due to automatic review settings April 15, 2026 14:13
@pelikhan pelikhan merged commit 4a24b3c into main Apr 15, 2026
51 of 52 checks passed
@pelikhan pelikhan deleted the copilot/fix-daily-function-namer-package-analysis branch April 15, 2026 14:13
@github-actions github-actions bot mentioned this pull request Apr 15, 2026
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

Updates the “Daily Go Function Namer” workflow prompt to analyze one Go package per run (rather than a small set of files), improving semantic context and reducing unnecessary Serena calls.

Changes:

  • Switch round-robin selection from individual files to unique package directories under pkg/.
  • Add a fast grep-based function inventory step before invoking Serena.
  • Update cache schema and issue template wording to be package-oriented.
Show a summary per file
File Description
.github/workflows/daily-function-namer.md Reworks the prompt’s selection logic to rotate by package, adds function inventory step, and updates cache/issue-template guidance accordingly.
.github/workflows/daily-function-namer.lock.yml Regenerates the locked workflow manifest to reflect the updated prompt/metadata.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines +87 to +91
# Pick the next package in round-robin order
PKG_DIR="${ALL_PKGS[$(( LAST_INDEX % TOTAL ))]}"
NEW_INDEX=$(( (LAST_INDEX + 1) % TOTAL ))

# Collect all non-test Go files in the selected package
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

PKG_DIR is selected via LAST_INDEX % TOTAL, but TOTAL can be 0 when find pkg ... yields no non-test Go files (or pkg/ is missing). In that case this script will error (division by zero / invalid array index) and the workflow will fail. Add an explicit if [ "$TOTAL" -eq 0 ]; then ... guard (e.g., emit a clear message and exit early / trigger the appropriate safe-output).

Copilot uses AI. Check for mistakes.

```bash
# Fast enumeration — one pass over all package files
grep -n "^func " "${PKG_FILES[@]}" | awk -F: '{printf "%-50s line %-5s %s\n", $1, $2, $3}'
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

This grep command exits with status 1 when no matches are found (e.g., a package with only types/vars and no func declarations), which can be treated as a failure in strict/set -e shells. Consider making the command non-fatal (e.g., ... || true) and/or printing an explicit "no functions found" message so the run can proceed cleanly.

Suggested change
grep -n "^func " "${PKG_FILES[@]}" | awk -F: '{printf "%-50s line %-5s %s\n", $1, $2, $3}'
if matches=$(grep -n "^func " "${PKG_FILES[@]}"); then
printf '%s\n' "$matches" | awk -F: '{printf "%-50s line %-5s %s\n", $1, $2, $3}'
else
echo "no functions found"
fi

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.

[q] daily-function-namer: analyze one entire package at a time (fixes #26402)

3 participants