Repository navigation
Fix logs workflow resolution in large repositories - #59502
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"See Network Configuration for more information.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review. No PR review comments were emitted because the diff only adds a gh workflow list limit override and matching regression coverage, and I found no actionable review findings. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused change correctly addresses the default-limit truncation and includes adequate regression coverage.
Pull request overview
Fixes remote workflow discovery truncation in repositories with more than 50 workflows.
Changes:
- Raises the
gh workflow listlimit to 1,000. - Adds regression coverage for the explicit limit.
- Documents existing large-function lint exceptions.
File summaries
| File | Description |
|---|---|
pkg/cli/workflows.go |
Expands remote workflow discovery. |
pkg/cli/workflows_test.go |
Verifies the new CLI arguments. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs — small, well-tested fix for the immediate 50-workflow truncation bug, with one comment requesting changes.
📋 Key Themes & Highlights
Key Themes
- Fix addresses reported symptom, not the general class of bug: raising
--limitfrom 50 (gh CLI default) to 1000 fixes the reported case but a repo with >1000 workflows would hit the identical silent-truncation bug. True pagination (as done elsewhere in this file for run listing) would close the issue for good.
Positive Highlights
- ✅ Root cause correctly diagnosed and documented in the PR description (gh CLI's default
--limit 50). - ✅ Regression test added (
TestFetchGitHubWorkflows_RequestsAllWorkflows) using a fakeghshim to assert the CLI args, following the existing test patterns in this file (TestFetchGitHubWorkflows_ContextCancellation). - ✅ Minimal, surgical diff — no unrelated behavior changes.
Note: skill selection used the fallback heuristic (pr-triage was not invoked in this run) — classified as a bug fix based on PR title/description and diff shape.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 26.8 AIC · ⌖ 14.7 AIC · ⊞ 10.3K
Comment /matt to run again
| } | ||
|
|
||
| args := []string{"workflow", "list", "--all", "--json", "id,name,path,state"} | ||
| args := []string{"workflow", "list", "--all", "--limit", "1000", "--json", "id,name,path,state"} |
There was a problem hiding this comment.
[/diagnosing-bugs] Good root-cause fix for the 50-workflow truncation, but this trades one hardcoded ceiling for another: repos with >1000 workflows will still silently truncate the map with no error or warning surfaced to the user. Root cause is gh workflow list's default limit — the more robust fix is to paginate (loop with --limit/cursor until fewer results than requested are returned, as listWorkflowRunsWithPagination already does elsewhere in this package) or at minimum log a warning when len(workflows) == 1000 since that's a strong signal of further truncation.
💡 Why this matters
The original bug report was about silent truncation causing incorrect "missing workflow" diagnostics. Raising the ceiling from 50 to 1000 fixes today's reported case but reintroduces the exact same failure mode for any repo that crosses the new threshold — and by then the regression test here (TestFetchGitHubWorkflows_RequestsAllWorkflows) only asserts the --limit 1000 flag is present, not that discovery is actually complete for large workflow counts.
@copilot please address this.
There was a problem hiding this comment.
Updated fetchGitHubWorkflows to use the paginated Actions workflows API (gh api --paginate --slurp with 100-item pages), so discovery no longer has a 1,000-workflow ceiling. The regression test now returns two API pages and verifies both workflows are included.
@copilot Please address the remaining blocking review feedback on PR #59502.
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
gh aw logsincorrectly reported remote workflows as missing when repositories contained more than 50 workflows. Remote discovery inheritedgh workflow list’s default result limit, truncating the resolver’s workflow map.Changes
gh workflow list --all --limit 1000Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
hub.lumenfield.workTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.