ARDR: P0 Sento dispatcher/router total concurrency accounting #196

Open
opened 2026-09-02 17:26:15 +00:00 by nsaspy · 0 comments
Owner

Scope

Bounded ARDR research transaction seeded by lost-rob0t/starintel-server#35, revised after operator direction to go deeper into Sento itself rather than inventing a new StarIntel workload-routing layer.

Corrected problem

Keep Sento's current router, dispatcher, and mailbox logic. Add one aggregate concurrency count at the exact backend where Sento realizes actor execution threads.

StarIntel currently pins mdbergmann/cl-gserver at:

6a510c5b58469e72e6363bd3a6059d80b9a5c320

Exact source review establishes:

  • a shared dispatcher with N workers creates N dispatcher-worker actors;
  • every dispatcher worker is internally :pinned and owns one message-box/bt thread;
  • an ordinary :pinned actor also owns exactly one message-box/bt thread;
  • an actor using message-box/dp owns no thread and reuses its selected dispatcher workers;
  • a router owns no execution thread and merely selects/forwards to routees;
  • each named dispatcher retains its own local :workers count, but current Sento has no aggregate ceiling across all of them plus ordinary pinned actors.

Therefore the missing invariant is not a new router model. It is:

sum(all live Sento execution-lane ownership) <= Sento grant from the StarIntel process thread planner

Preserve existing semantics

Do not change in this P0:

  • named shared dispatchers;
  • local :workers settings;
  • dynamic dispatcher registration;
  • :random routing;
  • :round-robin routing;
  • custom count-to-index strategies;
  • message-box/dp semantics;
  • message-box/bt / :pinned semantics;
  • existing router/dispatcher tests.

Accounting

  • shared-dispatcher worker: 1 lane
  • N-worker shared dispatcher: N lanes
  • ordinary :pinned actor: 1 lane
  • ordinary dispatcher-backed actor: 0 additional lanes
  • router: 0 lanes
  • adding an existing actor as routee: 0 additional lanes

Dispatcher workers are internally pinned, so they must be charged exactly once through the dispatcher's reservation rather than once for the dispatcher and again as generic pinned actors.

Dependencies

  • server #34 / Auto-Research #176/#177: process-wide thread-budget authority and numeric Sento grant
  • server #37 / Auto-Research #182/#183: termination/lifecycle ownership where needed
  • server #36: later consumer of read-only total/used/free pressure; #36 still owns queue/admission/overload policy

Canonical Org

  • roam/research/ardr-issues/ARDR-ISSUE-188-workload-dispatchers-router-pools.org
  • roam/design/star-server/STAR-SERVER-042-workload-dispatchers-router-pools.org

Stable Org IDs were preserved; the content now supersedes the earlier workload-topology-first interpretation.

Approval boundary

Research is READY_FOR_DESIGN and the revised design may be produced/reviewed automatically. Implementation authorization remains PENDING / operator-only. This issue, its state, publication, or machine review cannot authorize implementation.

## Scope Bounded ARDR research transaction seeded by `lost-rob0t/starintel-server#35`, revised after operator direction to go deeper into Sento itself rather than inventing a new StarIntel workload-routing layer. ## Corrected problem Keep Sento's current router, dispatcher, and mailbox logic. Add one aggregate concurrency count at the exact backend where Sento realizes actor execution threads. StarIntel currently pins `mdbergmann/cl-gserver` at: `6a510c5b58469e72e6363bd3a6059d80b9a5c320` Exact source review establishes: - a shared dispatcher with N workers creates N dispatcher-worker actors; - every dispatcher worker is internally `:pinned` and owns one `message-box/bt` thread; - an ordinary `:pinned` actor also owns exactly one `message-box/bt` thread; - an actor using `message-box/dp` owns no thread and reuses its selected dispatcher workers; - a router owns no execution thread and merely selects/forwards to routees; - each named dispatcher retains its own local `:workers` count, but current Sento has no aggregate ceiling across all of them plus ordinary pinned actors. Therefore the missing invariant is not a new router model. It is: `sum(all live Sento execution-lane ownership) <= Sento grant from the StarIntel process thread planner` ## Preserve existing semantics Do not change in this P0: - named shared dispatchers; - local `:workers` settings; - dynamic dispatcher registration; - `:random` routing; - `:round-robin` routing; - custom count-to-index strategies; - `message-box/dp` semantics; - `message-box/bt` / `:pinned` semantics; - existing router/dispatcher tests. ## Accounting - shared-dispatcher worker: **1 lane** - N-worker shared dispatcher: **N lanes** - ordinary `:pinned` actor: **1 lane** - ordinary dispatcher-backed actor: **0 additional lanes** - router: **0 lanes** - adding an existing actor as routee: **0 additional lanes** Dispatcher workers are internally pinned, so they must be charged exactly once through the dispatcher's reservation rather than once for the dispatcher and again as generic pinned actors. ## Dependencies - server #34 / Auto-Research #176/#177: process-wide thread-budget authority and numeric Sento grant - server #37 / Auto-Research #182/#183: termination/lifecycle ownership where needed - server #36: later consumer of read-only total/used/free pressure; #36 still owns queue/admission/overload policy ## Canonical Org - `roam/research/ardr-issues/ARDR-ISSUE-188-workload-dispatchers-router-pools.org` - `roam/design/star-server/STAR-SERVER-042-workload-dispatchers-router-pools.org` Stable Org IDs were preserved; the content now supersedes the earlier workload-topology-first interpretation. ## Approval boundary Research is `READY_FOR_DESIGN` and the revised design may be produced/reviewed automatically. **Implementation authorization remains PENDING / operator-only.** This issue, its state, publication, or machine review cannot authorize implementation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/starintel-auto-research#196
No description provided.