Conversation
Added header comment referencing createTokenAwareRetry from github-api-with-retry.js to satisfy API guard check. The withRetry parameter should be created using this wrapper function. Fixes workflow lint check failure in PR #1387.
The agents-verify-to-new-pr-autopilot bridge workflow was using actions/download-artifact@v7, which doesn't exist. The latest version is v4. This was causing the bridge workflow to fail, preventing auto-pilot from being triggered for follow-up issues created by verify:create-new-pr. Root cause analysis: - verify:create-new-pr creates follow-up issue - uploads metadata artifact with upload-artifact@v6 - bridge workflow tries to download with download-artifact@v7 (fails) -auto-pilot never gets dispatched This fixes both PR #1372 and issue #1391 failures. Fixes #1391
|
Status | ✅ autofix updates applied |
Automated Status SummaryHead SHA: e153888
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeGitHub's native Copilot code review and TasksCopilot Configuration Research
Copilot Configuration Implementation
Bot Comment Handler Auto-Dismiss Logic
Connector Bot Configuration
Acceptance criteria
|
🤖 Keepalive Loop StatusPR #1398 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
There was a problem hiding this comment.
Pull request overview
Adds default ignore rules for .agents/ ledger/tracking files across PR context tooling and bot-comment handling, plus tests and template/docs updates to reduce automation noise.
Changes:
- Add ignored-path filtering to
pr-context-graphql(defaulting to.agents/+ ledger glob patterns) and expose helper matchers. - Introduce scripts/tests for identifying (and attempting to dismiss/delete) bot review comments on ignored paths.
- Update Copilot instructions and add workflow-focused tests asserting
.agents/is ignored and a dismissal job exists.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/workflows/test_bot_comment_handler.py | New tests asserting .agents/ is ignored and a dismiss step exists in the template workflow. |
| templates/consumer-repo/.github/workflows/agents-verify-to-new-pr-autopilot.yml | Changes actions/download-artifact major version (now v4). |
| templates/consumer-repo/.github/workflows/agents-bot-comment-handler.yml | Adds dismiss_ignored job that dismisses bot reviews targeting ignored paths. |
| templates/consumer-repo/.github/scripts/pr-context-graphql.js | Adds default ignored path/pattern matching and filters returned PR files. |
| templates/consumer-repo/.github/scripts/bot-comment-dismiss.js | New script to collect and delete ignored-path bot review comments (but has retry-client usage issues). |
| templates/consumer-repo/.github/copilot-instructions.md | Documents that .agents/issue-*-ledger.yml (and .agents/ non-app code) should not be reviewed/commented on. |
| agents/codex-1387.md / agents/codex-1385.md | Adds bootstrap notes for issues. |
| .github/workflows/agents-verify-to-new-pr-autopilot.yml | Changes actions/download-artifact major version (now v4). |
| .github/sync-manifest.yml | Registers new bot-comment-dismiss.js script for syncing. |
| .github/scripts/pr-context-graphql.js | Same ignored path/pattern filtering + exports as template version. |
| .github/scripts/connector-exclusion-smoke.js | New helper CLI to smoke-test ignore rules; includes tests. |
| .github/scripts/bot-comment-dismiss.js | New script to delete ignored-path bot review comments (but has retry-client usage issues). |
| .github/scripts/tests/pr-context-graphql.test.js | Adds coverage for default ignore rules and env overrides. |
| .github/scripts/tests/connector-exclusion-smoke.test.js | New tests for ignore filtering behavior. |
| .github/scripts/tests/bot-comment-dismiss.test.js | New tests for collecting/deleting ignored-path bot review comments. |
| .github/copilot-instructions.md | Documents that .agents/issue-*-ledger.yml (and .agents/ non-app code) should not be reviewed/commented on. |
|
|
||
| - name: Download follow-up issue metadata | ||
| uses: actions/download-artifact@v7 | ||
| uses: actions/download-artifact@v4 |
There was a problem hiding this comment.
This workflow downgrades actions/download-artifact to @v4 while the repo largely uses @v7. Keeping this at v4 is likely to be reverted/overridden by maint-sync-action-versions.yml (which syncs the highest major found in .github/workflows/ into templates), and it increases action-version inconsistency. Consider switching back to actions/download-artifact@v7 unless there is a concrete compatibility reason to pin to v4.
| uses: actions/download-artifact@v4 | |
| uses: actions/download-artifact@v7 |
|
|
||
| - name: Download follow-up issue metadata | ||
| uses: actions/download-artifact@v7 | ||
| uses: actions/download-artifact@v4 |
There was a problem hiding this comment.
This template workflow pins actions/download-artifact@v4, but other templates (and most repo workflows) use @v7. Since maint-sync-action-versions.yml syncs versions into templates/, this may get auto-bumped back to v7 later, causing churn. Consider aligning to actions/download-artifact@v7 here as well.
| uses: actions/download-artifact@v4 | |
| uses: actions/download-artifact@v7 |
| await withRetry(() => | ||
| github.rest.pulls.deleteReviewComment({ | ||
| owner, | ||
| repo, | ||
| comment_id: entry.id, | ||
| }) | ||
| ); |
There was a problem hiding this comment.
withRetry is designed to pass an Octokit client into the callback (fn(currentGithub)) so it can switch tokens on rate limits. Passing a zero-arg callback here causes API calls to keep using options.github, which defeats token switching. Update this to accept the client parameter and call client.rest.pulls.deleteReviewComment(...).
| await withRetry(() => | ||
| github.rest.pulls.deleteReviewComment({ | ||
| owner, | ||
| repo, | ||
| comment_id: entry.id, | ||
| }) | ||
| ); |
There was a problem hiding this comment.
withRetry passes an Octokit client into the callback so it can switch tokens on rate limits. This callback ignores the client and uses options.github, which prevents token switching. Update this to accept the client parameter and call client.rest.pulls.deleteReviewComment(...).
| const response = await withRetry(() => | ||
| github.rest.pulls.listReviewComments({ | ||
| owner, | ||
| repo, | ||
| pull_number: pullNumber, | ||
| per_page: 100, | ||
| }) | ||
| ); |
There was a problem hiding this comment.
Same token-rotation issue as above: withRetry passes a client argument, but this callback ignores it and uses options.github directly. To allow token switching, accept the client parameter and use client.rest.pulls.listReviewComments(...) inside the callback.
| const response = await withRetry(() => | ||
| github.rest.pulls.listReviewComments({ | ||
| owner, | ||
| repo, | ||
| pull_number: pullNumber, | ||
| per_page: 100, | ||
| }) | ||
| ); |
There was a problem hiding this comment.
Same token-rotation issue as above: this withRetry callback should accept the client argument and use client.rest.pulls.listReviewComments(...) so token switching works under rate limiting.
| # Dismiss ignored-path bot reviews to prevent noisy inline comments | ||
| dismiss_ignored: | ||
| name: Dismiss ignored bot reviews | ||
| needs: resolve | ||
| if: vars.USE_CONSOLIDATED_WORKFLOWS != 'true' && needs.resolve.outputs.should_run == 'true' |
There was a problem hiding this comment.
The comment says this job is to “prevent noisy inline comments”, but the implementation calls pulls.dismissReview, which dismisses the review state and does not remove the inline review comments. If the goal is to eliminate inline noise, consider deleting the individual review comments instead (e.g., via pulls.deleteReviewComment) or update the job/comment to reflect the actual behavior (dismiss review only).
| const [commentsResponse, reviewsResponse] = await Promise.all([ | ||
| withRetry((client) => client.rest.pulls.listReviewComments({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| pull_number: prNumber, | ||
| per_page: 100, | ||
| })), | ||
| withRetry((client) => client.rest.pulls.listReviews({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| pull_number: prNumber, | ||
| per_page: 100, | ||
| })), | ||
| ]); | ||
|
|
||
| const comments = commentsResponse.data || []; | ||
| const reviews = reviewsResponse.data || []; |
There was a problem hiding this comment.
These API calls only fetch the first 100 review comments / reviews (per_page: 100) and don’t paginate. For large PRs, ignored-path reviews beyond the first page won’t be considered. Consider using Octokit pagination (or the repo’s retry/pagination helpers) to ensure all review comments/reviews are processed.
| const [commentsResponse, reviewsResponse] = await Promise.all([ | |
| withRetry((client) => client.rest.pulls.listReviewComments({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: prNumber, | |
| per_page: 100, | |
| })), | |
| withRetry((client) => client.rest.pulls.listReviews({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: prNumber, | |
| per_page: 100, | |
| })), | |
| ]); | |
| const comments = commentsResponse.data || []; | |
| const reviews = reviewsResponse.data || []; | |
| const [comments, reviews] = await Promise.all([ | |
| withRetry((client) => | |
| client.paginate(client.rest.pulls.listReviewComments, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: prNumber, | |
| per_page: 100, | |
| }) | |
| ), | |
| withRetry((client) => | |
| client.paginate(client.rest.pulls.listReviews, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: prNumber, | |
| per_page: 100, | |
| }) | |
| ), | |
| ]); |
templates/consumer-repo/.github/workflows/agents-bot-comment-handler.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e78c49b556
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
templates/consumer-repo/.github/workflows/agents-bot-comment-handler.yml
Outdated
Show resolved
Hide resolved
… pagination Address all coding agent review comments on PR #1398: 1. Restore download-artifact@v7 in bridge workflow (both main + template) The v4 pinning was stale; main already has v7 from PR #1394. 2. Fix withRetry token rotation in bot-comment-dismiss.js (both copies) Callbacks now accept the client parameter from withRetry so token switching works under rate limiting. Default fallback passes github as the client argument. 3. Add pagination in template dismiss_ignored job Use client.paginate() instead of per_page:100 without pagination, ensuring all review comments are processed on large PRs. 4. Remove unused botLogins field from review entry tracking The ignoredComments array already tracks per-comment login, making botLogins redundant. 5. Clarify dismiss_ignored job comment: dismisses review state (not individual comments) to prevent blocking merge.
|
Autofix updated these files:
|
Automated Status Summary
Scope
GitHub's native Copilot code review and
chatgpt-codex-connector[bot]are posting review comments on internal ledger files (e.g.,.agents/issue-*-ledger.yml) as if they were substantive code changes. This creates duplicate, noisy review comment pairs and can waste automation cycles when agents are dispatched to "fix" non-code tracking files.Tasks
Copilot Configuration Research
Copilot Configuration Implementation
.github/copilot-review-config.ymlto exclude.agents/directory from automated reviews.agents/issue-test-ledger.ymlBot Comment Handler Auto-Dismiss Logic
bot-comment-handlerto detect review comments posted on files matchingignored_pathspatternsbot-comment-handlerto dismiss or resolve review comments programmaticallygithub-copilot[bot]andchatgpt-codex-connector[bot]bot-comment-handlerto track which review comments are automatically dismissed.agents/issue-test-ledger.ymlfilesConnector Bot Configuration
chatgpt-codex-connectorcodebase.agents/directory to the connector's path exclusion configuration or filter list.agents/issue-*-ledger.ymlpattern.agents/changesAcceptance criteria
.agents/issue-*-ledger.ymlfiles in PRs (verified by creating a test PR with changes to.agents/issue-test-ledger.ymland confirming no Copilot review comments appear within 5 minutes of PR creation)chatgpt-codex-connector[bot]produces zero review comments on.agents/issue-*-ledger.ymlfiles in PRs (verified by creating a test PR with changes to.agents/issue-test-ledger.ymland confirming no connector review comments appear within 5 minutes of PR creation)ignored_paths(e.g.,.agents/) are automatically dismissed within 30 seconds of being posted (verified by checking PR review comment status via GitHub API)bot-comment-handlerlogs contain entries for each auto-dismissed review comment with file path and bot name.agents/issue-test-ledger.ymlchanges shows zero visible review comments from either bot after 5 minutesHead SHA: 544aea6
Latest Runs: ❔ in progress — Gate
Required: gate: ❔ in progress