Repository navigation
Description
Implements the optimization requested in #26402 comment by @pelikhan.
What changed
The daily-function-namer workflow now processes one entire Go package per run instead of picking up to 6 individual files scattered across pkg/.
Key changes
| Before | After |
|---|---|
Round-robin over all .go files in pkg/ |
Round-robin over package directories in pkg/ |
| Select 1–6 files with a budget of 25 functions | Select all files in one package |
Cache: last_index (file position) |
Cache: last_package_index (package position) |
History: up to 90 analyzed_files entries |
History: up to 30 analyzed_packages entries |
Efficiency improvements (Step 2)
A new Step 2 uses a single grep or gopls symbols sweep across all package files before invoking Serena. This gives a complete function inventory with minimal tool calls, so Serena is only used for functions that need deeper semantic analysis:
# Fast enumeration — one pass over all package files
grep -rn "^func " "${PKG_FILES[@]}" | awk -F: '{printf "%-50s line %-5s %s\n", $1, $2, $3}'
# OR structured gopls output
for f in "${PKG_FILES[@]}"; do
gopls symbols "$f" | grep -E "^[A-Za-z].*Function"
done
```
### Why package-at-a-time is better
- Functions in the same package call each other — reviewing them together gives better context for rename decisions
- Fewer Serena `activate_project` round-trips (activate once per run, not once per file)
- The issue report is more coherent (all suggestions relate to the same package)
- Matches how developers think about code: packages, not arbitrary file lists
## Validation
Compiled successfully with no errors or warnings:
```
✅ daily-function-namer.mdWarning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the patch modifies protected files. A human must create the pull request manually.
Protected files
The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.
Create the pull request manually
# Download the patch from the workflow run
gh run download 24456438315 -n agent -D /tmp/agent-24456438315
# Create a new branch
git checkout -b q/function-namer-package-mode-bee5e7eed58fe7fd main
# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-24456438315/aw-q-function-namer-package-mode.patch
# Push the branch and create the pull request
git push origin q/function-namer-package-mode-bee5e7eed58fe7fd
gh pr create --title '[q] daily-function-namer: analyze one entire package at a time (fixes #26402)' --base main --head q/function-namer-package-mode-bee5e7eed58fe7fd --repo github/gh-aw🎩 Equipped by Q · ● 700.8K · ◷
- expires on Apr 17, 2026, 1:19 PM UTC
Activity