Extract mailbox actor execution and Sento runtime port #27

Merged
lost-rob0t merged 28 commits from agent/actor-runtime-mailbox-extraction into main 2026-08-15 12:05:31 +00:00
lost-rob0t commented 2026-08-15 11:50:59 +00:00 (Migrated from github.com)

What changed

  • adds generation-bearing portable ActorRef ownership to star-actor-protocol
  • implements bounded FIFO mailboxes in star-mailbox
  • replaces starlang-runtime direct handler invocation with mailbox-backed spawn / tell / ask / deterministic dispatch
  • preserves transactional actor-state commit and adds stale-reference, mailbox-full, timeout, shutdown, and failure semantics
  • moves the generic cl-gserver/Sento operation port out of prototype/ into star-sento-compat
  • reduces the prototype cl-gserver facade to compatibility composition over the final port
  • preserves invoke-actor only as a compatibility wrapper over ask
  • adds an explicit actor/runtime authority migration matrix and exact next Sento extraction slice
  • expands CI to test star-mailbox and star-sento-compat independently and report aggregate prototype Lisp LOC before/after

Why

The current final runtime still synchronously called native handlers, while the prototype already proved asynchronous actor execution through queued tell and a cl-gserver facade. This slice removes that direct-call seam without creating a second actor runtime and starts reducing prototype authority under the one-authority rule.

Behavioral coverage

Final-system tests cover:

  • explicit actor spawn and registration
  • STAR URI resolution
  • generation-bearing actor references and stale-ref rejection
  • bounded FIFO tell with no synchronous handler execution
  • mailbox-full and stopped delivery results
  • ask/reply through the normal mailbox path
  • deterministic ask timeout and non-reentrant actor state ownership
  • two actors exchanging request/reply messages
  • transactional state commit
  • handler failure rollback
  • output-contract failure rollback
  • restart generation with explicit state preservation and queued-work discard
  • runtime shutdown
  • external actors still requiring a transport dispatcher

Existing prototype tests remain authoritative for wire command/reply/error/cancel, transport dispatch, runtime directory, remote registration/dispatch, journal/replay/idempotency, lease/fencing, and the BBP two-process Sento smoke.

One-authority changes

prototype/cl-gserver-runtime-facade-prototype.lisp no longer defines its own runtime-port struct or operation wrappers; those are owned by star-sento-compat. The final local runtime no longer has an independent direct handler-call execution path: invoke-actor delegates to mailbox-backed ask.

Validation

This environment cannot reach GitHub with local git, so local SBCL/Nix execution is unavailable. GitHub Actions is the execution gate for:

  • independent target-system loading
  • star-actor-protocol
  • star-mailbox
  • star-sento-compat
  • starlang-runtime
  • star-http-port / star-scrape
  • aggregate starlang-prototype
  • frozen artifacts
  • nix flake check --print-build-logs

Merge only when those checks are green.

## What changed - adds generation-bearing portable `ActorRef` ownership to `star-actor-protocol` - implements bounded FIFO mailboxes in `star-mailbox` - replaces `starlang-runtime` direct handler invocation with mailbox-backed `spawn` / `tell` / `ask` / deterministic dispatch - preserves transactional actor-state commit and adds stale-reference, mailbox-full, timeout, shutdown, and failure semantics - moves the generic cl-gserver/Sento operation port out of `prototype/` into `star-sento-compat` - reduces the prototype cl-gserver facade to compatibility composition over the final port - preserves `invoke-actor` only as a compatibility wrapper over `ask` - adds an explicit actor/runtime authority migration matrix and exact next Sento extraction slice - expands CI to test `star-mailbox` and `star-sento-compat` independently and report aggregate prototype Lisp LOC before/after ## Why The current final runtime still synchronously called native handlers, while the prototype already proved asynchronous actor execution through queued `tell` and a cl-gserver facade. This slice removes that direct-call seam without creating a second actor runtime and starts reducing prototype authority under the one-authority rule. ## Behavioral coverage Final-system tests cover: - explicit actor spawn and registration - STAR URI resolution - generation-bearing actor references and stale-ref rejection - bounded FIFO tell with no synchronous handler execution - mailbox-full and stopped delivery results - ask/reply through the normal mailbox path - deterministic ask timeout and non-reentrant actor state ownership - two actors exchanging request/reply messages - transactional state commit - handler failure rollback - output-contract failure rollback - restart generation with explicit state preservation and queued-work discard - runtime shutdown - external actors still requiring a transport dispatcher Existing prototype tests remain authoritative for wire command/reply/error/cancel, transport dispatch, runtime directory, remote registration/dispatch, journal/replay/idempotency, lease/fencing, and the BBP two-process Sento smoke. ## One-authority changes `prototype/cl-gserver-runtime-facade-prototype.lisp` no longer defines its own runtime-port struct or operation wrappers; those are owned by `star-sento-compat`. The final local runtime no longer has an independent direct handler-call execution path: `invoke-actor` delegates to mailbox-backed `ask`. ## Validation This environment cannot reach GitHub with local `git`, so local SBCL/Nix execution is unavailable. GitHub Actions is the execution gate for: - independent target-system loading - `star-actor-protocol` - `star-mailbox` - `star-sento-compat` - `starlang-runtime` - `star-http-port` / `star-scrape` - aggregate `starlang-prototype` - frozen artifacts - `nix flake check --print-build-logs` Merge only when those checks are green.
Sign in to join this conversation.
No description provided.