Skip to content

Conversation

@ltawfik
Copy link
Collaborator

@ltawfik ltawfik commented Jul 1, 2025

Summary

  • Adds safety mechanisms to prevent memory/timeout issues in stderr handling
  • Improves error detection to use exit codes instead of fragile string matching
  • Maintains FastAPI SSE compatibility while addressing production concerns

Changes

  • 10MB memory limit on stderr collection with clear truncation message
  • 30 second timeout protection to prevent hanging on stderr read
  • Exit code based error detection instead of searching for "error" string
  • Debug logging for stderr output on successful runs
  • Better exception handling for client disconnections

This builds on #60's fix while addressing critical edge cases for production use.

🤖 Generated with Claude Code

Add critical safety mechanisms to the sequential stderr reading approach:
- 10MB memory limit on stderr collection with truncation message
- 30 second timeout protection to prevent hanging
- Proper exit code based error detection instead of string matching
- Debug logging for stderr on successful runs
- Better exception handling for edge cases

This addresses potential production issues while maintaining FastAPI compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ltawfik ltawfik closed this Jul 1, 2025
@ltawfik ltawfik deleted the pr-60 branch July 1, 2025 23:25
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.

2 participants