Skip to content

🤖 ci: add Codex PR loop tooling for agents#6

Merged
ThomasK33 merged 3 commits into
mainfrom
agents-vtxz
Feb 9, 2026
Merged

🤖 ci: add Codex PR loop tooling for agents#6
ThomasK33 merged 3 commits into
mainfrom
agents-vtxz

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

This PR ports the mux pull-request workflow tooling into coder-k8s, adapted for a Go/Kubernetes controller repository.

Background

We want agents in this repo to follow a strict PR lifecycle:

  • create/update PRs with standard guidance
  • request Codex review and wait for response
  • address/resolve review comments in a loop
  • wait for required CI checks before considering the PR ready

Implementation

  • Added .mux/skills/pull-requests/SKILL.md with this repo's validation commands (make verify-vendor, make test, make build) and explicit Codex loop discipline.
  • Added PR helper scripts under scripts/:
    • wait_pr_checks.sh
    • wait_pr_codex.sh
    • check_codex_comments.sh
    • resolve_pr_comment.sh
    • check_pr_reviews.sh (adapted to dynamically resolve owner/repo)
    • extract_pr_logs.sh (adapted for dynamic owner/repo and Go-oriented repro hints)
  • Added scripts/wait_pr_ready.sh as a one-command orchestrator (Codex -> CI) for end-of-workflow waiting.
  • Added a repository AGENTS.md with non-TypeScript guidance adapted from mux and a required Codex review loop.
  • Updated .github/workflows/ci.yaml with a PR-only codex-comments job to fail when unresolved Codex feedback remains.

Validation

  • bash -n scripts/*.sh
  • go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.10 .github/workflows/ci.yaml
  • make verify-vendor
  • make test
  • make build

Risks

Low-to-moderate process risk: this PR mostly adds tooling and instructions, but the new CI codex-comments gate can block merges if bot comments are unresolved or if the GitHub API is transiently unavailable.


Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh

Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $0.82

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Please review the PR for correctness and workflow fit for this Go repo.

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

Copy link
Copy Markdown

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: e7116deab2

ℹ️ 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/check_codex_comments.sh Outdated
Comment thread scripts/extract_pr_logs.sh Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the two review findings:

  • paginated Codex/review thread queries
  • fixed PR-number handling in extract_pr_logs

Please take another look.

Bring over mux pull-request skill and supporting scripts into this Go repo,
then adapt them for coder-k8s workflows.

- add PR skill at .mux/skills/pull-requests/SKILL.md
- add Codex/PR scripts under scripts/
- add scripts/wait_pr_ready.sh wrapper for one-command Codex+CI waiting
- add project AGENTS.md guidance (non-TypeScript sections adapted for Go)
- add codex-comments job to .github/workflows/ci.yaml

Validation:
- bash -n scripts/*.sh
- actionlint .github/workflows/ci.yaml
- make verify-vendor
- make test
- make build

---
_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.82`_

<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.82 -->
- paginate Codex comment + review thread queries in check_codex_comments.sh
- paginate review threads in check_pr_reviews.sh
- treat numeric input as PR when it resolves in extract_pr_logs.sh

Validation:
- bash -n scripts/*.sh
- make verify-vendor
- make test
- make build

---
_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.82`_

<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.82 -->

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

Copy link
Copy Markdown

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: 594331d32c

ℹ️ 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/wait_pr_codex.sh Outdated
Handle PRs with more than 100 comments/review threads by paginating the
GraphQL fetches in wait_pr_codex.sh.

Validation:
- bash -n scripts/*.sh
- make verify-vendor
- make test
- make build

---
_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.82`_

<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.82 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Addressed the pagination gap in wait_pr_codex.sh so it traverses all comment/thread pages instead of relying on a 100-item window.

Please re-review.

@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".

@ThomasK33 ThomasK33 added this pull request to the merge queue Feb 9, 2026
Merged via the queue into main with commit f8b95f6 Feb 9, 2026
5 checks passed
@ThomasK33 ThomasK33 deleted the agents-vtxz branch February 9, 2026 11:56
@ThomasK33

Copy link
Copy Markdown
Member Author

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