[P1-02] Define explicit public library API on the existing runtime owner with typed ports #137
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#137
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?
ARDR reconciliation — 2026-08-29
Canonical research/design now exist for this issue:
lost-rob0t/starintel-auto-research/roam/research/star-server/STAR-RESEARCH-040-explicit-library-api-runtime-ports.org—READY_FOR_DESIGN.lost-rob0t/starintel-auto-research/roam/design/star-server/STAR-SERVER-047-explicit-library-api-runtime-ports.org—DESIGN_READY_FOR_OPERATOR_REVIEW.Current source reality
Current
masteralready hasstar.runtime:star-runtime,*runtime*,start-runtime,stop-runtime, readiness/liveness, and concrete resource accessors. Do not create a second runtime/lifecycle object.The actual remaining gap is that application operations still depend heavily on ambient globals/concrete adapters (
*runtime*, actor globals such as*sys*, producer/target globals, HTTP state, concrete persistence/store hooks). A caller holding a runtime is not yet sufficient to invoke a stable application contract independently of ambient process state.Current auth code also already exports
star.auth:service-call-contextwith principal/scopes/credential/correlation/deadline semantics. Reuse it; do not invent a duplicate request-context type.Design decision
Evolve the existing
star-runtimeinto the explicit public composition/application owner.Public application operations take:
service-call-context;Results are typed and transport-neutral. HTTP/CLI/Rabbit/embedded callers project the same application result rather than owning separate persistence/auth/lease policy.
*runtime*may remain temporarily as a compatibility default used by outer wrappers only. An explicit operation must behave identically regardless of the ambient*runtime*binding.Port boundary
Define protocols only for real current dependencies required by migrated operations, such as:
No port/public result exposes raw CouchDB connections, Rabbit channels, Sento actors/routers, Clack handles, sockets, pools, or thread objects.
Concrete adapter extraction remains #41; this issue owns the contracts they implement.
Dependency order
STAR-SERVER-046first establishes the side-effect-freestarintel-server/coreboundary.Proposed implementation slices — ALL PENDING OPERATOR APPROVAL
Slice 1 — explicit fake-backed runtime/service contract
Depends on #39 Slice 1.
Create the minimum public runtime constructor/protocol + port bundle for one pure operation. Reuse
service-call-context. No network/thread/concrete adapter creation.Mandatory RED-first target:
star.runtime:*runtime*to B or NIL and prove A's explicit call result is unchanged.Untouched
mastermust fail because no documented public constructor/application-operation contract provides this behavior.Slice 2 — typed result/call semantics
For that operation prove authorization, absolute deadline, and idempotency semantics at the application boundary. Denial/expired deadline must invoke zero authoritative mutation ports.
Slice 3 — first real vertical application operation
Migrate the smallest current operation whose dependency contract can live below concrete adapters. Do not broaden this into all server APIs.
Slice 4 — HTTP/embedded equivalence
Route one HTTP endpoint through the same application operation. Embedded and HTTP fixtures must produce the same typed application outcome before HTTP serialization.
Slice 5 — compatibility-default demotion
Old wrapper may resolve
*runtime*at its outer boundary and delegate. The explicit implementation cannot read ambient runtime/actor/persistence globals.Slice 6 — expand vertically
Migrate document/search/target/lease/inspection operations one at a time; coordinate concrete adapter moves with #41.
Slice 7 — concrete multi-runtime proof
Only after actor/HTTP/resource globals become instance-owned. This is not a Slice-1 acceptance criterion.
Acceptance criteria
star.runtimelifecycle authority;service-call-context+ typed request for public operations;*runtime*;Implementation authorization
PENDING / AWAITING_OPERATOR_IMPLEMENTATION_APPROVALP1 priority, READY_FOR_DESIGN, completed design/adversarial review, issue state, publication, or machine output do not authorize RAGE implementation.