Repository navigation
Conversation
… per app Each app has its own URI resolver now. Allowlist -22 lines (cvc 283 -> 261); Ariadne keeps only host_signals' two (a signal handler's state is a process resource, Joe 2026-11-12). - uri.h: resolve / resolve_async / resolve_to_file / store, the handler, store-handler and async-handler registries, and the read and store byte caps take the app (an app slot). The built-in file reader takes the cap; the Windows temp-name token and counter are per call. - state:// resolves against the app it is registered on (register_state_uri_handler(app)): before, the last app to register answered every app's state:// reads. sync_resolver_caps_from_state takes the app. - HTTP: the options provider is the app's; register_http_uri_handler and the cached handler register on an app; the cache's single-flight map is the app's (two apps fetching one URL coalesced, and only the leader's cache was written). - enable_net / disable_net / net_host_status / net_host_access and enable_oidc / disable_oidc / pump_oidc / oidc_busy are per app. - Callers: the loader (its context's app), data loads (a local scheme resolves under with_app; the network wait holds no app), media (fetch_bytes(app, ...), PlayerSource::app set by make_player), the fetch verb, the relay session's credential source, the scene and cvcGL source resolvers, state_io (save_state / restore_state take the app), the hosts and examples (register_cvc_uri_handler(app, ...)). Tests: ariadne_registries_test adds URI handlers and caps per app (both orders), state:// reading each app's own tree, the net host per app, and apps on threads; multi_app_integration_test's workload adds URIs. The loader and runtime tests' guards that only undid process-wide registrations are gone; their tests use one app for registering and loading.
This was referenced Nov 12, 2026
Closed
Owner
Author
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.
No singletons, Ariadne part 3: the URI resolver, HTTP, and the net and OIDC hosts are each app's own. Stacked on #1163 (then #1161, #1155, #1152). Breaking (4.0).
This finishes Ariadne. What remains on the allowlist from
src/cvc/ariadneishost_signals.cpp's two objects. A signal handler can only reach process-wide data, and Joe agreed (2026-11-12) that it stays.What moved onto the app
The URI resolver (
uri.h), as one app slot. These take the app:resolve,resolve_async,resolve_to_fileandstore;register_uri_handler(app, ...)and the rest);The built-in
filereader and writer are every app's. The Windows temp-file name drew on a process-wide token and counter; it is now random per call.state://resolves against the app it is registered on (register_state_uri_handler(app)). Bug fixed: the registry was the process's, so the last app to register answered every app'sstate://reads and writes.sync_resolver_caps_from_state(app)sets that app's caps.HTTP:
set_http_options_provider(app, ...);register_http_uri_handler(app[, policy]);register_cached_http_uri_handler(app)/unregister_cached_http_uri_handler(app).Bug fixed: the cache's single-flight map was the process's, keyed by URL. Two apps fetching one URL waited on one transfer, and only the first app's cache was written.
The net host:
enable_net,disable_net(app),net_host_status(app)andnet_host_access(app). Turning the network on for one app no longer turns it on for every app's documents.The OIDC host:
enable_oidc,disable_oidc(app),pump_oidc(app)andoidc_busy(app).Callers updated
state://,cvc://) resolves while the load holds the app (with_app; the load stops if the app has gone). The network wait still holds no app;fetch_bytes(app, ...).PlayerSourcecarries the app;make_playersets it, and the browser and FFmpeg players fetch with it;fetchverb;resolve_generated_world_file(app, ...));save_state(app, ...)/restore_state(app, ...);register_cvc_uri_handler(app, ...), after the app is made).Allowlist: -22 lines (cvc 283 -> 261)
uri.cpp(the three registries, their mutex and guards, and the two caps),uri_http.cpp(the provider cell, mutex and guard),uri_http_cache.cpp(the flight map, mutex and guard),net_host.cppandoidc_host.cpp(the host cells, mutexes, guards andg_on).Tests
ariadne_registries_test:state://reading and writing each app's own tree, and a later app having none;multi_app_integration_test: the workload adds URIs. App i'smemoscheme answers its index, itsstate://reads its own tree, and its cap is its own.StateHandlerGuard,HttpHandlerGuard,HttpProviderGuard,SchemeGuard,CapGuard,NetGuard,NetHostGuard) existed only to undo process-wide registrations, and are gone. Each test registers on its own app and loads against it. The guards that also resetcvc::net's own hooks keep those resets;cvc::netmoves to per-app in a later PR.Locally (Windows, MSVC 2022): the whole tree builds, and these pass:
ariadne_registries_test14,multi_app_integration_test2,ariadne_loader_test228,uri_http_cache_test13,net_policy_test25,ariadne_runtime_test262;CI
Full run: the push to
ci/full/no-singletons-ariadne-4, https://github.com/transfix/libcvc/actions/runs/43186547811.