Skip to content

fix(workflows): bug-tdd gate uses pulls endpoint instead of issues#9327

Draft
polmichel wants to merge 4 commits into
stablefrom
pmi-test-writer-pipeline
Draft

fix(workflows): bug-tdd gate uses pulls endpoint instead of issues#9327
polmichel wants to merge 4 commits into
stablefrom
pmi-test-writer-pipeline

Conversation

@polmichel
Copy link
Copy Markdown
Contributor

@polmichel polmichel commented May 21, 2026

Summary

  • Comment gates in bug-agent-{review,test,fix}: drop --paginate, use ?per_page=100 instead. gh api --paginate --jq on the bare-array /issues/{n}/comments endpoint fails through the gh-aw proxy with expected an object but got: array (the gate-failure symptom on every bug-agent run). The same call works against api.github.com directly, 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: false to stop gate failures spamming issues. This is also why the regression went unnoticed.
  • bug-tdd gate (3716e44): collapse issues/{n} + pulls/{n} probe into one pulls/{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).

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>
@github-actions github-actions Bot added the group/ci Issue related to the CI pipeline label May 21, 2026
@polmichel polmichel marked this pull request as ready for review May 21, 2026 13:43
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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

@polmichel polmichel marked this pull request as draft May 21, 2026 13:46
…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>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/ci Issue related to the CI pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant