fix(workflows): bug-tdd gate uses pulls endpoint instead of issues#9327
fix(workflows): bug-tdd gate uses pulls endpoint instead of issues#9327polmichel wants to merge 4 commits into
Conversation
The gh-aw API proxy returns an array for repos/{owner}/{repo}/issues/{n},
which crashed the gate's jq filter (expected an object). Switch to
repos/{owner}/{repo}/pulls/{n} with a 404 fallback to detect PR vs issue,
matching the pattern already used by bug-agent-fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. This PR fixes a CI workflow gate by switching from the issues API to the pulls API to avoid a proxy-induced array response, following an already proven pattern in the same repository; the change is small, isolated to a non-production CI step, and has no impact on core business logic or data.
Re-trigger cubic
…lows Avoids auto-filing GitHub issues when a bug-agent workflow run fails; failures should surface via the existing PR/issue comment outputs only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 8 files (changes from recent commits).
Shadow auto-approve: would auto-approve. These changes fix a targeted API endpoint bug in the bug-tdd gate and disable failure auto-reporting across bug-agent workflows, both isolated to CI/CD configuration files with no impact on core business logic or production infrastructure.
Re-trigger cubic
gh api --paginate --jq fails with "expected an object but got: array"
on /issues/{n}/comments (bare-array endpoint). Failures went unnoticed
since f801feb disabled report-failure-as-issue for these workflows.
There was a problem hiding this comment.
0 issues found across 6 files (changes from recent commits).
Shadow auto-approve: would auto-approve. These bug-fix changes to CI workflows only adjust API endpoint usage and pagination flags to resolve jq errors in the gh-aw proxy, with no impact on core application logic, data, or security.
Re-trigger cubic
--paginate failed through the gh-aw proxy (which appears to strip the Link header), causing gh to fall back to extractNextPageURL on the bare-array /comments response and emit "expected an object but got: array". The previous attempt to use --slurp was also broken: gh CLI rejects --slurp with --jq. Use ?per_page=100 instead; the bug-pipeline PRs cap at 3 review iterations, well under 100 comments.
There was a problem hiding this comment.
0 issues found across 6 files (changes from recent commits).
Shadow auto-approve: would auto-approve. These are low-risk CI workflow fixes that resolve known proxy pagination issues and suppress noisy failure issue creation, all within the bug pipeline's configuration files without touching any core application logic, data, or security-sensitive code.
Re-trigger cubic
Summary
bug-agent-{review,test,fix}: drop--paginate, use?per_page=100instead.gh api --paginate --jqon the bare-array/issues/{n}/commentsendpoint fails through the gh-aw proxy withexpected an object but got: array(the gate-failure symptom on every bug-agent run). The same call works againstapi.github.comdirectly, so the breakage is in the--paginate+ proxy interaction; bypassing pagination sidesteps it. 100 comments is plenty — bug-pipeline PRs cap at 3 review iterations.bug-agent-{analyst,review,fix,test}(f801feb):report-failure-as-issue: falseto stop gate failures spamming issues. This is also why the regression went unnoticed.bug-tddgate (3716e44): collapseissues/{n}+pulls/{n}probe into onepulls/{n}+ 404 fallback. Saves an API call but does not fix the gate failures — the original root-cause diagnosis was wrong (issues/{n}returns an object, not an array, so it can't produce this error).