Skip to content

fix(skills): match codex bot in GraphQL author.login filters#227

Merged
AlexandreYang merged 1 commit into
mainfrom
alex/skill-graphql-codex-filter
May 5, 2026
Merged

fix(skills): match codex bot in GraphQL author.login filters#227
AlexandreYang merged 1 commit into
mainfrom
alex/skill-graphql-codex-filter

Conversation

@AlexandreYang

Copy link
Copy Markdown
Member

Summary

GitHub's GraphQL API returns Bot author logins in their bare form (chatgpt-codex-connector) while the REST API returns them suffixed (chatgpt-codex-connector[bot]). Three GraphQL select() clauses in review-fix-loop and address-pr-comments filter on the REST-suffixed literal only, so every codex-authored review thread was silently dropped from the unresolved count.

Impact

Surfaced today on PR #226: a codex P2 thread (#discussion_r3189543903, "Require non-empty command descriptions") sat unresolved through four "clean" review-fix-loop iterations because Step 2E and Step 3's GraphQL queries never saw it. SUCCESS_COUNT reached 5 and the loop declared the PR clean while a real P2 was open. The bug was visible to a human inspecting the PR but invisible to the loop.

Fix

Extend the GraphQL select() clauses at three sites to accept either form:

- select(.comments.nodes[0].author.login == $me or .comments.nodes[0].author.login == "chatgpt-codex-connector[bot]")
+ select(.comments.nodes[0].author.login == $me or .comments.nodes[0].author.login == "chatgpt-codex-connector" or .comments.nodes[0].author.login == "chatgpt-codex-connector[bot]")

Sites changed:

  • .claude/skills/review-fix-loop/SKILL.md:234 (Step 2E unresolved-thread check)
  • .claude/skills/review-fix-loop/SKILL.md:321 (Step 3 verify check)
  • .claude/skills/address-pr-comments/SKILL.md:127 (resolved-thread filter)

A short # NOTE: comment is added above each query explaining the REST-vs-GraphQL discrepancy so future edits don't regress.

Why both forms

Keeping the [bot] form alongside the bare form means the filter stays correct if GitHub ever standardises on the suffixed login in GraphQL. Cheap forward-compatibility.

Not changed

  • fix-ci-tests/SKILL.md:227 and address-pr-comments/SKILL.md:66, 77 use the REST API path, which already returns chatgpt-codex-connector[bot] correctly. Left untouched.

Test plan

  • Verified with the live API on PR test(help): make help tests resilient to new builtins #226: GraphQL author.login returns chatgpt-codex-connector for the bot's threads (typename Bot); REST returns chatgpt-codex-connector[bot].
  • Future review-fix-loop runs against any PR with a codex thread should surface them in the unresolved count.

GitHub's GraphQL API returns Bot author logins in their bare form
(`chatgpt-codex-connector`) while the REST API returns them suffixed
(`chatgpt-codex-connector[bot]`). The unresolved-thread queries in
review-fix-loop and address-pr-comments use GraphQL but filter on the
REST-suffixed literal, so every codex-authored review thread was
silently dropped from the count.

Effect: Step 2E and Step 3 in review-fix-loop reported `unresolved=0`
even when codex had open threads, falsely advancing SUCCESS_COUNT and
declaring the PR clean. Surfaced today on PR #226 where a codex P2
thread (`#discussion_r3189543903`) sat open through 4 "clean"
iterations.

Fix: extend the GraphQL `select()` clauses in three sites to accept
either form. Forward-compatible if GitHub ever changes the convention.
REST API filters (fix-ci-tests, address-pr-comments REST paths) are
already correct and unchanged.
@AlexandreYang
AlexandreYang marked this pull request as ready for review May 5, 2026 15:26
@AlexandreYang
AlexandreYang added this pull request to the merge queue May 5, 2026
Merged via the queue into main with commit 0d4c8fb May 5, 2026
36 checks passed
@AlexandreYang
AlexandreYang deleted the alex/skill-graphql-codex-filter branch May 5, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants