Skip to content

Fix actor startup and registration identity - #77

Merged
cevr merged 1 commit into
mainfrom
fix/actor-lifecycle-identity
Sep 6, 2026
Merged

Fix actor startup and registration identity#77
cevr merged 1 commit into
mainfrom
fix/actor-lifecycle-identity

Conversation

@cevr

@cevr cevr commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Calling actor.start again could rerun recovery and replace a terminal lifecycle with Starting. Closing an earlier actor scope could also remove a replacement actor that reused its ID.

Share one startup result per actor. Check the registered actor identity before scope cleanup removes an ID. A patch changeset records both fixes.

  1. Startup ownership:
 actor.start
-  recovery → inspection → supervisor → runtime.start (every call)
+  shared startup result
+    first call: terminal guard → recovery → inspection → supervisor → runtime.start
+    later calls: await or return the stored result
  1. Registry cleanup:
 old owner scope closes
-  ID exists → remove ID
+  ID still belongs to old actor → remove ID
   stop old actor

Validation: both regressions failed before the fix. Full gate passes type checks, lint, formatting, build, examples, and 370 tests with 794 assertions. Tests cover concurrent recovery, repeated start, stop before start, final exit, replacement actor identity, replacement during a stop listener, and retained startup interruption. Counsel round one found no blocker. Its cleanup ordering and documentation suggestions are included.

@cevr
cevr merged commit a92ff6a into main Sep 6, 2026
1 check passed
@github-actions github-actions Bot mentioned this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant