Skip to content

Reimplement ralph-loop in TypeScript with Bun runtime#6

Open
frankhock wants to merge 3 commits intomainfrom
claude/ralph-loop-typescript-bun-fSPiR
Open

Reimplement ralph-loop in TypeScript with Bun runtime#6
frankhock wants to merge 3 commits intomainfrom
claude/ralph-loop-typescript-bun-fSPiR

Conversation

@frankhock
Copy link
Owner

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

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
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