Skip to content

Codex review replies in-thread + @codex-tagged; perms allowlist#2

Merged
VoidAxiom merged 5 commits into
mainfrom
sk/codex-review-reply-convention
May 17, 2026
Merged

Codex review replies in-thread + @codex-tagged; perms allowlist#2
VoidAxiom merged 5 commits into
mainfrom
sk/codex-review-reply-convention

Conversation

@VoidAxiom
Copy link
Copy Markdown
Owner

Why

Process-bug fix. On PR #1 I closed a Codex review thread with a top-level PR comment and no @codex tag, so Codex never re-evaluated and the thread was resolved unilaterally. With "conversations must be resolved before merge" enforced, this convention has to be correct.

Changes

  • scripts/review-gate.sh: new reply <threadId> <body> subcommand — posts in the review thread via addPullRequestReviewThreadReply, not a top-level comment.
  • CLAUDE.md / .codex/DELEGATION.md / .claude/commands/review-gate.md: mandate reply in-thread + @codex tag, and resolve a substantive thread only after Codex re-evaluates (never unilaterally; trivial fixes may rely on the in-thread @codex reply as the record).
  • .claude/settings.json: allowlist read-only pnpm typecheck/pnpm lint (from the fewer-permission-prompts scan) — separate commit.

Dogfood

This PR's Codex feedback (if any) will be answered with the new convention: review-gate.sh reply <thread> "... @codex ..." in-thread, resolve only after re-eval.

No Linear link (Linear MCP not loaded in this session).

VoidAxiom added 2 commits May 16, 2026 20:59
Fixes the convention bug where a Codex review thread was closed with a
top-level PR comment and no @codex tag (Codex never re-evaluated).

- scripts/review-gate.sh: new 'reply' subcommand posts via
  addPullRequestReviewThreadReply (in the thread, not a PR comment)
- CLAUDE.md / .codex/DELEGATION.md / /review-gate: mandate in-thread
  reply + @codex tag, and resolve a substantive thread only after Codex
  re-evaluates (never unilaterally)
@VoidAxiom
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1932ffb7d3

ℹ️ 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".

Comment thread scripts/review-gate.sh Outdated
Addresses Codex review P2 on PR #2: comments(first:1) only ever showed
the original finding, so once a thread had finding -> reply -> Codex
re-review, status/threads would resolve on stale data. Now fetches
comments(last:20) and surfaces both the finding and the latest reply.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fcd8b57af

ℹ️ 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".

Comment thread scripts/review-gate.sh Outdated
Addresses Codex P2 on PR #2 ("fetch the original finding separately"):
the GraphQL query now uses aliased finding:comments(first:1) +
recent:comments(last:20), so the original finding is never lost no
matter how many replies a thread has; renderers updated accordingly.

Corrects the convention itself (empirically: Codex re-review lands as a
NEW thread, not an in-thread reply): reply in-thread for the audit
record then resolve; the gate is 'zero unresolved Codex threads + CI
green + mergeStateStatus CLEAN', not waiting for an in-thread re-review.
Updated CLAUDE.md, .codex/DELEGATION.md, /review-gate.
@VoidAxiom
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ 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".

Per direction: when Codex leaves a review comment, acknowledge with a
TOP-LEVEL PR comment that @codex-mentions it and highlights the change,
resolve the old conversation, then wait for re-review (which always
arrives as new threads). Updates CLAUDE.md, .codex/DELEGATION.md,
/review-gate; review-gate.sh 'reply' demoted to optional audit note.
@VoidAxiom
Copy link
Copy Markdown
Owner Author

@codex re-review please. Since the last review I addressed both findings and pushed through 823bfa2:

  1. "Fetch the latest thread replies before resolving" → the GraphQL query now uses aliased finding:comments(first:1) + recent:comments(last:20){totalCount}; status/threads renderers use them, so the original finding is never lost regardless of reply count.
  2. "Fetch the original finding separately" → same aliased-query fix covers this directly.
  3. Adopted the top-level-@codex acknowledgement convention across CLAUDE.md / .codex/DELEGATION.md / /review-gate; both prior threads resolved with the fix commits as record.

CI is green on 823bfa2. Please re-review the current state.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

ℹ️ 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".

@VoidAxiom VoidAxiom merged commit 3218d83 into main May 17, 2026
1 check passed
@VoidAxiom VoidAxiom deleted the sk/codex-review-reply-convention branch May 17, 2026 01:17
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.

1 participant