Reimplement ralph-loop in TypeScript with Bun runtime#6
Open
Reimplement ralph-loop in TypeScript with Bun runtime#6
Conversation
Port the Ruby ralph-loop.rb parallel Claude runner to TypeScript, targeting the Bun runtime for native TS execution without a build step. https://claude.ai/code/session_017U4Gj5uNfcEJk3uLYeM9p2
36 tests covering rendering, state queries, config loading, PRD I/O, state mutation, process management, cleanup, and task list display. Exports class and helpers with guarded entry point for testability. https://claude.ai/code/session_017U4Gj5uNfcEJk3uLYeM9p2
- Fix: cleanup was sending signals to process groups that were never created (Bun.spawn has no pgroup option). Now uses proc.kill() directly. - Fix: remove bash shell wrapper; use Bun.file() for stdin, eliminating shell injection surface and the shellEscape method entirely. - Consolidate runningPids + processGroups + subprocesses into a single subprocesses Map (Bun.Subprocess provides .pid, .kill(), .exitCode). - Extract banner art into const arrays, render with a loop. - Remove unnecessary async from checkRunningTasks (no awaits). - Add missing break statements in switch/case after process.exit calls. - Tests: use new RalphLoop() instead of Object.create, add withDir helper, remove unused imports. 34 tests pass. https://claude.ai/code/session_017U4Gj5uNfcEJk3uLYeM9p2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port the Ruby ralph-loop.rb parallel Claude runner to TypeScript,
targeting the Bun runtime for native TS execution without a build step.
https://claude.ai/code/session_017U4Gj5uNfcEJk3uLYeM9p2