Skip to content

Fix Codex review base prompt compatibility#154

Open
Horacehxw wants to merge 1 commit into
PolyArch:devfrom
Horacehxw:codex-bug
Open

Fix Codex review base prompt compatibility#154
Horacehxw wants to merge 1 commit into
PolyArch:devfrom
Horacehxw:codex-bug

Conversation

@Horacehxw
Copy link
Copy Markdown

Summary

  • add regression coverage that rejects codex review --base ... - and stdin prompt input
  • update the review audit prompt to document the Codex 0.130.0 --base + [PROMPT] incompatibility
  • guard empty Bash arrays in nested Codex/template paths and align finalize cache-path test with canonical project roots

Verification

  • git diff --check HEAD~1..HEAD
  • bash tests/test-disable-nested-codex-hooks.sh
  • bash tests/test-templates-comprehensive.sh
  • bash tests/test-finalize-phase.sh

Note: bash tests/run-all-tests.sh is not a valid aggregate verification on this macOS host because the runner uses Bash 4 associative arrays while /bin/bash is 3.2.57.

Copilot AI review requested due to automatic review settings May 11, 2026 13:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the RLCR Codex review flow to stay compatible with Codex 0.130.0 behavior when --base is used, and adds regression coverage to prevent reintroducing prompt/stdin input in that mode.

Changes:

  • Add regression assertions that nested codex review --base ... is invoked without prompt input (- arg) and without stdin.
  • Update the review audit prompt template (and fallback text) to document the Codex 0.130.0 --base + prompt incompatibility.
  • Make cache-path test computation use canonicalized project roots and add guarded Bash array expansions in nested Codex/template paths.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test-finalize-phase.sh Aligns cache path computation with hook logic by canonicalizing the test directory before sanitization.
tests/test-disable-nested-codex-hooks.sh Adds regression coverage ensuring codex review --base is not given prompt input (-) or stdin, and verifies audit prompt wording.
prompt-template/codex/code-review-phase.md Documents the Codex 0.130.0 incompatibility in the generated audit prompt template.
hooks/loop-codex-stop-hook.sh Updates audit prompt fallback wording and guards array expansions for nested Codex invocations/logging.
hooks/lib/template-loader.sh Guards empty array expansion when constructing env arguments for template rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"--base arguments with no trailing '-' and no stdin" "$(cat "$TEST_DIR/review.args" 2>/dev/null || echo missing)"
fi

REVIEW_PROMPT="$REPO_REVIEW/.humanize/rlcr/2026-03-14_12-00-00/round-2-review-prompt.md"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is PERVIEW_PROMPT a fixed path?

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.

3 participants