Repository navigation
P0a: the action-intrinsic providers are each app's own; cvc::app::slot<T>() [4.0, breaking] - #1137
Merged
Merged
Conversation
…t<T>() Ariadne's action-intrinsic providers were one process-wide list: a provider registered for one app (most capture their app) ran in every app's program lanes, and called into a destroyed app once it was gone. They are now the app's own list, kept in a new per-app slot (cvc::app::slot<T>(), keyed by a string so it matches across shared libraries), and go with the app. register_action_intrinsics and clear_action_intrinsics take the app. A keyed form replaces the provider registered under its key instead of appending another: the stream, room and room-call providers and cvcGL's gl-bind-stream and media providers use it, so a second runtime on an app keeps one copy, and room_calls' function-static list of apps is gone. ariadne_registries_test: two apps, a provider gone with its app, keyed providers, order, apps on threads. app_test: AppSlot. The allowlist loses ariadne.cpp's four action_intrinsics lines.
…lay and client The writable-data scan flagged three statics #1122 added in room_calls.cpp: - the table of installed clients (clients()::c and its mutex) is now an app.slot, so an app's client goes with it; - the process-wide message counter (g_messages) is now each relay's and client's own, under a random tag, so a client made again under the same pid, or a second relay on a shard, repeats no id the bus has seen. Tests: ariadne_registries_test adds the two-apps (both orders) and gone-with-the-app cases; the room-call loopback test adds a client made again under the same pid.
# Conflicts: # tools/singleton_scan/allowlist.txt
This was referenced Nov 11, 2026
Merged
transfix
added a commit
that referenced
this pull request
Nov 11, 2026
Master's #1137 makes the action-intrinsic providers each app's own (an app.slot table, with a keyed form that replaces in place), and this branch gives each provider a kind (any / host_proxied / host_only). Both are kept: - ariadne.h: register_action_intrinsics takes the app, with or without a key, and with or without a kind; the forms without a kind register host_only. - ariadne.cpp: the app's table holds this branch's registered_provider (key, provider, kind). install_providers, the placement generation and host_only_bindings read the app's table. A keyed registration replaces both the provider and its kind. - The stream (any) and room (host_proxied) providers keep their kinds under master's keys. net, AppRuntime's seven providers, nav_compute and the tests pass the app. - Tests: the guards that cleared the process-wide list (isolated_providers_ cleared, StreamActionGuard, ari_providers_reset) are gone, since each test's providers now go with its app; use_host_in_contexts and register_thread_probe take the app. Master's job_intrinsics_test (#1113) still called the pre-#1137 forms, which do not compile at master's head; it passes the app. - ci.yml's sanitizer list keeps both sides' tests. The allowlist is the three-way merge of both sides (802 lines, cvc 453), rendered by scan.py: #1137 dropped the registry's and room_calls.cpp's statics. - Docs name the app-taking forms.
transfix
added a commit
that referenced
this pull request
Nov 12, 2026
Only job_intrinsics_test.cpp conflicted. Master's #1150 fixed the same pre-#1137 calls this branch fixed in 600c144, but kept a ProviderGuard that clears the app's providers on the way out; this takes master's version, so the file matches master. The rest merged cleanly: #1151's spawn points (world_spawns.cpp, the world rules' spawns, the loader and scene-world tests), #1145's macOS libcurl with WebSockets (CMake and a ci.yml configure assertion), #1148's wasmtime in the arix and ariglx recipes, and #1149's ocean band. None of them registers an action-intrinsic provider, and none adds writable process-wide state: their only new statics are vehicle_view.cpp's constant colour tables.
This was referenced Nov 12, 2026
transfix
added a commit
that referenced
this pull request
Nov 15, 2026
P0a's breaking changes (#1119, #1137) are on master, and v3.7.13 was the last 3.x release, so the next release is 4.0.0. CMakeLists.txt and every cvcpkg recipe's upstream_version move to 4.0.0 (cvc_revision is already 1 everywhere). cvcGL's SOVERSION follows the major version, as libcvc's does: libcvcGL.so.4 beside libcvc.so.4. It was hardcoded to 3, which would have let a 4.x cvcGL load where a 3.x one was linked.
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.
P0a step 2, first part (
docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md§1.3, §7 P0a (2)). Breaking (4.0).The bug it fixes (§1.3, bug 2, its action-intrinsic half)
Ariadne's action-intrinsic providers were one process-wide list. A provider registered for one app ran in every app's program lanes, and most providers capture their app (
register_stream_intrinsics,register_room_intrinsics,register_net_intrinsics, the OIDC host,AppRuntime's verbs). So a second app's documents got verbs bound to the first app, and once that app was gone, they called into freed memory. Nothing in the library cleared the list, so hosts and tests had to callclear_action_intrinsics()before every app died. Each cvcGL runtime also appended its own copy of the statelessgl-bind-streamand media providers.What moved
cvc::app::slot<T>()(new). The per-app home for the state of subsystems above core, so core needs no Ariadne or cvcGL types. Each app has oneT, made on first use and destroyed with the app.Tnames its slot withstatic constexpr const char *app_slot. The key is a string because atype_infoneed not compare equal across shared libraries. The later parts of this step (widgets, blocks, decoders, node types and the rest) use it too.The action-intrinsic providers are now the app's own list, in an
app.slottable:register_action_intrinsics(app, provider)andclear_action_intrinsics(app). A provider goes with its app, so nothing has to clear the list before the app dies.Keyed providers.
register_action_intrinsics(app, key, provider)replaces the provider registered underkey, in its place, instead of appending another copy. The providers registered once per app use keys:register_stream_intrinsics;register_room_intrinsics;register_room_call_intrinsics, whose function-static list of apps already done (mu,done) is gone;register_gl_stream_intrinsics(app)andregister_media_intrinsics(app).A second
AriRuntimeon an app now keeps one copy of each.The room-call client a host installs (
room_call_client::install/for_app, from arisrvx: room-call, relay joins, TLS and a server document's python: (S2) #1122) is now the app's own, in anapp.slot, so it goes with the app. ci: room_calls.cpp's process-wide objects on the writable-data scan's allowlist #1133 put the table and its mutex on the allowlist; this PR takes them off.Room-call message ids were numbered by one process-wide counter (also on ci: room_calls.cpp's process-wide objects on the writable-data scan's allowlist #1133's lines). Each relay and client now numbers its own under a random tag. A plain per-object count would have repeated
call-A-1when a client joins again under the same pid, and the bus drops an id it has already seen from that origin.Public API changes (the old forms are gone)
register_action_intrinsics(cvc::app &, ActionIntrinsicProvider)andregister_action_intrinsics(cvc::app &, const std::string &key, ActionIntrinsicProvider).clear_action_intrinsics(cvc::app &).register_gl_stream_intrinsics(cvc::app &),register_media_intrinsics(cvc::app &).cvc::app::slot<T>().Callers updated in this PR: Ariadne's own providers (AppRuntime, stream, room, room calls, room media, net, OIDC), cvcGL (
AriRuntime,bundles.cpp), the examples (nav_compute,ariadne_conference) and the tests. pycvc and pycvc_gl call none of these. The tests' clean-up guards that only cleared the list are gone. Two mid-test clears stay asclear_action_intrinsics(app): those tests enable the net again on the same app.What the allowlist loses: 11 lines
ariadne.cpp(4):action_intrinsics_registry()::vand its guard,action_intrinsics_mutex()::m,action_intrinsics_generation()::g.room_calls.cpp(7, the lines ci: room_calls.cpp's process-wide objects on the writable-data scan's allowlist #1133 added):clients()::cand its guard,g_clients_mu,g_messages, andregister_room_call_intrinsics'smu,doneanddone's guard.Tests
ariadne_registries_test(new; later parts of this step add their registries' cases):ActionIntrinsicsAreEachAppsOwn): a provider registered on one app is bound there and not in the other's programs orhas_function; clearing one app's list leaves the other's.AnAppsProvidersGoWithIt): a provider capturing an app is not reached from another app, nor from an app made after it is destroyed.AProviderUnderAKeyIsKeptOnce): three registrations under one key run the provider once per program env; re-registering replaces it in its place.ActionIntrinsicAnswersDoNotDependOnOrder): two apps registering and calling in either order, with and without a third app made and destroyed between, give the same answers.AppsOnOtherThreadsKeepTheirOwnProviders): four apps registering and calling on four threads at once each get their own.ARoomCallClientIsItsAppsOwn,AnInstalledRoomCallClientGoesWithItsApp): installed in either order, each app finds its own; clearing one leaves the other; an app's client is released with the app.room_relay_integration_test's room-call case adds a client made again under the same pid, whose call must still be answered. It runs on the gRPC/WS lanes only, so it was not run locally.app_testaddsAppSlot.*: one object per app, made on first use and destroyed with the app; a slot constructor that asks for another slot; eight threads asking at once get one object.Locally (Windows, MSVC 2022, Release, cvcGL + pycvc + examples, on master d30f7bd): the whole tree builds.
ariadne_registries_test7/7,app_test121,ariadne_requires_test18,ariadne_runtime_test262,ariadne_media_test55,room_avatar_test9 androom_chat_test14 pass, as do thecvcgl_media_*,cvcgl_stream_bindandcvcgl_ariadne_realizetests. (ariadne_ftxui_testhas no cases in this build: no FTXUI here.)The rest of this step: the split
One PR per group, in §7's order. Each adds its cases to
ariadne_registries_testand drops its lines from the allowlist.app.slot<T>()and the action intrinsics..ariblocks (loader.cpp, and theregister_world_block/register_server_blockonce-flags), data decoders, script engines.scene_realize.cpp).cvc::net's HTTP client, the URL opener and notice, and the browser hooks and disabled flag.resolve()/resolve_async()/resolve_to_file()taking the app.