Skip to content

docs: scripting-hosts roadmap adds application services on arisrvx - #1026

Merged
transfix merged 2 commits into
masterfrom
docs/scripting-hosts-app-services
Nov 6, 2026
Merged

transfix merged 2 commits into
masterfrom
docs/scripting-hosts-app-services

Conversation

@transfix

@transfix transfix commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

This adds §6.5, Application services, to docs/roadmap/ARIADNE_SCRIPTING_HOSTS.md: what a service needs from one arisrvx process 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.

  • §6.5.1 The script thread runs an asyncio loop. The relay posts to it with 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.
  • §6.5.2 serve_asgi(app, ...) runs FastAPI on uvicorn on that loop. Also: --http-listen, lifespan, and graceful shutdown on SIGTERM. The same main.py runs under plain python.
  • §6.5.3 A server: publish: block declares namespaces only the server writes (arisrv relays only conf.* today).
  • §6.5.4 An @host.authenticate hook turns the bearer the client presents into a principal. Token validation stays in Python, and principals key bound writes, room-call and rate limits.
  • §6.5.5 room-call for 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.
  • §6.5.6 Bound reads: @host.read_scope filters each connection's deltas and snapshot by path prefix.
  • §6.5.7 Clients join with a relay: block or --relay. This is a join mode for ari and the x hosts, with token: oidc and namespaces mirrored read-only. It also names the native TLS gap and two ways to close it (native wss:// or grpcs://).
  • §6.5.8 ServerHarness for pytest without arisrvx, plus one end-to-end CI test (arisrvx --python + arix test).
  • §6.5.9 Operations: arisrvx check, logs, the secrets rule, systemd.

Other changes:

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.

…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).
@transfix
transfix merged commit 095c60e into master Nov 6, 2026
22 of 27 checks passed
@transfix
transfix deleted the docs/scripting-hosts-app-services branch November 6, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant