Skip to content

fix: eliminate production panics and unwraps in orchestration layer#284

Merged
laynepenney merged 5 commits intomainfrom
feat/production-readiness-phase-1
Feb 8, 2026
Merged

fix: eliminate production panics and unwraps in orchestration layer#284
laynepenney merged 5 commits intomainfrom
feat/production-readiness-phase-1

Conversation

@laynepenney
Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of Production Readiness Plan: Eliminate all production panics, unwraps, and expects in the orchestration layer.

Changes

New Error Types

  • Created comprehensive IpcError enum with 17 error variants
  • Added from_io_error() helper for IO error conversion
  • Exported via src/orchestrate/ipc/mod.rs

Fixed Production Issues

  • client.rs:347 - Message request_id handling with proper error propagation
  • commander.rs:197 - Socket path using as_os_str() for safe path handling
  • worktree.rs - 3 unwraps fixed (worktree add/remove paths)
  • griptree.rs - 4 unwraps fixed (worktree operations)
  • terminal_ui.rs - Removed unused Stylize import

Safety Improvements

  • All path conversions now use to_string_lossy() or as_os_str()
  • No more unwrap() or expect() in production orchestration code
  • Proper error propagation with context

Verification

  • All production unwraps in orchestration layer fixed
  • Path handling safe for all valid paths
  • Clean build with reduced warnings
  • Comprehensive error types implemented

Related

  • Implements Phase 1 of docs/PRODUCTION_READINESS_PLAN.md
  • Addresses production readiness assessment findings

- Consolidate IpcError from server.rs into comprehensive error.rs
- Add missing variants: WorkerNotConnected, InvalidHandshake,
  ChannelClosed, NotStarted, InvalidMessage, Serialization
- Update server.rs to import and use unified IpcError
- Add InvalidMessage variant to IpcClientError
- Update commander.rs to import IpcError directly from ipc module
- Convert all ? operators to proper error mapping with context
@laynepenney laynepenney merged commit 669af56 into main Feb 8, 2026
3 checks passed
@laynepenney laynepenney deleted the feat/production-readiness-phase-1 branch February 8, 2026 00:16
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.

1 participant