Skip to content

fix: handle ProcessTimedOutException and ProcessSignaledException in SymfonyProcessRunner#56

Open
jordanpartridge wants to merge 1 commit intomasterfrom
fix/process-runner-exception-handling
Open

fix: handle ProcessTimedOutException and ProcessSignaledException in SymfonyProcessRunner#56
jordanpartridge wants to merge 1 commit intomasterfrom
fix/process-runner-exception-handling

Conversation

@jordanpartridge
Copy link
Contributor

@jordanpartridge jordanpartridge commented Mar 5, 2026

Summary

  • Wrap Process::run() in try/catch to handle ProcessTimedOutException and ProcessSignaledException gracefully
  • Return a failed ProcessResult instead of letting exceptions propagate uncaught through TestRunner, SecurityScanner, and commands
  • ProcessTimedOutException returns exit code 124 with descriptive message
  • ProcessSignaledException returns exit code from process (or 137 fallback)

Test plan

  • Added test: process timeout returns failed ProcessResult with exit code 124
  • Added test: process killed by signal returns failed ProcessResult with exit code 137
  • Existing tests still pass (205 total, all green)
  • Ran vendor/bin/pint (fixed style in 5 additional files)

Closes #50

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Warning

Rate limit exceeded

@jordanpartridge has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 55 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 66a415b1-df0f-4423-8ab5-2a0549302e8b

📥 Commits

Reviewing files that changed from the base of the PR and between 5691a60 and 2cb4d91.

📒 Files selected for processing (7)
  • app/Commands/CertifyCommand.php
  • app/GitHub/ChecksClient.php
  • app/Services/PromptAssembler.php
  • app/Services/SymfonyProcessRunner.php
  • app/Transformers/PhpStanPromptTransformer.php
  • app/Transformers/TestFailurePromptTransformer.php
  • tests/Unit/Services/SymfonyProcessRunnerTest.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/process-runner-exception-handling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

📊 Coverage Report

Metric Coverage Threshold Status
Lines 68.5% 100%

Files Below Threshold

File Coverage Uncovered Lines
app/Commands/AnalyzeCommand.php 0% 22, 23, 25, 26, 28... (+51 more)
app/Commands/CheckCommand.php 0% 30, 31, 33, 34, 37... (+91 more)
app/Transformers/PhpStanPromptTransformer.php 3.6% 49, 51, 52, 53, 54... (+76 more)
app/Transformers/TestFailurePromptTransformer.php 11.7% 47, 68, 69, 71, 72... (+101 more)
app/Services/PromptAssembler.php 88.9% 55, 56, 57, 58, 120
app/GitHub/ChecksClient.php 89.1% 222, 223, 226, 227, 230... (+8 more)

🏆 Synapse Sentinel Gate

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

🔧 Synapse Sentinel: 2 checks need attention

The following issues must be resolved before this PR can be merged:


Test Failures (1 total)

Fix these failing tests:

1. CertifyCommand → handle → it stops at first failure when stop-on-fa… 0.38s

FAIL at Unknown file:?

⨯ CertifyCommand → handle → it outputs compact format when --compact…  0.04s  
  ✓ CertifyCommand → handle → it accepts coverage option                 0.05s  
  ✓ CertifyCommand → handle → it writes to GITHUB_STEP_SUMMARY when ava… 0.04s  
  ⨯ CertifyCommand → handle → it displays failure table when checks fai… 0.03s  
  ✓ CertifyCommand → handle → it writes to GITHUB_OUTPUT when available  0.03s  
  ✓ CertifyCommand → handle → it uses token from option... (truncated)

Fix: Review the test expectation vs actual behavior. Check the tested code logic.


Security Audit


Review the output and fix any issues.

Quick Reference:

  • PHPStan errors → Fix type mismatches first, then missing types
  • Test failures → Read the assertion message, trace expected vs actual
  • Style issues → Run composer format to auto-fix

🤖 Generated by Synapse Sentinel - View Run

…SymfonyProcessRunner

Wrap Process::run() in try/catch to gracefully handle timeout and signal
exceptions. Returns a failed ProcessResult instead of letting exceptions
propagate uncaught through callers.

- ProcessTimedOutException → exit code 124
- ProcessSignaledException → exit code from process or 137
- Add tests for both exception paths
- Run pint (style fixes in 5 additional files)

Closes #50
@jordanpartridge jordanpartridge force-pushed the fix/process-runner-exception-handling branch from fafe479 to 2cb4d91 Compare March 5, 2026 05:16
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

🔧 Synapse Sentinel: 2 checks need attention

The following issues must be resolved before this PR can be merged:


All tests passed.---

Security Audit


Review the output and fix any issues.

Quick Reference:

  • PHPStan errors → Fix type mismatches first, then missing types
  • Test failures → Read the assertion message, trace expected vs actual
  • Style issues → Run composer format to auto-fix

🤖 Generated by Synapse Sentinel - View Run

@jordanpartridge jordanpartridge changed the title fix: handle process exceptions in SymfonyProcessRunner fix: handle ProcessTimedOutException and ProcessSignaledException in SymfonyProcessRunner Mar 5, 2026
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.

Fix SymfonyProcessRunner exception handling (production bug)

1 participant