fix(multiplexer): fix daemon startup crash from invalid claude_status JSON - #178
Conversation
… JSON The daemon was crashing with "expected value at line 1 column 1" because the SQLite migration v3 set DEFAULT 'Unknown' for claude_status, but the code tried to parse it as JSON (which requires quoted "Unknown"). Changes: - Add FromStr impl for ClaudeWorkingStatus to parse raw enum variant names - Update session row parsing to try JSON first, then fall back to FromStr - Add detailed error messages showing which field failed and actual value - Add debug logging around database and session manager initialization - Improve client error handling for empty/malformed daemon responses - Add empty output check for gh pr checks in CI poller 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @shepherdjerred's task in 1m 35s —— View job Code Review Complete
SummaryThis PR effectively fixes the daemon startup crash caused by a mismatch between the database migration's default value format and the JSON parsing expectations. The root cause analysis is correct, and the solution is sound. Architectural Fit: ✅ GoodThe fix follows good Rust patterns:
Logic & Edge Cases:
|
|
Claude finished @shepherdjerred's task in 1m 39s —— View job Code Review Complete ✓
SummaryThis PR fixes a daemon startup crash caused by a mismatch between the database migration and the deserialization code. The fix is solid and well-implemented, with one major issue that needs addressing. Critical Issue🚨 Unrelated changes in this PR - The PR includes bun-decompile changes (LICENSE, README, code modifications) that are completely unrelated to the multiplexer daemon fix described in the PR title and description. This violates good PR hygiene: Recommendation: Remove the unrelated bun-decompile changes from this PR. Either:
Multiplexer Fix AnalysisThe core multiplexer fix (commit Architectural Fit ✓The solution follows Rust idioms correctly:
Design Decisions ✓Strong points:
Minor observation:
Logic & Edge Cases ✓Handles edge cases well:
Potential edge case (very minor):
Security ✓No security concerns. The changes are defensive:
Commit Messages ✓Commit
Commit Code Quality NotesExcellent improvements:
Minor style note:
Final VerdictThe multiplexer daemon fix is excellent work - well-designed, thoroughly tested, and production-ready. However, the PR needs cleanup to remove unrelated bun-decompile changes before merging. Recommendation: Merge after removing the unrelated commit. |
… JSON (shepherdjerred#178) * fix(multiplexer): fix daemon startup crash from invalid claude_status JSON The daemon was crashing with "expected value at line 1 column 1" because the SQLite migration v3 set DEFAULT 'Unknown' for claude_status, but the code tried to parse it as JSON (which requires quoted "Unknown"). Changes: - Add FromStr impl for ClaudeWorkingStatus to parse raw enum variant names - Update session row parsing to try JSON first, then fall back to FromStr - Add detailed error messages showing which field failed and actual value - Add debug logging around database and session manager initialization - Improve client error handling for empty/malformed daemon responses - Add empty output check for gh pr checks in CI poller 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: decompiler --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Summary
DEFAULT 'Unknown'forclaude_status, but code expected JSON-encoded"Unknown"FromStrimpl forClaudeWorkingStatusto handle both formatsTest plan
cargo build)RUST_LOG=multiplexer=debug cargo run -- daemon🤖 Generated with Claude Code