Files
picoclaw/pkg/events
SiYue-ZO b292defd95 fix: add panic recovery to core-path goroutines
Add defer-recover to 11 goroutines across 4 files to prevent
ungoroutine panics from crashing the entire process:

- pkg/tools/toolloop.go: parallel tool execution
- pkg/channels/manager.go: HTTP server (x2), channel registration
- pkg/events/subscription.go: concurrent dispatch, timeout handler,
  watchContext
- pkg/tools/shell.go: cmd.Wait, PTY cmd.Wait, PTY read, pipe read

Key design decisions:
- Recover handlers send fallback values to channels (shell done,
  subscription done) to prevent deadlocks when the producer panics
- PTY cmd.Wait sets session.Status='error' on panic for consistency
- toolloop sets ErrorResult on panic so the LLM gets a meaningful
  response instead of a nil result
- subscription.go uses log.Printf to match existing invokeHandler style
- Other files use project logger (ErrorCF) with stack traces

Refs: FIX-PLAN-0.3.0 #2
2026-06-15 23:06:11 +08:00
..
2026-04-26 15:36:03 +08:00
2026-04-26 15:36:03 +08:00
2026-04-26 15:36:03 +08:00
2026-04-26 15:36:03 +08:00
2026-04-26 15:36:03 +08:00