Skip to content

fix(runtime): qualify failed and stopped Codex command receipts - #1330

Merged
aviggiano merged 1 commit into
unstablefrom
codex/fup-1319-cli-receipts
Oct 26, 2026
Merged

aviggiano merged 1 commit into
unstablefrom
codex/fup-1319-cli-receipts

Conversation

@aviggiano

@aviggiano aviggiano commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1319; adds the real Codex CLI completion cases requested in its review and continues the qualification work tracked by #1317.

  • Exercise Codex 0.146.0 with a local deterministic Responses server when a command exits with code 7 or is stopped through its native session using Ctrl+C. Both cases verify a PostToolUse completion receipt and allow a new identical command to run exactly once.
  • Treat inline -c=features.hooks=false and -c=hooks.PostToolUse=[] as caller-provided hook configuration, so the adapter reports the command guard inactive instead of claiming it is enabled.

The real CLI tests use a local server and require no provider credentials. They run when ULTRAFUZZ_TEST_CODEX points to the pinned @openai/codex@0.146.0 binary.

Validation

  • pnpm --filter @ultrafuzz/cli... build
  • pnpm exec tsc -p packages/runtime/tsconfig.test.json
  • pnpm exec prettier --check packages/runtime/src/command-invocations.ts packages/runtime/test/command-invocations.test.ts
  • pnpm exec eslint packages/runtime/src/command-invocations.ts packages/runtime/test/command-invocations.test.ts
  • Focused command invocation tests with the real Codex 0.146.0 CLI: 3 passed (configuration, nonzero exit, native session stop).
  • git diff --check

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

The adapter now recognizes inline -c= hook settings and reports the command guard inactive instead of injecting its own hooks.

  • Codex's guard now spots attached -c hook settings.
  • Codex's real-CLI tests cover failed and stopped commands.

Reviews (2) · Last reviewed commit: "test(runtime): cover Codex failure and s..." · Reviewed by Greptile

@aviggiano
aviggiano requested a review from a team as a code owner October 26, 2026 19:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T19:45:26.272930Z bebbebd PR opened
ℹ️ 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.

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

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

function suppliesHookConfiguration(args: string[]): boolean {
return (
args.some((argument) => /^(?:--config=|-c)?\s*(?:hooks(?:[.=]|\s*=)|features\.hooks\s*=)/u.test(argument)) ||
args.some((argument) => /^(?:(?:--config|-c)=)?\s*(?:hooks(?:[.=]|\s*=)|features\.hooks\s*=)/u.test(argument)) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Continue recognizing attached short config overrides

When a caller uses an attached short override such as -chooks.PostToolUse=[] or -chooks={}, this regex no longer recognizes it, so the adapter injects its own settings and reports the command guard enabled even though the later caller override can disable the completion hook or all hooks; completed commands can then remain active and identical commands be incorrectly denied. Codex 0.146.0 declares this option as a value-taking clap short -c (Codex source), and clap documents attached values such as -oval as equivalent to -o val (clap documentation), so retain support for the previously matched -cVALUE form while adding -c=VALUE.

Useful? React with 👍 / 👎.

@aviggiano
aviggiano force-pushed the codex/fup-1319-cli-receipts branch from bebbebd to c240dc5 Compare October 26, 2026 19:58
@aviggiano
aviggiano force-pushed the codex/fup-1319-cli-receipts branch from c240dc5 to 1b02b59 Compare October 26, 2026 20:00
@aviggiano
aviggiano merged commit d22ba28 into unstable Oct 26, 2026
7 checks passed
@aviggiano
aviggiano deleted the codex/fup-1319-cli-receipts branch October 26, 2026 20:02
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