Desktop loop dispatch: electron harness - #16
Conversation
- Create symphony-loop.ts with full loop handler (PLAN/EXECUTE/REQUEST_CHANGES/DECOMPOSE) - Worktree management: create for PLAN, reuse parent for EXECUTE/REQUEST_CHANGES - Per-command artifact writing and output reading - Git operations for EXECUTE (stage, commit, push, PR creation with retry handling) - Process spawning with close/error event handlers and dedup guards - SSRF-hardened apiBaseUrl validation (IPv4, IPv6, IPv4-mapped IPv6, loopback) - Sentinel pattern for atomic loopId conflict detection - Kill handler with sentinel-aware PID guard - Pre-flight binary checks for both run-loop.sh and claude CLI - Register routes in router.ts, add symphony_loop + symphony_loop_kill operation IDs Testing: pnpm typecheck passes, manual review of all error paths Risks: New electron routes, process lifecycle management
Code Review SummaryStatus: Changes Requested Reviewers: Bug Hunter A, Bug Hunter B, Unified Auditor, Premise Reviewer, Gateway Core Architect Findings
BLOCKING Issues (must fix)
HIGH Issues (should fix)
MEDIUM Issues (consider)
Validation Stats
Recommendation: Address blocking and high issues before merging. The sandbox escape (P0) and auth token leakage (P1) are the critical items. |
…fix, DRY, IPv6 ULA/link-local
Summary
symphony-loop.ts— full electron-side loop handler for all 4 commands (PLAN, EXECUTE, REQUEST_CHANGES, DECOMPOSE)close/errorevent handlers andonceCompletededup guardvalidateApiBaseUrlcovering IPv4, IPv6, IPv4-mapped IPv6, loopback, and all RFC-1918 rangesrunningLoops.set(loopId, -1)) for atomic conflict detection with try/finally cleanuprun-loop.shandclaudeCLIrouter.ts, addsymphony_loop+symphony_loop_killoperation IDs inapp.tsCompanion PR: closedloop-ai/symphony-alpha (API + frontend — same branch name)
Test plan
pnpm typecheckpasses (verified locally)run-loop.sh, outputs uploaded to APIrun-loop.sh, commits + pushes + creates PR, uploads resultsclaude -pvia stdin, uploads features.json🤖 Generated with Claude Code