From 900bdeaf79934dbdf8c8e2e10598cbd2c6a64201 Mon Sep 17 00:00:00 2001 From: User Date: Wed, 15 Oct 2025 19:32:41 -0400 Subject: [PATCH 1/5] Implement error handling and structured logging - Add structured logging with zap library (internal/utils/logger.go) - Support for Debug, Info, Warn, Error, Fatal log levels - JSON format for file logs, console format for stdout - Logs written to .onx/logs/onx.log - Configurable log levels and output modes - Create comprehensive error types (internal/errors/errors.go) - OnyxError struct with Code, Message, Cause, and Hint fields - Error codes for all major error categories - Helper constructors for common errors - Recovery hints for better user experience - Add panic recovery mechanisms to daemon (internal/daemon/daemon.go) - Wrap main event loop with panic recovery - Graceful degradation on partial failures - Detailed error logging with stack traces - Recovery wrapper for snapshot creation - Replace standard log package with structured logging This implements items 44-46 from the checklist. -- 2.49.0 From 3ee6d63c61219850fe7d506bb2d395530416dd48 Mon Sep 17 00:00:00 2001 From: User Date: Wed, 15 Oct 2025 19:36:36 -0400 Subject: [PATCH 2/5] Fix hardcoded 'main' branch - detect default branch dynamically - Add getDefaultBranchName() method to WorkstreamManager - Detects repo default by checking HEAD symbolic ref and fallback - Update CreateWorkstream to use dynamic default branch detection - Update 'onx new' CLI flag default to empty string - Manager now determines correct default branch automatically Fixes bug where 'onx new feature' always used 'main' even when repo uses 'master' as the default branch. Now workstreams correctly detect and use the repository's actual default branch. -- 2.49.0 From d8923e903e567e1f67a46ab9906170a17a0b15a9 Mon Sep 17 00:00:00 2001 From: User Date: Wed, 15 Oct 2025 20:45:35 -0400 Subject: [PATCH 3/5] Fix error-handling-logging workstream base branch to master Manually corrected the base_branch in .onx/workstreams.json from 'main' to 'master' to match the repository's actual default branch. This workstream was created before the dynamic branch detection fix, so it incorrectly recorded 'main' as the base branch. -- 2.49.0 From db7073d21cb7e0b920600cb3361621cad5c110f7 Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Wed, 15 Oct 2025 20:53:24 -0400 Subject: [PATCH 4/5] Use git config for commit author instead of hardcoded 'User' - Update CreateCommit to accept separate authorName and authorEmail - Add GetGitConfig method to read user.name and user.email from config - GetGitConfig checks local repo config first, then global config - Update save.go to read author from git config before creating commits - Update workstream_manager.go to extract author from git commit - Update daemon/snapshot.go to use proper email for daemon commits - Update git/rebase.go to preserve author email during rebases Fixes issue where commits showed 'User ' instead of actual git user.name and user.email from config. -- 2.49.0 From e5ace49fb7ed11749fe081e8e5108b9bcd9dc6c6 Mon Sep 17 00:00:00 2001 From: Tanishq Dubey Date: Thu, 16 Oct 2025 07:21:05 -0400 Subject: [PATCH 5/5] daemon done -- 2.49.0