Skip to content

Commit c3e8770

Browse files
slitclaude
andcommitted
docs(runtime): document error handling pattern
Add package-level documentation explaining the graceful degradation approach used for error handling in the runtime package. Closes: gt-7xxdr Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9b2a1c4 commit c3e8770

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

internal/runtime/runtime.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
// Package runtime provides helpers for runtime-specific integration.
2+
//
3+
// Error Handling Pattern:
4+
// This package uses a "graceful degradation" approach to errors:
5+
// - Configuration errors (nil config, missing fields): Return early with nil,
6+
// allowing callers to proceed without the optional feature.
7+
// - Unsupported providers/features: Return nil silently, treating unknown
8+
// values as "disabled" rather than errors.
9+
// - Operational errors (e.g., tmux failures): Propagate errors to callers
10+
// for handling, failing fast on the first error.
11+
//
12+
// This pattern ensures the system remains functional even when optional
13+
// integrations are unavailable or misconfigured.
214
package runtime
315

416
import (

0 commit comments

Comments
 (0)