[P0-26] Enforce one total process thread budget across actors, consumers, tasks, HTTP, timers, and transports #34
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/starintel-server#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Governance / ARDR state
lost-rob0t/starintel-auto-research#176—READY_FOR_DESIGNlost-rob0t/starintel-auto-research#177—DESIGN_READY_FOR_OPERATOR_REVIEWThis issue must not enter the executable RAGE queue until the operator explicitly approves implementation.
Confirmed defect
*ingest-workers*is independently reused for several subsystems instead of enforcing a total limit::pinned*ingest-workers*OS threadsThis allows configuration to multiply threads rather than cap them.
The custom dispatcher named
:pinnedis especially broken: Sento treats dispatcher id:pinnedas the built-in one-thread-per-actor mailbox before looking up custom dispatchers. The configured custom:pinnedworker pool is therefore unused overhead, while comments incorrectly claim agent thread affinity.Design decision
Introduce one runtime-owned thread-budget authority. Every thread-producing StarIntel component registers min/desired/max demand before long-lived startup. A pure deterministic planner computes grants under the canonical process-wide Common Lisp limits, reserves control capacity, and rejects unsatisfiable configurations before network/listener/actor side effects.
The process-wide authority is:
These specials are the runtime authority. Do not introduce a nested
(:runtime ...)thread-budget object. If init/config later exposes overrides, it initializes/sets these symbols rather than becoming a competing source of truth.Workload-specific dispatchers remain separate; they consume grants from this authority rather than becoming a single giant executor.
No new StarLang syntax is required. StarLang-defined actors/domain servers cannot create or expand host thread authority. Common Lisp runtime/component code owns planning, executor construction, accounting and enforcement.
Proposed implementation slices
All remain AWAITING_OPERATOR_IMPLEMENTATION_APPROVAL.
:pinnedcollision.Mandatory RED-first gate
No production mutation before a valid failing fixture exists.
First RED
Add a pure deterministic fixture where:
*max-process-threads* = 8;unsatisfiable-budgetbefore any thread/network side effect.Untouched current code must fail because no central planner exists.
Also add a regression fixture proving one
ingest-workers = 4value consumed independently by three current subsystems produces a total demand greater than the intended ceiling rather than being treated as three unrelated valid4-worker settings.Negative fixtures must reject:
Required changes
*max-process-threads*and*reserved-control-threads*specials plus a pure startup thread-budget calculator.*max-process-threads*; optionally warn only in explicit development mode where the design allows it.:pinneddispatcher.*reserved-control-threads*unavailable to data-plane desired allocations.Acceptance tests
Implementation approval
PENDING / AWAITING_OPERATOR_IMPLEMENTATION_APPROVALARDR/ADARD cannot change this state. Explicit operator approval is required before RAGE implementation.