Skip to content

fix: anti-recursion guard, stderr capture, review ordering (#272 #273 #274)#275

Open
RyderFreeman4Logos wants to merge 4 commits intomainfrom
fix/issues-272-273-274
Open

fix: anti-recursion guard, stderr capture, review ordering (#272 #273 #274)#275
RyderFreeman4Logos wants to merge 4 commits intomainfrom
fix/issues-272-273-274

Conversation

@RyderFreeman4Logos
Copy link
Owner

Summary

Fixes three issues discovered during CSA review workflow execution:

Test plan

  • Verify csa review --tool claude-code no longer causes infinite recursion
  • Verify subprocess crash errors now include stderr context
  • Verify pr-codex-bot workflow blocks PR creation when local review has issues
  • cargo test -p csa-acp passes (44 tests)
  • cargo clippy clean

🤖 Generated with Claude Code

RyderFreeman4Logos and others added 4 commits February 26, 2026 22:34
When claude-code-acp is used as the review/debate tool, it reads
CLAUDE.md/AGENTS.md rules containing "MUST use csa review" directives,
causing it to invoke csa commands inside Bash — creating an infinite
recursion loop that ends in SIGTERM (exit 143).

Fix: prepend an explicit anti-recursion instruction to the prompt
telling the tool it is running inside a CSA subprocess and must NOT
invoke any csa commands. This matches the role detection pattern
already documented in the csa-review and debate SKILL.md files.

Closes #272

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When an ACP subprocess crashes before initialization, the
ProcessExited error only reported the exit code with zero context.
The stderr pipe contents (containing crash details like Node.js
EPIPE stack traces) were silently lost.

Change ProcessExited from a tuple variant to a struct with both
code and stderr fields. The ensure_process_running() method now
captures the last 10 lines of stderr and includes them in the
error message for post-mortem diagnosis.

Closes #273

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add condition guard to workflow.toml Step 4 (Push and Create PR) that
blocks PR creation when LOCAL_REVIEW_HAS_ISSUES is set. This prevents
an orchestrator from creating a PR before the local review passes.

Also add explicit precondition documentation to PATTERN.md Step 4
explaining the two-layer review architecture dependency.

Closes #274

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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