go/pkg/cli
Snider a24c1cd264
Implement panic recovery and graceful service retrieval (#316)
* Implement panic recovery and graceful error handling for services

- Added panic recovery to CLI entry point (`Main`) with logging and stack traces.
- Refactored `MustServiceFor`, `Config()`, and `Display()` to return errors instead of panicking.
- Updated `CLAUDE.md` to reflect the service retrieval API change.
- Made `signalService.OnShutdown` idempotent to prevent panics during redundant shutdowns.
- Updated all relevant tests and call sites.

* Implement panic recovery and graceful error handling for services (with formatting fix)

- Added panic recovery to CLI entry point (`Main`) with logging and stack traces.
- Refactored `MustServiceFor`, `Config()`, and `Display()` to return errors instead of panicking.
- Updated `CLAUDE.md` to reflect the service retrieval API change.
- Made `signalService.OnShutdown` idempotent to prevent panics during redundant shutdowns.
- Fixed formatting issues in `pkg/cli/runtime.go`.
- Updated all relevant tests and call sites.

* Implement panic recovery and graceful error handling for services (with CI fixes)

- Added panic recovery to CLI entry point (`Main`) with logging and stack traces.
- Refactored `MustServiceFor`, `Config()`, and `Display()` to return errors instead of panicking.
- Updated `CLAUDE.md` to reflect the service retrieval API change.
- Made `signalService.OnShutdown` idempotent to prevent panics during redundant shutdowns.
- Fixed `auto-merge.yml` workflow by inlining logic and adding the `--repo` flag to the `gh` command.
- Applied formatting to `pkg/io/local/client.go`.
- Updated all relevant tests and call sites.

* Implement panic recovery and graceful error handling (final fix)

- Added panic recovery to CLI entry point (`Main`) with logging and stack traces.
- Refactored `MustServiceFor`, `Config()`, and `Display()` to return errors instead of panicking.
- Updated `CLAUDE.md` to reflect the service retrieval API change.
- Made `signalService.OnShutdown` idempotent to prevent panics during redundant shutdowns.
- Reverted unrelated changes to `auto-merge.yml`.
- Fixed formatting issues in `pkg/io/local/client.go`.
- Verified all call sites and tests.

* fix: address code review comments

- Add deprecation notices to MustServiceFor functions in core and framework
  packages to clarify they no longer panic per Go naming conventions
- Update process/types.go example to show proper error handling instead
  of discarding errors with blank identifier
- Add comprehensive test coverage for panic recovery mechanism in app.go

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <developers@lethean.io>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 07:52:23 +00:00
..
ansi.go feat(cli): add NO_COLOR environment variable support (#98) 2026-02-01 16:40:03 +00:00
ansi_test.go feat(cli): add NO_COLOR environment variable support (#98) 2026-02-01 16:40:03 +00:00
app.go Implement panic recovery and graceful service retrieval (#316) 2026-02-05 07:52:23 +00:00
app_test.go Implement panic recovery and graceful service retrieval (#316) 2026-02-05 07:52:23 +00:00
check.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
check_test.go fix(docs): respect workspace.yaml packages_dir setting (fixes #46) (#55) 2026-02-01 01:59:27 +00:00
command.go feat(plugin): add Claude Code plugin for host-uk framework 2026-01-31 10:27:04 +00:00
commands.go refactor(cli): move commands from cmd/ to pkg/ with self-registration 2026-01-30 21:55:55 +00:00
daemon.go Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
daemon_test.go Migrate pkg/repos to Medium abstraction (#291) 2026-02-04 18:03:54 +00:00
errors.go Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
glyph.go feat(cli): add NO_COLOR environment variable support (#98) 2026-02-01 16:40:03 +00:00
glyph_maps.go feat(cli): add glyph system 2026-01-31 23:54:01 +00:00
glyph_test.go refactor: migrate all pkg/* to cli abstraction 2026-01-31 23:54:01 +00:00
i18n.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
layout.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
layout_test.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
log.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
output.go Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
output_test.go Standardize CLI Error Handling (#318) 2026-02-05 06:55:49 +00:00
prompt.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
render.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
runtime.go Implement panic recovery and graceful service retrieval (#316) 2026-02-05 07:52:23 +00:00
strings.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
styles.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00
utils.go feat: git command, build improvements, and go fmt git-aware (#74) 2026-02-01 10:48:44 +00:00