Changelog
[Unreleased]
Section titled “[Unreleased]”[0.10.0] — 2026-07-26
Section titled “[0.10.0] — 2026-07-26”Adds the Orchestration family — the 6th behavioral family — for internal
coordination failures: the program’s own logic failed to complete an operation.
Not retryable; no user-facing fix (report the bug).
OrchestrationFamily — 6th behavioral family. Severity 5, exit code 70 (EX_SOFTWARE), HTTP 500. Sits between Infrastructure (4) and Corruption (6) in the severity order.NewOrchestration/WrapOrchestration/WrapOrchestrationf— family-specific constructors.- Bridge reference implementation (
examples/cmd/bridge/+examples/checkout/) — canonical classify->enrich->handle flow with 19 tests.
Changed
Section titled “Changed”Corruptionseverity 5 -> 6 — bumped to preserve total order after inserting Orchestration at 5. Relative ordering of original families unchanged.IsValid()boundary now spans six constants (Rejection..Orchestration).- Removed 52 phantom
//nolint:hierarchical-errorsdirectives across 13 files — linter was never installed.
examples/go.modphantom replace directive — replacedbridge v0.0.0-...+ localreplacewith realbridge v0.3.2. Same class of bug as the v0.6.0 hotfix.
Modules
Section titled “Modules”go-error-family-> v0.10.0,diagnose-> v0.2.2,agent-> v0.2.2,bridge-> v0.3.2,diagnose/git-> v0.5.2,diagnose/postgres-> v0.5.2,examples-> v0.3.0
[0.9.0] — 2026-07-24
Section titled “[0.9.0] — 2026-07-24”Structured-logging hook for HandleError* and an HTTP error-path fix. The
root package remains zero-dependency.
HandleConfig.Logger *slog.Logger— optional structured-logging hook. When set,HandleErrorWithContextemits a singleslogrecord (family, code, retryable, exit_code,context.*keys) alongside the CLI output, classifying once and logging once. Nil (default) preserves the original behavior.errorfamilytest.AssertHTTPStatus(tb, err, want)— test assertion for HTTP status codes (checksHTTPStatuseroverride first, then family default).
Changed
Section titled “Changed”writeHTTPErrorrespects per-errorHTTPStatuseroverrides — fixes a bug whereWithHTTPStatusoverrides were silently dropped on the HTTP error path. Status is now computed once from the classified family, then checked for a per-error override.LogError/LogErrorContextnow emitexit_code— every structured log record includes the resolved BSD exit code.
[0.8.0] — 2026-07-23
Section titled “[0.8.0] — 2026-07-23”BuildFlow-inspired error handling additions. All new APIs use only the Go standard library — the root package remains zero-dependency.
HTTPStatuserinterface — sixth consumer interface. Errors implementingHTTPStatus() intoverride the family-based HTTP status per-error. Mirrors theExitCoderpattern.Error.WithHTTPStatus(status int) *Error— copy-on-write mutator (0 = use family default). Example:NewRejection("battle.not_found", "...").WithHTTPStatus(404)returns 404 instead of family default 400.RegisterClassificationType[T error](family Family)— generic type-based classifier sugar. One-liner for the common “type T → Family F” case.RegisterClassificationTypeFor[T error](r *Registry, family Family)— variant targeting a customRegistry.ExitCoderinterface — fifth consumer interface. Errors implementingExitCode() intoverride the family-based exit code per-error.Error.WithExitCode(code int) *Error— copy-on-write mutator (0 = use family default).Error.WithContextAny(key string, value any) *Error— type-safe context attachment for non-string values.WrapOnce/WrapOncef— idempotent wrap. Returns the existing*Errorunchanged if the chain already contains one.errorfamilytest.AssertExitCodeanderrorfamilytest.AssertHTTPStatus— test assertions for exit codes and HTTP status codes.safeCauseString— panic-recovery guard aroundcause.Error().- Fuzz tests:
FuzzWrapOnce,FuzzContextValueToString,FuzzWithExitCode,FuzzWithHTTPStatus,FuzzRegisterClassificationType. - Benchmarks:
BenchmarkWithExitCode,BenchmarkExitCodeOverride,BenchmarkWithHTTPStatus,BenchmarkHTTPStatusOverride. - Examples:
ExampleError_WithHTTPStatus,ExampleHTTPStatus,ExampleRegisterClassificationType.
Changed
Section titled “Changed”- Root module reverted from
encoding/json/v2toencoding/json— theGOEXPERIMENT=jsonv2requirement (introduced in v0.7.0) has been removed. JSON output is byte-identical; only 2 call sites were affected. HTTPStatus(err)checksHTTPStatuserfirst — a per-error override wins over the family default.writeHTTPErrorno longer double-classifies — theClassifyresult is reused for both the response body and the status code.ExitCode(err)checksExitCoderfirst — a non-zero custom exit code wins over the family default.Error.Error()/Summary()/formatVerbose()usesafeCauseStringfor cause rendering.
[0.7.0] — 2026-07-09
Section titled “[0.7.0] — 2026-07-09”Changed (BREAKING)
Section titled “Changed (BREAKING)”- Migrated root module to
encoding/json/v2— requiredGOEXPERIMENT=jsonv2on Go 1.26. Reverted in v0.8.0.
[0.6.1] — 2026-07-05
Section titled “[0.6.1] — 2026-07-05”- Removed local
replacedirectives and phantomrequirefrom publishedgo.modfiles. Root module is now genuinely zero-dependency. - Examples extracted to separate module —
examples/has its owngo.mod(requires root + diagnose). This keeps the root module truly zero-dependency.
[0.6.0] — 2026-07-05
Section titled “[0.6.0] — 2026-07-05”RegisterClassifier/RegisterClassifiers— predicate-based classification for dynamic third-party errors (*sqlite.Error). Stored lock-free behindatomic.Pointer[[]Classifier], copy-on-write.Code(err) string— public code extraction wrappingerrors.AsType[Coded].TemplateForCode(code)— registry-then-builtin template lookup for HTTP/gRPC boundaries.Wrap{Family}fvariants —WrapRejectionf,WrapConflictf,WrapTransientf,WrapCorruptionf,WrapInfrastructuref. Nil-safe.HTTPStatus(err)/HTTPHandler(fn)— net/http middleware writing safe JSON responses. Never leakserr.Error().LogError(err, logger)/LogErrorContext— structuredlog/sloglogging with family/code/retryable/context fields.errorfamilytestsubpackage —AssertFamily,AssertCode,AssertRetryable,AssertContext,AssertContextMissing.- Classification pipeline now 6 steps — classifiers added as step 5.
[0.5.0] — 2026-06-22
Section titled “[0.5.0] — 2026-06-22”Registrytype withClone()for inherit-and-extend, test isolation, and scoped error handling.Family.Severity()— total order for multi-error classification.Family.HTTPStatus()— canonical family to HTTP status mapping.Family.RetryPolicy()— advisory retry defaults (Transient: 3 attempts, 100ms-5s).Error.JSON()— canonical JSON view for API boundaries.RegisterStdlibDefaults(reg)— pre-registered classifications for common stdlib errors.
Changed
Section titled “Changed”- Copy-on-write errors —
WithContext/WithCause/WithTimestampreturn a NEW*Error. {key}template syntax — replaced{{.key}}to avoid collision with Go’stext/template.- Severity-ordered multi-error classification — worst family wins, deterministic regardless of argument order.
- Lock-free sentinel lookup —
atomic.Pointer[sentinelMap], ~5x faster, zero allocations.
[0.4.0] — 2026-06-17
Section titled “[0.4.0] — 2026-06-17”TextMarshaler/TextUnmarshalerforFamily/Audience— enables YAML/JSON config integration.ParseAudience/ParseStatus— case-insensitive string parsing for all enums.Family.Audience()— User / Ops / All for presentation-layer decisions.- Integration tests.
Changed
Section titled “Changed”HandleConfig.Diagnosebool removed — diagnostics run wheneverDiagnosticFuncis set.agent.Config.Enabledreturns error — callingAnalyzeon a disabled agent is a programming error.
[0.3.0] — 2026-06-01
Section titled “[0.3.0] — 2026-06-01”HandleErrorWithContext— context-propagating handler (canonical entry point).HandleErrorDetailedWithConfig— configurable structured result.CommandRunnerinterface — mock injection for testable diagnostic rules.ContextKeytyped strings — replaces raw strings in rule specs.WithTimestamp— copy-on-write timestamp setter.
[0.2.0] — 2026-05-26
Section titled “[0.2.0] — 2026-05-26”Changed
Section titled “Changed”- Modularized diagnostic rules — git moved to
diagnose/git, postgres todiagnose/postgres.
- Fuzz tests and benchmarks.
[0.1.1] — 2026-05-16
Section titled “[0.1.1] — 2026-05-16”Changed
Section titled “Changed”- License changed to MIT.
- README rewritten (removed fabricated API docs).
[0.1.0] — 2026-05-10
Section titled “[0.1.0] — 2026-05-10”- Initial release.
- Family enum, interfaces, Error struct, constructors, Classify, HandleError, diagnostic rules, debug agent, templates.