You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce the foundation slice (P0-1, P0-2, P0-6) of the error handling
overhaul described in error_handling_design.md.
- Add `ColouredFlow.Runner.Errors` facade for centralised error
classification: `tier/1`, `error_code/1`, `lifecycle?/1`, and
`to_persisted_reason/1`.
- Add a stable `error_code` field to existing public exceptions
(`NonLiveWorkitem`, `InvalidWorkitemTransition`, `UnboundActionOutput`,
`UnsufficientTokensToConsume`, `ColourSetMismatch`, `InvalidResult`).
- Add four new public exceptions for the caller-facing error surface:
`EnactmentNotRunning`, `EnactmentTimeout`, `EnactmentCallFailed`,
`StoragePersistenceFailed`.
- Add caller-safe wrapper `WorkitemTransition.call_enactment/3` that
normalises the full `GenServer.call/3` `:exit` surface (`:noproc`,
`:timeout`, `:shutdown`, `:normal`, `:nodedown`, `:killed`,
`:calling_self`, catch-all) into typed exceptions returned via
`{:error, exception}`.
- Update `Enactment.Supervisor.terminate_enactment/2` to use the same
wrapper; return type changes from `:ok` to `:ok | {:error, Exception.t()}`.
- Add `Registry.whereis/1` helper for explicit pid lookup.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments