Repository navigation
arisrvx: each client's limits for its programs and guests (ID4a), and arisrv reserved from publish: - #1296
Merged
Conversation
transfix
added a commit
that referenced
this pull request
Nov 16, 2026
…view From the arisrvx session's review, and Joe's answers to both sessions: - client_registry keeps a client's limits as client_limits (programs and guests as optional booleans; steps, time and memory_mb, where 0 is the document's), and limits(pid) returns them as an optional. That is what ServerDocument::set_client_limits (#1296) reads. - concurrency and python are not keys. Programs and guests run one at a time per client, and ID4c adds python. - The doc: - #1290's ledger keys on the principal or the verified device tag, never the client id; - packaged clients keep their names; - #1296's seam as built; - client Python needs a WASI CPython, not W5's Emscripten build; - parts are named by session; - D2 is being confirmed, since Joe answered the two sessions differently.
transfix
added a commit
that referenced
this pull request
Nov 16, 2026
…view From the arisrvx session's review, and Joe's answers to both sessions: - client_registry keeps a client's limits as client_limits (programs and guests as optional booleans; steps, time and memory_mb, where 0 is the document's), and limits(pid) returns them as an optional. That is what ServerDocument::set_client_limits (#1296) reads. - concurrency and python are not keys. Programs and guests run one at a time per client, and ID4c adds python. - The doc: - #1290's ledger keys on the principal or the verified device tag, never the client id; - packaged clients keep their names; - #1296's seam as built; - client Python needs a WASI CPython, not W5's Emscripten build; - parts are named by session; - D2 is being confirmed, since Joe answered the two sessions differently.
transfix
force-pushed
the
feat/arisrv-client-limits
branch
from
November 16, 2026 06:12
1bc804e to
e4374f6
Compare
transfix
marked this pull request as ready for review
November 16, 2026 06:40
transfix
added a commit
that referenced
this pull request
Nov 16, 2026
…ove the document's caps, up to the ceiling Joe confirmed to the arisrvx session "Yes, up to ceiling", as he had told the identity session. #1296 sets kClientLimitsAboveDocument = true.
transfix
enabled auto-merge (squash)
November 16, 2026 06:43
… arisrv reserved from publish: The relay can now cap each client's code separately (docs/roadmap/ARISRV_IDENTITY.md §2.6, ID4a; the identity work's client registry will set it). - The seam. ServerDocument::set_client_limits takes a function of the pid, a ClientKind (program or guest) and the document's caps. It returns the caps that client's code of that kind runs under, as a ClientLimits (ClientPrograms' fields: on, max_steps, max_time, max_memory). on false refuses it, as forbidden. - Held to the document's. Per decision D2, settled by the owner, a client's limits never go above the document's caps; a server sets those for its biggest clients. 0 leaves the document's, and the action lane's caps hold over both. ServerDocument::kClientLimitsAboveDocument switches this, and the tests follow it. - At each start. run_client_program and run_client_guest ask right after the pid check, so a change applies from the client's next start. A held guest starts under the caps it was given. A function that throws refuses the start (unavailable). - A guest's linear memory is capped by its client's memory cap, else by kClientGuestMemory. - arisrv joins publish:'s reserved roots, so no server document can publish the relay's own records (the registry's arisrv.clients). Tests: - ServerDocumentTest.EachClientsLimitsLowerItsProgramsCaps. - ServerDocumentTest.EachClientsLimitsCapItsGuests, on the fake engine. - ServerBlockTest.RefusesWhatItCannotPublish gains arisrv's cases. Docs: ARIADNE.md §9.7 (publish:'s roots), §9.7.1 and §9.7.2.
…caps to the action lane's The owner settled decision D2 (docs/roadmap/ARISRV_IDENTITY.md §4) as "Yes, up to ceiling". So ServerDocument::kClientLimitsAboveDocument is now true. A client's limits replace the document's caps for that client. They can be lower, or higher up to the action lane's (ariadne.limits.action_max_*), which hold over every process. A guest's memory stays under ariadne.limits.wasm_max_memory. The document's client_programs: and client_guests: are what every client gets, and an admin can give one client more or less. The tests follow the switch: ServerDocumentTest's limits cases now expect the raise. Docs: ARIADNE.md §9.7.1 and §9.7.2.
…ne's 0.1 s ServerDocumentTest.EachClientsLimitsLowerItsProgramsCaps failed on CI's Linux Debug build. The raised client's program came back resource_exhausted. That was the action lane's default 0.1 s time cap stopping it: in Debug, its 1500 additions take longer than 0.1 s. Its steps (about 6000) were well under the 50000 it was raised to. The test is about step caps, so it now sets ariadne.limits.action_max_time to 0 (no limit). Locally, a 0.2 ms cap reproduces CI's failure exactly, and the fix passes all 22 cases.
transfix
force-pushed
the
feat/arisrv-client-limits
branch
from
November 19, 2026 00:23
50aaa3c to
bd243d1
Compare
transfix
added a commit
that referenced
this pull request
Nov 19, 2026
# Conflicts: # src/arisrv/main.cpp # src/cvc/CMakeLists.txt
…Integration), which PRs skip #1356 put TilerBunny on every PR. That's about 13 s in Release, but a Debug build runs the bunny's SDF and the tiling many times slower. package-linux's libcvc-debug took about 450 s on a quiet runner (#1357, #1358). On a loaded one it ran past its 900 s timeout three times over (#1296, #1360), and failed that required job for every PR. So in a Debug build the suite is TilerBunnyIntegration. ci.yml's STRESS_REGEX takes Integration as a heavy suite, which no PR or Debug job runs; Release pushes still do. A Release build keeps the name TilerBunny, so every PR's Release lanes still run it. The tests' CMakeLists comment and the VolumeRover ports roadmap say the same.
transfix
disabled auto-merge
November 19, 2026 20:48
transfix
enabled auto-merge (squash)
November 19, 2026 20:48
transfix
added a commit
that referenced
this pull request
Nov 21, 2026
…guests (ID4) (#1406) An admin could already set a client's limits with server.limits (ID3). They were kept in the client's record and shown under limits.*, but nothing used them. #1296 (ID4a) added the hook, ServerDocument::set_client_limits, and this sets it in arisrv's main() from client_registry::limits(pid) (docs/roadmap/ARISRV_IDENTITY.md §2.6). - A programs or guests flag set false refuses the client that kind (forbidden). true allows only what the document already allows. - steps, time and memory_mb (in bytes; a huge value saturates) replace the document's caps where they aren't 0. Under D2 that means lower, or higher up to the action lane's caps, which the document enforces. - It's asked at each start, on the room loop's thread, so a change applies from the client's next program or guest. - At shutdown the callback is cleared before the registry it reads goes away. Test: ctest arisrv_client_limits runs stock arisrv with client_programs_server.ari (5000 steps) and rcon. The client makes itself an admin, then: - refuses its own programs (forbidden); - allows them again with t; - lowers its steps to 5, so a 40-addition program ends resource_exhausted; - sets steps back to 0, the document's, and the program runs again.
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.
ID4a of the identity plan (docs/roadmap/ARISRV_IDENTITY.md §2.6, drafted in the identity work): each client can get caps of its own for the programs (S3) and WebAssembly guests (G4) it runs on the relay. It builds on G4's first part (#1283, merged), and is rebased onto master since.
The seam
ClientLimits(an alias ofClientPrograms:on,max_steps,max_time,max_memory), andServerDocument::ClientKind { program, guest }. Python guests will add a third kind, so the struct needs no allow flags.ServerDocument::set_client_limits(fn(pid, kind, document)). The function returns the whole caps that client's code of that kind runs under.onfalse refuses the client that kind:forbidden, which the client sees asPermissionError.unavailable.client_programs:andclient_guests:.D2: up to the ceiling
The owner settled D2 as "Yes, up to ceiling". A client's limits replace the document's caps for that client: lower, or higher up to the action lane's (
ariadne.limits.action_max_*), which hold over every process. A guest's memory stays underariadne.limits.wasm_max_memory. Soclient_programs:andclient_guests:are what every client gets, and an admin can give one client more or less.ServerDocument::kClientLimitsAboveDocument(nowtrue) switches this, and the tests follow it.arisrvreserved frompublish:arisrvjoinspublish:'s reserved roots (with conf, ui, ariadne, state_exec and room). So no server document can replicate the relay's own records, the client registry'sarisrv.clients.*, to its clients.server.*names refused byexport()arisrv answers
server.*room-calls itself, before a call reaches Python (the identity work's ID1, #1293). Sopycvc.ariadne.exportnow raisesValueErrorfor a name underserver., which could never run. A name that only begins the same way, such asserverless, is still fine.Not in it
main()wiring above (the identity work's ID1, which ownssrc/arisrv/main.cpp).concurrency: programs and guests stay one at a time per client, by design.Tests
ServerDocumentTest.EachClientsLimitsLowerItsProgramsCaps:forbidden;ServerDocumentTest.EachClientsLimitsCapItsGuests, on the fake engine:unavailable.ServerBlockTest.RefusesWhatItCannotPublishgainsarisrvandarisrv.clients.test_pycvc_ariadne_servergains theserver.refusal: 31 checks pass. The 40pycvc_ariadne*,arisrvx*andarisrv_*ctests all pass.arisrv*,pycvc_ariadne*, the room and server-document suites, the script lane and engine, and everyWasm*.ariadne_server_document_testcases pass, as do the 31 G4-targeted ctests (G4's 29 plus the two new) and the 232 neighbouring ones (room relay, room-call, everyarisrv*, the script lane and engine, everyWasm*). The tests follow the D2 switch: 22 of 22 pass with ittrue, as they did with itfalse.-fsyntax-only -Wall -Wextrais clean on server_document.cpp and the test. clang-format 18.1.8 is clean on the changed lines against master.Docs: ARIADNE.md §9.7 (
publish:'s roots), §9.7.1 and §9.7.2. ARISRV_IDENTITY.md, which they link to, lands with the identity work's doc PR.