Skip to content

ci: autonomous Codex maintenance without Claude gates - #800

Merged
cdeust merged 19 commits into
mainfrom
ci-codex-only
Oct 27, 2026
Merged

cdeust merged 19 commits into
mainfrom
ci-codex-only

Conversation

@cdeust

@cdeust cdeust commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Removes Claude review/repair actions and their merge dependency. Native Codex code and security reviews remain required on the exact current head alongside every CI test prerequisite. Supersedes closed #797 while preserving its source.

Adds a local Orca dispatcher using the owner's existing Codex account for PR correction and issue implementation. It serializes workers, deduplicates unchanged snapshots and arms protected auto-merge. Owner issue requirements run automatically; other authors need owner approval bound to the exact issue snapshot. Inspection has no worker side effects, and completion does not consume unseen issue updates.

Both completion handling and the post-merge resolver retain effective job results across partial reruns. Obsolete skipped matrix placeholders no longer block resumption.

Validation: 181 CI script tests and 24 gate tests passed; Ruff, actionlint, source and craftsmanship gates passed. A real Orca worker verified GitHub access and ChatGPT authentication, then completed its supervised lifecycle. Native mutation replay returned the same task identity. The per-user launchd service is installed and its plist validates; activation and an actual repair cycle remain to be verified. The Mac and Orca must run for local repair and issue intake.

cdeust and others added 16 commits October 26, 2026 23:18
Signed-off-by: cdeust <cdeust@icloud.com>
Signed-off-by: cdeust <cdeust@icloud.com>
Signed-off-by: cdeust <cdeust@icloud.com>
SDKUserMessage.tool_use_result is one structured Output per message (SDK
0.3.307 sdk.d.ts). Several tool_result blocks sharing it could let a completed
status vouch for an asynchronous launch acknowledgement; fail closed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A grouped message whose first tool_result had a non-string tool_use_id
raised an uncaught TypeError. Guard the lookup so _tool_result rejects it
with its category diagnostic; add CLI regression tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…vidence

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The App OIDC exchange refuses a workflow that differs from the default
branch, so the action skipped with success and no review ran. Review
phases now pass github_token (contents: read, no id-token); Fix keeps
the App auth. native_review runs beside the tests, review aggregates and
repairs. Codex resume reads every attempt and may repair after failed tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rjhfpPKL7Bjsi35pH6DgS
…tity

Owner rule: review comments come from claude[bot] and Codex only. The App
OIDC exchange stays; id-token: write is restored on native_review.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rjhfpPKL7Bjsi35pH6DgS
…eeps tests

claude.yml gains a workflow_run review job (native code and security
reviews as claude[bot], owner quota). It runs the main file, so a PR that
edits pipeline.yml is still reviewed, and the PR is read as a diff only.
@claude mention triggers are unchanged. Pipeline drops native_review.
codex-review-resume.yml becomes Codex.yml; the native Codex bot is kept.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rjhfpPKL7Bjsi35pH6DgS
Verdict is a COMMENTED or APPROVED claude[bot] review at the PR head commit_id
with a v1 marker (kind, findings). Tag-triggered and automatic reviews count
alike. The claude.yml review job now publishes that review instead of a comment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rjhfpPKL7Bjsi35pH6DgS
Native code-review step 1 skips a PR Claude already commented on, even on an
older SHA. Both review prompts now require the full review of the exact head.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rjhfpPKL7Bjsi35pH6DgS
… execution

Fixes the real findings of the native reviews on 6b96eb2: the gate read the
verdicts once and stranded after a late review (Claude, Codex 4384253243), it
ignored the execution validators (4384253238), and claude[bot] repairs could not
trigger the reviews (4384253244). The review run is found by its run-name, the
gate waits for it, and set-head origin main lets the security skill diff.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rjhfpPKL7Bjsi35pH6DgS
The gate waited for a claude.yml workflow_run that cannot exist before
claude.yml is on main. It now reads main's claude.yml: with the review
job present it waits for the named run and requires success; without it
only tag-triggered claude[bot] verdicts count. The exact commit_id,
author, state and findings checks apply in both cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rjhfpPKL7Bjsi35pH6DgS
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T07:36:23.094806Z 6fc2905 New commits
🔒 Security Review ✅ Completed 2026-10-27T07:38:33.039071Z 6fc2905 New commits

Security findings

Advisory findings (2)

ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cdeust
cdeust enabled auto-merge (squash) October 27, 2026 02:53

@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: a1272bb87b

ℹ️ 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/ci_autopilot.py
Comment on lines +200 to +201
if state.get("launch_pending"):
return launch(options, state, state["launch_pending"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor inspect mode before replaying a pending launch

If a previous dispatch failed or lost its response after saving launch_pending, running the dispatcher with --inspect reaches launch() before checking options.inspect. That path writes state and invokes worker-start, potentially starting an autonomous worker that commits and pushes changes during what otherwise behaves as a read-only inspection. Check inspect mode before replaying pending launches, and avoid releasing workers through settle() during inspection as well.

Useful? React with 👍 / 👎.

Comment thread scripts/ci_autopilot.py Outdated
Comment on lines +140 to +143
state["seen"][key] = (
current["fingerprint"]
if current and active["kind"] == "issue"
else active["fingerprint"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve issue updates that the finishing worker has not processed

If the owner updates an issue after its worker finishes reading it but before the dispatcher settles that worker, this assigns the updated issue's fingerprint to seen rather than the fingerprint originally dispatched. The same tick then skips the updated issue, and subsequent ticks remain idle until another update occurs, even though no worker processed the new requirements or follow-up information. Record only the dispatched fingerprint unless the worker explicitly acknowledges processing the newer issue snapshot.

Useful? React with 👍 / 👎.

Comment on lines +123 to +126
endpoint = f"repos/{repo}/actions/jobs/{source.positive(identity)}/rerun"
try:
subprocess.run(
["gh", "api", "--method", "POST", endpoint],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the post-merge resolver retain prerequisites across reruns

When reviews finish after the tests, this endpoint reruns only the selected gate and its dependents, leaving successful test jobs in an earlier attempt (rerun documentation). However, _source_run() in .github/workflows/pipeline-post-merge.yml:229-230 still fetches /actions/runs/{id}/jobs with the default latest filter, which returns "jobs from the most recent execution" (jobs documentation). Consequently, the successful resumed Pipeline reaches the post-merge resolver without its earlier test results, and _validate_jobs() rejects it for missing the environment matrix instead of merging and running post-merge tests. Update that resolver to reconstruct effective results across attempts, as this completion coordinator already does.

Useful? React with 👍 / 👎.

@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 Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: a1272bb87b

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment on lines +40 to +42
for issue in issues:
if not held(issue):
result.append(

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 Security Review · Automatically triggered

P2 Badge Security: Require trusted opt-in before dispatching issue workers

When the documented launchd service is enabled and external users can file issues, this loop queues every open issue unless someone has already applied a hold; intake does not retain author identity. The worker is then told to read the discussion, implement it, run checks, and push using the owner's Codex/GitHub session. Creating or later editing an issue can therefore start a privileged process on the maintainer's Mac. Worktree and branch protections do not protect that sensitive user environment. Require an owner-applied, revision-bound opt-in before queueing.

SECURITY.md reference: SECURITY.md:L5-L16

Useful? React with 👍 / 👎.

@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 Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 332d142c5f

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment on lines +20 to +22
for pull in pulls:
if pull["isDraft"] or pull["isCrossRepository"] or held(pull):
continue

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 Security Review · Automatically triggered

P2 Badge Security: Require owner approval before running PR code locally

When the optional launchd dispatcher is enabled, a compromised publisher of a dependency covered by the weekly Dependabot uv updater can produce a same-repository dependency PR whose CI fails. Issue intake is now revision-authorized, but this PR loop neither fetches author/association nor requires owner approval; it starts a local Codex worker told to reproduce failures and run checks with the owner's account. Those checks uv sync the PR lock and run pytest, so dependency code can execute on the maintainer's Mac before reviews or branch protection help. Require owner approval bound to the exact head SHA and sandbox checks away from user credentials.

SECURITY.md reference: SECURITY.md:L5-L16

Useful? React with 👍 / 👎.

@cdeust
cdeust merged commit 93430b8 into main Oct 27, 2026
17 checks passed
@cdeust
cdeust deleted the ci-codex-only branch October 27, 2026 07:56
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