Repository navigation
docs: scripting-hosts roadmap adds application services on arisrvx - #1026
Merged
Merged
Conversation
…SGI + room-call + principals) New section 6.5 covers what a service such as cy-pca/cyprov needs from one arisrvx process: - an asyncio loop on the script thread; - serve_asgi for FastAPI/uvicorn, with lifespan and graceful shutdown; - server-published namespaces; - an authenticate hook that yields principals, and per-principal read scopes; - room-call with ctx (principal, progress, idempotency, deadline), role gates and CallError; - a relay join mode for ari and the x hosts, plus native transport security; - a ServerHarness for plain-python tests. Phases S0-S2 gain these parts, S5-S7 are new, and the application-services cut S0-S2 + S5 + S7 is called out. Risks 16-19 are new. The status line now records that P0/P1 landed in #985.
The roadmap conflicted with #1028 (what P1 shipped) and #1027 (§5.5) in four places. Both sides are kept: - status: #1028's "P1 shipped / the rest is design" lines, plus this PR's §6.5 and S5-S7 date; - §1: #1028's rows for the Python host and the P1 scripting hosts; - risks: #1028's rewrap of 15, then this PR's 16-19; - phases: this PR's S5-S7 rows, then #1028's L1/G1, which need the script_engine interface (P1b).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds §6.5, Application services, to
docs/roadmap/ARIADNE_SCRIPTING_HOSTS.md: what a service needs from onearisrvxprocess to serve a REST API to programs and live state to Ariadne clients. The first such service is cy-pca/cyprov (CyberPC Angel's VPS and colo provisioning, plan in cy-pca/cyprov#1). It uses FastAPI as the other services do, and is tightly tied to the Ariadne tools.call_soon_threadsafe. Writes to the tree are coalesced per tick under a byte budget. Async exports are awaited on the loop; slow sync exports log a warning.serve_asgi(app, ...)runs FastAPI on uvicorn on that loop. Also:--http-listen, lifespan, and graceful shutdown on SIGTERM. The samemain.pyruns under plainpython.server: publish:block declares namespaces only the server writes (arisrv relays onlyconf.*today).@host.authenticatehook turns the bearer the client presents into a principal. Token validation stays in Python, and principals key bound writes, room-call and rate limits.room-callfor applications:ctx(principal, progress, idempotency key, deadline),roles=gates,CallError→{code, message, detail}, result caps. FastAPI routes and exports are front ends over one service layer.@host.read_scopefilters each connection's deltas and snapshot by path prefix.relay:block or--relay. This is a join mode forariand thexhosts, withtoken: oidcand namespaces mirrored read-only. It also names the native TLS gap and two ways to close it (native wss:// orgrpcs://).ServerHarnessforpytestwithout arisrvx, plus one end-to-end CI test (arisrvx --python+arix test).arisrvx check, logs, the secrets rule, systemd.Other changes:
arix,ariglxon master for 3.7.11), and the §1 table says pycvc_gl.ariadne: a Python host for Ariadne documents #985 is merged.I checked cvcpkg on 2026-11-05: the Python stack exists for cp312, either noarch or with native builds. That covers fastapi 0.141.1, starlette 1.7.0, uvicorn 0.53.0, pydantic 2.13.4 / pydantic-core 2.46.4, httpx, sqlalchemy 2.0.50, aiosqlite, alembic 1.20.0, pyjwt, cryptography 48.0.0 and websockets.
Docs only; no code.