Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/actor-error-reporting.md

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# effect-machine

## 0.29.0

### Minor Changes

- [#90](https://github.com/cevr/effect-machine/pull/90) [`ac08b6d`](https://github.com/cevr/effect-machine/commit/ac08b6d73a44de61bf3d8f1754f560e36bf53589) Thanks [@cevr](https://github.com/cevr)! - Report contained actor failures to the Effect `ErrorReporter`s that were registered where the actor was spawned. Each runtime generation reports its complete defect cause once when it closes, including transition, spawn, task, background, and cleanup failures. Supervised restarts report each generation. A restart step that fails before a new generation exists reports with phase `restart`. This includes a restart recovery and a restart schedule that dies; an exhausted schedule does not report. A cold-start recovery that fails before the first generation runs reports with phase `recovery`, also when a stop interrupts the start. A recovery that throws instead of returning an Effect reports the same way. A schedule defect that settles together with schedule exhaustion still reports. A final output defect reports when the actor completes. Child actors report through the reporters of the handler that spawned them. Normal stops, final states, and pure interruption do not report. Each report annotates the reporting fiber with the actor ID, generation, and defect phase. The actor keeps its spawn-time reporters, so a later `start` or `stop` caller cannot replace them. Handler code inside the actor also runs with the spawn-time reporters, so `Effect.withErrorReporting` in a handler reaches them and no longer reaches reporters that were provided only around `start`. A failure that also reaches a caller boundary, such as `Effect.withErrorReporting`, an RPC server or an HTTP handler, can report again there. A reporter built with `ErrorReporter.make` skips the second report only when the defect is an object; a primitive defect or a raw reporter reports twice. A parent handler that re-raises a child failure, such as a failed child stop or a failed `self.spawn` start, reports that cause again as the parent's defect, with the same deduplication rules. A throwing reporter does not change the actor exit. Effect calls the reporters in order, so a throwing reporter can stop the reporters after it. Cluster entity runtimes report generation defects through the reporters in their allocation context. The generation of an entity report names one allocation, so it is `0` after each reactivation. Without registered reporters, behavior does not change.

## 0.28.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effect-machine",
"version": "0.28.0",
"version": "0.29.0",
"repository": {
"type": "git",
"url": "https://github.com/cevr/effect-machine.git"
Expand Down