Repository navigation
feat(actor): report contained lifecycle failures to spawn-time error reporters - #90
Merged
Merged
Conversation
…reporters Actor generations close with a Defect exit that awaitExit returns as a value, so no Effect boundary reported those failures. Inspection only logged the pretty cause. - Report each generation's combined defect cause once at closeGeneration, before the exit is published, with the reporters captured at allocation. - Pin CurrentErrorReporters in the actor service context so restarted generations and later start/stop callers keep the spawn-time reporters. - Report final output defects at terminal completion and restart-step failures in the supervisor. Leave re-raised stop and child failures to their owners. - Annotate reports with actor id, generation and defect phase, skip pure interruption, and isolate reporter defects from lifecycle settlement.
…reporters The changeset states that cluster entity runtimes report generation defects through the reporters in their allocation context. Cover that claim with an entity whose background effect dies under EntityMachine.layer.
… a generation A cold-start lifecycle.recovery.resolve defect left a Defect exit with no report, in start and when stop interrupted the start. Report it with phase "recovery" through Effect.onError, so a stop that interrupts the start cannot skip the report. The restart-step hook moves to Effect.onError for the same reason. A restart schedule that died was read as exhaustion. Tell a halted pull apart from a schedule defect and report the defect with phase "restart". Add raw-recorder tests for pure interruption from a handler and from a restart recovery; the old negative test covered only routine stops.
…pinned handler reporters Name the cold-start recovery report and the schedule-defect report. State that a caller boundary can report a failure again unless the reporter is built with ErrorReporter.make and the defect is an object. State that handler code runs with the spawn-time reporters. Note reporter dispatch order and that entity reports name one allocation.
… settle with exhaustion Wrap the cold-start recovery resolver in Effect.suspend so a synchronous throw becomes a reported defect. Classify a failed restart schedule with Pull.filterDone so a defect that settles together with exhaustion still reports. Document that a parent handler which re-raises a child failure reports it again as its own defect.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Report contained actor failures to the Effect
ErrorReporters that are registered where the actor is spawned.What changes
restart. This covers a restart recovery that dies, a restart schedule that dies, and a schedule defect that settles together with exhaustion. An exhausted schedule alone does not report.recovery. This covers a resolver that throws and a stop that interrupts the start.startorstopcaller cannot replace them.docs/persistence-and-supervision.mddescribe where a report can repeat at a caller boundary or in a parent handler, and howErrorReporter.makededup applies.Validation
typecheck,lint,fmt:check,test(425 pass),buildandexamples:gatepass. Lefthook passes on every commit.onErrorplacement.Pull.filterDoneschedule classification, and for the parent re-raise docs.Changeset: minor (0.29.0). No exported type changes.