Repository navigation
state_exec: threaded execution Stage 1b (Ariadne: providers by kind, one pump a frame, isolated documents) - #1088
Merged
Merged
Conversation
The declarations threaded Stage 1b's implementers share (S1.md S1.9-S1.11, S1-Q12), with stubs that keep today's behaviour: - Runtime::drain_begin()/drain_end() and AppRuntime's pair: drain() in two halves around app.exec_pump_frame(). Stubs: drain_begin does nothing, drain_end is today's drain(). - register_action_intrinsics(provider, provider_affinity); the one-argument form is host_only. The stub ignores the kind. - AppRuntime::declare_thread_affine_prefix (recorded) and AppRuntime::wait_idle (the app's host); pycvc's AriApp.wait_idle goes through it. - Runtime::isolated_group() and isolation_reason(), for ariadne.exec.isolate_documents (S1-Q6). - ictx.host in every Ariadne lane: an action and its spawned children get the app's async host (the one providers use today), the init lane its own inline host (S1-Q2), load_names' probe an inline host, so a provider can register on *ictx.host everywhere. - CTest entries ariadne_runtime_test_threads_auto and ariadne_host_test_threads_auto (AR-1): both suites again with CVC_EXEC_THREADS=auto, AppLockManager.* left out.
…'s host Threaded Stage 1b, S1.9's ariadne.cpp and app_runtime.cpp rows (S1.md; td 4.9; S1-Q2, S1-Q7): - The provider registry keeps each provider's kind; the one-argument register_action_intrinsics is host_only. install_providers puts the providers into a program's env by kind: in group 0, a host-affinity group, the init lane and the name probes every provider runs as it is; in an `any` group an `any` provider runs as it is, a `host_only` one is not run (its names are NameErrors), and a `host_proxied` one runs into a scratch scope over the env, whose natives then go in through exec_group::install(..., host_proxied) and whose other bindings are copied. The design is documented beside the registry. (No group exists until S1.10, so every caller passes none here.) - AppRuntime's one provider becomes four, registered with their kinds: the host's verbs and functions (host_only), quit and the data-* verbs (host_proxied), the async verbs (any) and the host's async functions (host_only). The async ones register on *ictx.host; their done channels post to ictx.host->parking_scheduler(), captured as the env is built, or to group 0 from an inline host (the init lane). The data-* provider's own-program probe walks the tree pinned, since a spawned child builds its env on its pumping thread. - AppRuntime::idle() and wait_idle() also read the document's group (Runtime::isolated_group(), null until S1.10). - The init lane's private scheduler gets its own cycle registry, declared before it and collected when the run ends. Tests: - AriadneInit.ItsCyclesAreItsOwnAndFreedWhenItEnds: fails without the init registry (65 objects left in the thread's own registry). - AriadneHostVerbs.AnInitLanesAsyncVerbPostsItsDoneChannelToGroupZero: the inline host's done channel still reaches group 0.
S1.md S1.9's stream rows (td 4.9; S1-Q7): - stream_params gains `scheduler` (appended; null keeps group 0, the app's exec scheduler). The stream takes it at open and posts its seq and lifecycle events there, from the producer thread too, instead of ctx_.exec_scheduler(). - (stream-open) passes the calling program's group, ictx.host->parking_scheduler(), or null (an inline host: group 0). The stream verbs' provider is `any`: mutex-guarded tables, descriptors written through pinned walks, posts to the opener's group; its body reads only the context. - room-subscribe's proxy opens on the caller's group (an internal subscribe_on; the public room_subscribe keeps its signature and group 0, as stream_bridge and stream_relay do). - descriptor_pins_ is a cvc::pin_vector, so the descriptor's chain is released leaf first (K's PIN-1, StreamDescriptorPinsReleaseTheLeafFirst). Tests: Stream.EventsGoToTheSchedulerItWasOpenedWith (live, a seq posted from another thread and closed reach the named scheduler, none the app's), AriadneStreamIntrinsics.AStreamPostsToItsOpenersGroup (a stream opened from a context whose host parks on another scheduler posts there, not to group 0) and AriadneStreamIntrinsics.AStreamOfAnInlineHostPostsToGroupZero (the fallback).
S1.md S1.9's net rows (td 4.9, B30; S1-Q7): - The verbs register on the calling program's async host, *ictx.host (S1b.0 set it in every lane), not app.exec_async_host(): group 0's for a document in group 0, its group's for an isolated one, init's inline host on the init: lane. A started request (http_work, uri_fetch_work) keeps the host it started on and is finished there (settle_started); a host's shutdown, which a group's teardown makes after its kills, cancels each call it started, and a cancelled call is never finished on it, so nothing a started request needs dies before it. - Two providers by kind: `any` (http-get, http-request, fetch, ws-*, net-allowed?, net-auth-*) and `host_proxied` (open-url). The credential store locks: every CredentialStore member that reads or writes its entries, bindings or renewers holds its mutex_, and the policy is immutable once the host made it, so net-allowed? and net-auth-* go with the requests. Both registration bodies read only the context and the atomic `live`, and bind natives into the new env. Tests: AriadneNetIntrinsics.RequestsGoThroughTheContextsHost (a request is a kernel of the context's host, and the app's host never sees it) and AriadneNetL4.AStartedRequestKeepsTheHostItStartedOn (a started request is finished on its host, and that host's shutdown aborts it), both against a context whose host is not the app's (use_host_in_contexts).
…ompute S1.md S1.9's remaining provider rows (S1-Q7), each registered with the two-argument register_action_intrinsics: - room and room-media: host_proxied (raw walks and writes of the app-global room tree, a room_handle used outside room_table's lock, the bridge). - oidc: host_proxied. Its completion still posts to group 0 (oidc#NAME): a document that uses oidc is never isolated (S1-Q6). - nav_compute: (nav-step) on *ictx.host, `any`: its marshal touches nothing and its kernel runs on the background pool over the warmed compute pool, returning a fresh string. Its headless twin, AriadneAction.NavStepAsAnAsyncFunctionReturnsItsResult, registers the same way. Every registration body reads only the context (and a weak host or an atomic) and binds natives into the new env, so a spawned child may run it on a worker.
state_resolve and state_store pin the addressed node and its chain, and may run on a compute-pool worker. The chain was a std::vector, released root first, declared after the node it held, and the node itself was a copy that outlived the chain: once another thread unlinked the subtree, the pins were its last owners and an ancestor died before its child (a destroyed() slot may walk _parent). `chain` and `effective::pins` are cvc::pin_vectors (td 4.8). `pins` is declared before `node`, and the node and its chain both move into `effective`, so the node goes first, then the chain leaf first. For a followed transparent link the link node and its chain are let go of in that order before the result is returned, since parameters go in no set order. K's PIN-1 (UriStateChainsReleaseTheLeafFirst) proves it.
The signals2 subscribers of S1-Q7's table, audited for writers on a worker (td 4.8, B15). - The not-thread-safe cvcGL subscribers (CameraController, TouchGestures, StageLighting, FpsHud, ScreenTextHud, and Settings.cpp's ShadowSettings, UiSettings and ViewportLayout) record the thread that built them, so connected them, and assert in handleStateChanged that a state change reaches them there. Debug builds only; the member is unconditional, so a class's layout never depends on NDEBUG. A test that leaks one onto a worker fails in CI's Debug cvcGL jobs. - GraphicsNode::handleStateChanged runs on the writing thread and checks for its echo before it marshals. The own-publisher check reads only thread-local state on a worker. The scene-less check read a plain member flag that the node's own thread sets around its direct pose write: another thread's matrix write meanwhile (a worker-pumped group's, or a publisher flushing a pose queued before the node lost its scene) raced it and, reading true, was dropped as the echo while the tree ended on it. The mark is now the writing thread's (a thread_local, as state_publisher's flushing() is), so only the inline echo is dropped and another thread's write is marshalled. cvcgl_unattached_node_thread's new case fails without it. - state_sync_adapter stays not thread-safe (S1-Q7): its slots re-walk from the root with raw, creating lookups and read _attached unlocked. Comments say only host-thread writers reach the replicated subtree (conf.*) in Stage 1, and name the follow-up (pinned walks, an atomic flag).
In arigl the scene prefix is the document's, and the camera, touch, lighting, HUD and settings subscribers under it assume the render thread. AriRuntime declares that prefix to its AppRuntime before any load (AppRuntime::declare_thread_affine_prefix, S1.11), so an isolated document there is pumped on the host thread (S1-Q6). AriRuntime::wait_idle goes through AppRuntime::wait_idle, which also waits for the document's own group host once the document is isolated.
…ead-affine prefix
PIN-1 (S1.md section 4; S1.9, S1.11; td 4.8), at the end of state_lifetime_stress_test.cpp under the Stage 1b banner, modelled on ContextRootPinsReleaseTheChrootFirst: - StateLifetime.UriStateChainsReleaseTheLeafFirst: a state:// store whose write fires a slot that removes the node's parent is the last owner of both; the node dies with its parent alive, for the node itself and through a transparent link. - StateLifetime.StreamDescriptorPinsReleaseTheLeafFirst: a stream whose document subtree was removed while it was open is the last owner of its descriptor chain when it closes; stats, the descriptor and streams each die before their parent. Both fail on S1b.0 with MSVC (its std::vector releases front first, root first). libc++ destroys a vector back to front, so the stream case may pass there before the fix; the uri_state case fails on all three standard libraries, since the store's own node pin outlives its chain.
register_net_intrinsics no longer holds the app or its async host: each program calls through its own context's host, and the verbs are two providers by kind. AriRuntime::wait_idle waits on the document's group host too (AppRuntime::wait_idle).
async_scheduler::ingress_posts_for_test() counts the post_message() and post_async_completion() calls a scheduler has taken, from any thread. AR-3b reads it to show an isolated document's providers post to its own group and leave the app scheduler's ingress untouched (S1.md section 4).
Threaded Stage 1b, S1.10 (S1.md; td 4.12, 4.15; S1-Q6, S1-Q7, S1-Q8): - The drain splits. Runtime::drain_begin() is the drain up to the pump (oidc, key bindings, images, the queued events and host handlers, ticks, input residents) plus has?'s snapshot for an `any` group; drain_end() is the pump, skipped when app.exec_pump_generation() moved since this Runtime's drain_begin(), then the sweep. drain() is both, and drain_end() alone runs drain_begin() first. AppRuntime's pair puts the scene work, warnings and frame hooks after drain_end(). starts_frame() and the pump clock stay on the drain() path. - Host-thread calls: post_input, post_signal and render assert, in debug builds, that no pump_all of the app's pool is running on the calling thread (through exec_pool_probe(), which never builds the pool). ariadne.h's post_input and post_signal comments say "host thread, outside a pump" instead of thread-safe. - Isolated documents (ariadne.exec.isolate_documents, "1" or "true"): the placement is decided at load (AppRuntime::load asks at its end; a bare Runtime decides at its first drain, render, submission or isolated_group() query after set_root), and again for each document set_root gives. S1-Q6's rules, in order: a non-empty prefix; an enforced (strict) channel policy with no global channel and no static '/' channel in any program; no oidc (an oidc-* call or the oidc# channel); no writable link: hole whose target leaves the prefix. An eligible document gets an exec_group (owner and name its owner tag, a frame group of the app), `host` when a host_only provider binds anything in its env or a declared thread-affine prefix is at or under its prefix, else `any`; an ineligible one stays in group 0 and logs why once. Actions, residents, ticks, input, signals, kills, the sweep and has? use its scheduler and host; providers install by kind; drain_end() pumps the group through the app's pool when no frame pump did. A document whose placement changes moves: its processes are killed and reaped where they ran, run_program callers are told, its residents start again in the new place, and the old group is kept (empty, still drained) until the Runtime goes, since a stream it left open posts to it. Runtime::declare_thread_affine_prefix (new) takes AppRuntime's declarations. - spawn_child builds the child's context from its parent's (scheduler, host, root, root_pins, root_path, identity, channel policy, document scope, lock fields, spawn context), with no re-chroot by path, so a child of a deleted chroot writes its parent's detached node; nothing in it walks the tree, since it runs on the pumping thread. - Teardown (~Impl), each step catching and logging what it throws: doc_scope_.clear(); kill_owner and the reap of every process the Runtime knows of, its actions' own included (S1-Q8); then the group (unregistered from the frames first) and any earlier group. Tests: - AriadneScheduler.DrainEndDoesNotPumpAgainAfterAFramePump: with drain_begin, exec_pump_frame, drain_end an await resumes once a frame (4 after 5 frames; 9 when drain_end pumps again). - AriadneIsolatedDocs.ProvidersAreInstalledByTheirKind: in an `any` group at 2 threads with CVC_EXEC_FORCE_MOVE, a host_proxied native runs only on the frame thread and its constant is bound, an `any` native also runs on a worker, and a host_only provider registered after the group is made is a NameError that has? does not see (all three fail with every kind installed as it is). - AriadneIsolatedDocs.IdleAndWaitIdleCountTheDocumentsGroup: idle() is false while the document's kernel runs on its group's host, and wait_idle() waits for it (both fail without S1.9's reads of the group). - AriadneIsolatedDocs.TeardownReapsItsProcessesAndDestroysItsGroup: a parked action and its fork in a group; after the Runtime goes no group of the app is alive and a frame pump finds none. - AriadneIsolatedDocs.ALaterDocumentThatIsNotEligibleMovesToGroupZero: a later tree with a writable hole out of the prefix moves the document to group 0; its resident is reaped in the group and starts again in group 0, and the hole is writable (fails when the placement is decided only once). - AriadneHazards.HZ08_ForkedChildKeepsOwnerAndTeardownReapsIt, reworked (S1-Q8): after teardown the action's own process is gone too (fails without reaping it).
Threaded Stage 1b's Ariadne cases (S1.md section 4; td 8.5, 8.6), written from td and the plan against S1b.0's interfaces, at the end of ariadne_runtime_test.cpp under the Stage 1b banner: - IS-1b SpawnContext.IS01b_InAnIsolatedDocument: IS-1 in an isolated document's group, pumped by plain drain(); the child is in the group, not group 0, and the teardown destroys the group. - AR-1 AriadneFrames.AR01_NoDocumentOptedInStaysOnTheFrameThread: at threads auto with no document opted in, init, ticks, actions, a spawned child and an await all run on the frame thread, and no worker pumps (exec_pool_worker_pumps_total). - AR-2 AriadneFrames.AR02_ThreeDocumentsInGroupZeroPumpOnceAFrame: three Runtimes through drain_begin, exec_pump_frame, drain_end: group 0 is pumped once a frame, and an await whose call ends between two drain_end calls resumes at the next frame's pump. - AR-3 AriadneFrames.AR03_IsolatedDocumentsRunOnWorkers: four isolated documents at 4 workers: the busy residents step on two threads or more, render never begins inside a pump_all, a quick action completes in its drain, and ps, inspect and kill see only the document's own group. - AR-3b AriadneFrames.AR03b_ProvidersPostToTheirGroup: an isolated `any` document's AppRuntime async verb with a done channel, stream open and close and net request (the local HTTP server): each call is tracked by the document's group while in flight, the posts reach a resident in the group, and group 0 has no call, no process and no message. - SP-1 SpawnContext.SP01_AChildOfADeletedChrootWritesTheDetachedNode: a resident's child, spawned after its chroot was deleted, writes the detached node; nothing is made at the old path. - EL-1 AriadneFrames.EL01_IneligibleDocumentsStayInGroupZero: S1-Q6's rules, each ineligible document in group 0 with a reason; eligible ones isolated, affinity host for a declared thread-affine prefix or a host_only native, else any. - FF-3's init half AriadneHazards.FF03_InitLaneRunsProviderCallsOnItsOwnHost: a provider on *ictx.host gives (21 21 6) from init, on an inline host that is not the app's, and init's process is charged both calls (budget-usage). HZ-13 is unchanged. On S1b.0, AR-1 and FF-3 pass; the others fail where the behaviour is not built yet (no isolated documents, the drain split's single pump, spawn_child's re-chroot by path).
Threaded Stage 1b's scenario (S1.md S1.14, td 6.3): `docs` (1, 2, 4, 8) AppRuntimes on one app, each loading an eligible document (a prefix of its own, a strict channels: block; S1-Q6) with ariadne.exec.isolate_documents on, driven a frame at a time by every document's drain_begin(), app.exec_pump_frame(), every document's drain_end(). `t` (0, 1, 2, 4, 8) is the app's exec_pool workers, built before anything builds group 0 or the lock manager (S1-Q1), under unpinned_scope, with the pool scenarios' placement. frame=heavy gives each document's on_tick a 500-iteration loop (about 8000 steps, well over the pool's 100 us inline_below), frame=small one state-incr. No backend and no render: the region is the three calls, ns_per_iter the frame time. Extras: helper_wakes (pool stats), worker_pumps (exec_pool_worker_pumps_total), isolated (documents in a group of their own), pumps, skipped, effective_threads, ticks_per_frame. A point with fewer documents isolated than it has prints a note and passes; a rep fails when a document did not tick. Skipped without yaml-cpp. Smoke: t 0, 2, docs 1, 2, both frames, 4 frames. The runner's gate fails a point that would pass vacuously (GATE_GUARDS): mt.ariadne_docs' rows must have extra.isolated at their docs, since documents left in group 0 never wake a helper. On S1b.0's stubs the gate therefore fails, as it should, until S1.10 isolates the documents.
AR-3b now asserts that group 0's ingress (async_scheduler::ingress_posts_for_test) takes no post and no completion across the isolated document's action, as S1.md's AR-3b row asks, beside the effects it already read. The include block's comments are aligned as clang-format wants.
S1.15's Ariadne lines (S1-Q9, S1.md section 5): - The clang-tsan leg also builds and runs ariadne_runtime_test, with CVC_EXEC_THREADS=4 and --gtest_filter=-AppLockManager.* (the app's pool has workers and its lock manager is shared, which the AppLockManager cases assert is single), and state_lifetime_stress_test (PIN-1). - A leg's matrix may give some of its C++ binaries their own variables and options: `cxx_runs`, one line a binary, `<name>: [VAR=VALUE ...] [--option ...]`, read by run.sh as SAN_CXX_RUNS. A --gtest_filter there gets *Stress* added to its negative patterns; a line naming a binary the leg does not run is an error. Every other binary, and every binary of the gcc legs, runs as before. - SAN_REQUIRED_S1B, appended to every leg's required lines as SAN_REQUIRED_S1A is: the Ariadne cases of section 4 (IS-1b, AR-1, AR-2, AR-3, AR-3b, SP-1, EL-1, FF-3's init lane), HZ-8 (moved from the gcc legs' own lists, so each leg has one copy) and PIN-1's two. AR-3b is thus required in both TSan legs. The lead appends A's, I's and U's unit tests as they merge. - The job's header comment, the matrix comment and docs/TESTING.md's sanitizer section say so. The 180-minute job timeout is unchanged: the gcc tsan leg ran ariadne_runtime_test in 24 s of a 23-minute job on master 7a09366, and the clang leg took 23 minutes on 08fd204 before these two binaries.
S1.9 split AppRuntime's one provider into four by kind, which changed which table wins when two bind one name: a host function lost to (quit), a data-* verb and an async verb it used to override, and an async verb overrode a data-* verb it used to lose to. The provider is now six, registered in the order the one provider bound them at 1407da0, the later winning: the host's sync verbs (host_only), (quit) (host_proxied), the async verbs (any), the data-* verbs (host_proxied), the host's functions (host_only) and its async functions (host_only). So in group 0 every collision resolves as it did; an `any` group installs them in the same order, by kind. Test: AriadneHostVerbs.ANameTwoTablesBindResolvesInTheirOrder pins the winner of each of the 14 pairs of tables that can share a name. It passes with 1407da0's app_runtime.cpp (the one provider) and with this commit; with S1.9's four providers it fails on quit/function, async verb/data verb, async verb/function and data verb/function.
The eligibility scan (S1-Q6) read only the programs the Runtime holds, so a document whose init: alone called oidc-* (or named a '/' channel) was isolated. AppRuntime::load runs init: itself and keeps tests: for run_program; it now hands both to the Runtime with the new Runtime::set_document_programs, before set_root, and the scan reads them with the document's own. Test: AriadneIsolatedDocs.AnInitThatUsesOidcKeepsTheDocumentInGroupZero: a document whose init: calls oidc-sign-in stays in group 0 with the oidc reason, beside the same document with a plain init:, which is isolated. It fails without the hand-over (the document is isolated).
…s init: and tests:
Under CVC_EXEC_FORCE_MOVE a pump_all's caller may not take a group it pumped last, so it hands the call to the workers and waits on the call. A worker that reached the call past its deadline skipped the groups in take_group and notified no one, and the caller waited for ever: exec_pump_frame and an isolated Ariadne document's drain hung when a worker woke late (a loaded machine, TSan). R1b-mid found it; it explains the hang seen once in AriadneIsolatedDocs.ProvidersAreInstalledByTheirKind, and it reproduced under load in a repeat run of the isolation cases. take_group now notifies the call when it skips its groups, and the caller waits no longer than the deadline (in slices of at most a second, so a time_point::max() deadline never reaches wait_until) and then skips them itself. ExecPool.AForceMovedCallEndsAtItsDeadline keeps the pool's one worker in another caller's group past a 50 ms deadline: it failed (the caller still waiting after 10 s) and passes.
…latch (R1b-mid) R1b-mid's fixes for K's Stage 1b cases (S-M1, s-m6, s-m7), in ariadne_runtime_test.cpp's Stage 1b section: - S-M1: AR-3b runs with CVC_EXEC_FORCE_MOVE, so the document's one group, which plain drain() otherwise pumps on the caller every frame, is pumped on workers too. It asserts that workers pumped (exec_pool_worker_pumps_total moves) and that an `any` probe in the action ran on a thread other than the frame thread, which is what the TSan legs need of it. The action now parks with its stream open while a producer thread posts a seq on it (stream::post_seq, found with document_stream); the resident in the group receives it, beside the live and closed posts. IS-1b takes the same knob and asserts a worker pumped its group. - s-m6: AR-3's comment says its render check cannot fail (the test calls render() between pumps) and that the latch is render's debug-build assertion, which Release builds compile out. - s-m7: EL-1 gains a strict document with (msg-send "/x" ...) in a widget's on_click, which the load's lint does not read: it stays in group 0, its reason naming "/x". Each ineligible document's reason is read from the app's log (system.log_output) and must appear there once after three more frames; a log4cplus build skips that check.
…s static / and log, AR-3's latch
…r the host (R1b-mid c-m3) A started net request kept its host's raw address, and settle_started checked cancel_requested() before host.finish(): a check, not a guard. A transport answering on a thread of its own just as an isolated document's group goes (its host dies with the Runtime) could pass the check, then call finish() on the freed host and post to the freed scheduler. async_host::finisher (make_finisher()) holds the host's shared state. Its finish() posts a settled call as finish() does, but under the state's lock and only while the host has not begun to shut down: shutdown() sets `stopped` under that lock, so a post under way ends before the shutdown goes on, and one that comes later touches neither the host nor its scheduler (the shutdown cancelled the call). http_work and uri_fetch_work keep the finisher instead of the host. finish() is unchanged. Test: AsyncCalls.AStartedCallsFinisherPostsOnlyWhileItsHostIsUp. Answered from another thread while the host is up, the call resumes its process; settled and finished from another thread after the host is destroyed, nothing is posted (the scheduler's ingress count does not move). The race itself cannot be made to fail deterministically: the window lies between the transport's cancel_requested() check and its finish, where no code the test controls runs, and the old outcome is a use of a freed host, not an observable result.
CurlWsConnection::send_frame took the easy handle's lock per chunk and continued a partly sent frame after releasing it. libcurl takes a large message in pieces and continues a partly sent frame with the next send's bytes, so two threads sending on one connection (ws-send from two documents pumped on two workers, or a close beside a send) interleaved their messages on the wire. A send mutex is now held across the whole frame; the handle's lock is still taken per chunk, so the reader goes on receiving between them. Test: NetWsClient.TwoThreadsSendingOnOneConnectionSendWholeMessages sends two 4 MiB messages from two threads on one connection while the local server holds off reading, and checks both sends succeed and each message arrives whole. Without the mutex it fails every run (one send fails and the server receives one message).
… and whole WebSocket frames
R1b-mid S-M2. A write under a document emits childChanged on every ancestor, so a render-thread subscriber connected at an ancestor of the document's prefix runs on whichever thread writes. The isolation rules matched a declared prefix only at or under the document's, leaving such a document `any` and its subscriber on workers. A declared prefix at, above or under the document's prefix (or the empty one, the root) now makes its group host. app_runtime.h's declaration comment says so. Test: AriadneIsolatedDocs.AThreadAffinePrefixAboveTheDocumentMakesItHost (probe PC): scene.doc isolated under CVC_EXEC_FORCE_MOVE at 2 workers, "scene" declared and a slot connected on its childChanged; the group is host and the slot runs only on the frame thread. Without the fix: the group is any and the slot runs off the frame thread.
R1b-mid s-m1 (S1-Q8). stop_resident killed the resident and forgot it, so a resident stopped by a reload's set_*_program or by a mount reconcile stayed in group 0 as a killed record for the app's life: neither the sweep nor teardown knew its pid. It is now killed and reaped at once (its forks keep their own context). ariadne.h's set_tick_program comment says so. Test: AriadneHazards.AResidentAReloadStopsIsReaped (probe PB): a tick resident, a second set_tick_program, then teardown; group 0 holds only the new resident before teardown and nothing after. Without the fix: the stopped resident's killed record is left (2 processes, then 1).
…erf/threaded-s1b #925 starts ws-open's connect and ws-recv's wait where the transport does not block (the browser without threads), and their callbacks settle the call. Its start paths kept the async_host by reference and posted through it; here they take the host's finisher (host.make_finisher()) and settle_started through it, as http_work and uri_fetch_work do: the callbacks answer later, and an isolated document's group's host may be gone by then. - net_intrinsics.cpp: the conflict kept this branch's providers by kind; have_ws takes master's NetAccess::ws. The any provider's comment says a host's own WebSocket transport must be as thread-safe as the compiled backend. - ariadne_runtime_test: both sides' new L4 cases are kept, plus AStartedWebSocketCallKeepsTheHostItStartedOn, the WebSocket twin of AStartedRequestKeepsTheHostItStartedOn.
The two conflicts were include lines. ariadne.cpp keeps this branch's requires.h and stream_intrinsics.h and adds #1180's rich_text.h. ariadne_runtime_test.cpp keeps stream/stream.h and adds rich_text.h. #1180's rich text reads its runs and fires on_link through the Runtime's existing reactive evaluation and handler queue, so it follows this branch's group routing as it is; its last-good runs are a per-Runtime map.
#1203 (no singletons) moved the URI registry, the HTTP client and options provider, the HTTP cache's in-flight table, the net and OIDC hosts, the WebSocket table and open-url's clock onto each app. This branch had changed the same code for threads. The merge keeps both: - uri.h/uri.cpp: register_uri_handler and resolve take the app (#1203) and keep this branch's UriCancelled and UriLocalHandler; the http(s) handlers and the HTTP cache pass the request's cancel predicate through to the app's client. - net_intrinsics.cpp: the providers stay by kind with each call on the calling program's host (ictx.host) and its finisher. The requests, fetch and WebSocket verbs take the app, the app's WsTable and its OpenUrlLimit (both app slots, got once at registration). open-url stays in its host_proxied provider, on the app's OpenUrlLimit instead of a clock of the provider's own. - oidc_host.cpp: the refresh sends through the app's client with the asker's cancel predicate. - ariadne.cpp: the Runtime's owner id is counted per app (#1203); has_snapshot asks the app's widget registry. - allowlist.txt: master's (76 lines); the one line this branch removed is gone there too. This branch's tests move onto the per-app APIs: the removed NetIntrinsicsGuard, L4Guard and NetHostGuard go, set_http_client and send take the app, live_groups takes the app by reference, and the worker pump counts come from the pool's stats (pool_stats::worker_pumps) where the process-wide exec_pool_worker_pumps_total() was, in the tests, mt.ariadne_docs and the docs. Also fixed: #1180's three rich-text tests called load_string without the app #1203 added.
The code merged without conflicts. Stage S's step_run, set_slice and process_table's begin_run/preempted are as on master. This branch's one change on that path is the ingress post counter (ingress_posts_for_test), taken in post_message and post_async_completion under the ingress lock, beside the ingress_pending_ flag that ends a run. A post from another thread still ends a run within one step. Two doc conflicts. STATE_EXEC_THREADED.md takes master's Stage S section. STATE_EXEC_BENCH.md takes master's Stage S gates, without its one-line placeholder for S1b, whose gates this branch describes just above.
…#1222-#1225, #1229) Master's #1190 (file-pick and http-upload) was written for a single async host; this branch runs an isolated document's programs on its own group's host, on a pool worker in an `any` group. - net_intrinsics.cpp: StartedRequest takes master's deliver()/on_outcome, settling through the host's finisher. http-upload is its own provider, `any` as the requests are: it parks on the calling program's host (ictx.host), takes its progress path from ictx.root_path (no tree walk on a worker), and a started upload (a browser page) keeps the host's finisher, not the host. - ariadne.cpp: file-pick, file-info and file-forget bind into the program's env as they are, in every group (install_backend_verbs), not through the backend verbs' host_proxied wrapper, which cannot park an async verb. file-pick parks on the program's own host, claims the Runtime's picker hub under its lock where it is called, and opens the picker on the host thread (exec_pool::run_on_host; inline when called there). Its answer goes through the host's finisher, as the host may be gone by then. - ci.yml: the sanitizer list keeps this branch's tests and master's point_classes_test. - STATE_EXEC_THREADED.md: rows for http-upload, the file verbs, and the contours and point-classes providers. The last two are registered without a kind, so they are host_only, and an isolated document in an app that installs them goes to a host-affinity group. - New test: AriadneIsolatedDocs.FilePickOpensItsPickerOnTheFramesThread.
Master's #1217 keeps nothing per thread in state_exec: a native's context (call_args::context()) carries its group, registry and stream, async_host::call and begin_external take it, and the pool drops in_pump_all() and the one-argument run_on_host. - async_host.h: begin_external takes the context, as on master, and keeps this branch's note that a call is finished through the host it was made on. - script_engine.cpp: the sliced form finds the calling program's group from the call's context (exec_group::current(ctx)), else group 0, and reads its data step from the context. - ariadne.cpp: file-pick opens its picker through run_on_host for the group its verbs were bound for (the env's, as its host is), and inline in group 0 and the init lane. - exec_pool: in_pump_all() is back, for the host-thread calls' debug assertion and ScriptLane::run's refusal, read from the pool's calls (their callers' and pumpers' thread ids) under its mutex rather than from thread-locals. - ariadne_runtime_test: the init lane's cycles test no longer compares against the calling thread's own registry, which master removed; it is AriadneInit.RunsAScriptThatLeavesCycles. - ci.yml: the sanitizer's required list names the test by its new name. - STATE_EXEC_THREADED.md: B29-B31 and the file-pick and sliced-call notes name the context-based calls.
- app_runtime.cpp: the constructor hands the scene its repeat: count function (#1230), then takes the verb table's lock as before. - e2ee_intrinsics.cpp (#1191): the e2ee-* provider registers its async functions on the calling program's host (*ictx.host, else the app's), as every provider on this branch does (B30), so an isolated document's e2ee-backup and e2ee-restore park on its own group. - STATE_EXEC_THREADED.md: the e2ee provider in the provider table and the file list.
- stream_intrinsics.cpp: the stream provider stays `any`, and #1236's raster verbs are a provider of their own, registered `host_proxied`: they are synchronous, raster-open and raster-publish write the raster's mirrors into the state tree raw (write_node), and one thread paints and publishes a raster, so in an `any` group they run on the host thread. Registered host_only (the default) they would have put every isolated document of an app with the stream verbs in a host-affinity group. - STATE_EXEC_THREADED.md: the raster verbs and #1171's skeleton provider in the provider table, and the file list.
…#1253, #1255, #1256, #1264, #1268, #1271, #1273, #1277) - ci.yml: the sanitizer list keeps this branch's tests (stream_test, net_ws_client_test, ariadne_host_test) and master's segmentation_intrinsics_test. - STATE_EXEC_THREADED.md: the room-call verbs (room-run is #1273's) and #1252's segment.seeded provider in the provider table, both registered without a kind. room-call's async functions stay on the app's host: a reply settles on the relay client's reader thread through host.finish, so moving them to *ictx.host needs a finisher first.
- script_engine.cpp: #1283 factors the sliced form's process lookup into calling_process, which run_as_program_work (a client's WebAssembly guest, run as its client's program) shares. The lookup keeps this branch's group: the calling process is on the group whose pump runs the call (an isolated document's), else on group 0. - STATE_EXEC_THREADED.md: notes that run_as_program_work shares the lookup.
Conflicts (includes in ariadne.h, ariadne.cpp and ariadne_runtime_test.cpp; three hunks of #1241's menubar tray in ariadne.cpp) keep both sides. #1241's code meets this branch's groups: - An action's context keeps master's scope (a quit application's actions stop) and is built by this branch's finish_context. - The notify verbs bind by kind with the backend's (install_backend_verbs is now install_host_verbs): host_proxied in an `any` group, as cvc::notify mirrors the feed into the app's notify.* subtree raw on the caller's thread. - What they capture (scope, source, a copy of mount_names) is taken on the host thread when a context is made (NotifyScope); a spawned child, made on the thread that pumps its group, binds from its parent's copy through its spawn context instead of reading mount_names there. - quit_app kills the application's actions on current_sched() (the document's group), not only on group 0 when this Runtime used it. - drain_begin runs builtin_event before the handler seam, through this branch's `m`. Tests: AriadneIsolatedDocs.TheNotifyVerbsRunOnTheFramesThread (the feed is written on the frame's thread while a worker pumps the program; a spawned child posts as its parent's scope) and AriadneIsolatedDocs.QuitKillsALoadedDocumentsActionsInItsGroup. STATE_EXEC_THREADED.md: the notify verbs' row, Quit among the kills that go to the group, and the spawned child's notify scope.
…#1307) One conflict, in ariadne_runtime_test.cpp's ActionCapsAreTreeSettingsAndChargeAsyncCalls: this branch cut its loop to 20 rounds so it fit the 0.1 s time cap on Linux debug CI, and master (#1282) rewrote the test, raising the time cap to 30 s wherever the loop must finish. Master's fix covers the same flake, so the test is master's as it stands, 200 rounds again. tools/singleton_scan is master's (#1276); the auto-merged net, CI, test and doc files keep both sides.
…#1305, #1310, #1311) #1305 gives each Runtime program-lane providers of its own (add_program_intrinsics), so two documents on one app no longer reach each other's verbs and host functions, and moves AppRuntime's provider there from the app's list. This branch had split that provider in seven, each registered on the app with its kind (S1-Q7). Conflicts in ariadne.h, app_runtime.cpp and ariadne.cpp keep both: - Runtime::add_program_intrinsics takes a kind too (the form without one is host_only, as register_action_intrinsics's), and the Runtime's own list keeps it. AppRuntime adds its seven providers there, each with the kind it had, in the same order. - install_providers runs any list by kind; the Runtime's own run after the app's, by the same rules, wherever an env is built: an action, a resident, a spawned child (finish_context), the names probe, and init: and a module's init: (every kind as it is, on their own thread). - host_only_bindings counts the Runtime's own host_only providers, so one that binds anything pumps the document's group on the host thread, as an app provider does. - add_program_intrinsics marks the placement stale, as a late host verb does. - The own list is read where an env is built, a spawned child's on its pumping worker, so it is under a mutex of its own (own_mutex), copied, and run unlocked; names_mutex no longer guards it. STATE_EXEC_THREADED.md: the Runtime's own providers, AppRuntime's seven among them, and the fourth late-registration path. Built locally (MSVC Release; AB.lock held the box, so the suites were not run here); a test of the own providers by kind follows.
One conflict, in ci.yml's SAN_CXX_TESTS: this branch added stream_test, net_ws_client_test and ariadne_host_test to the sanitizer legs' list, and #1292 added gradient_vector_diffusion_test, critical_points_test and seed_generators_test (reflowing the lines). Kept both. ci.yml's line 1271 (the arigl-web path filter's files.h/files.cpp line) also goes back to master's bytes: master stores ci.yml with CRLF but that one line LF-only, and an earlier merge here had given it a CR, a whitespace-only change in this PR's diff.
AriadneIsolatedDocs.ARuntimesOwnProvidersInstallByKind covers what the #1305 merge (dc4f36d) gave Runtime::add_program_intrinsics: a kind, run by the same rules as the app's providers. In an isolated document's group, forced to move between threads (CVC_EXEC_FORCE_MOVE), an own `any` provider binds on the worker and an own host_proxied one runs only on the frame's thread; the group stays `any`. On a second Runtime of the same app, an own provider with no kind (host_only) that binds a function gives that document's group `host`. Each Runtime's has_function sees only its own providers' names.
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.
Threaded execution Stage 1b: Ariadne's half of Stage 1. Providers post on their caller's host and group, there is one pump per frame, documents can run in groups of their own (opt-in), and the subscriber audit is done. The plan is
state-exec-perf/threaded-impl/S1.mdin the workstreams tracker (S1.9-S1.11, S1.14-S1.16; decisions S1-Q1..S1-Q12). Stage 1a (groups, the pool, pycvc'sExecPool) merged as 95b52d5.The A/B ran in a quiet window on 2026-11-12, and Joe accepted it as recorded (see Gates). All three reviews are done (see Reviews).
What it adds
ictx.host: actions and spawned children, the init lane's inline host (charged to init's process, S1-Q2) and the probe's.stream_params::scheduler), net completions.provider_affinity:any,host_proxied,host_only):clipboard-set,fullscreen), ashost_proxied.host_proxiedprovider's natives go throughexec_group::install. Ahost_onlyname is aNameErrorin ananygroup.Runtime/AppRuntime::drain_begin()anddrain_end()sit aroundapp::exec_pump_frame();drain()is both.set_*_program,post_input,post_signal) are asserted outside a pump in debug builds.ariadne.exec.isolate_documents, off by default; S1-Q6).isolation_reason().host_onlynative, or a thread-affine prefix at, above or under the document, makes its group's affinityhost. Prefixes are declared throughAppRuntime::declare_thread_affine_prefix; AriRuntime declares its scene prefix.set_root, a lane's program, the channel policy, the key bindings or a declaration;AppRuntime::idle()andwait_idle()count the document's group and any retired group, and decide nothing.spawn_childfrom the parent's context.uri_stateand streampin_vectors, debug home-thread asserts, and the declarations. The audit table is inSTATE_EXEC_THREADED.md4.8.async_host::shutdownruns cancel hooks outside its lock.HttpRequest::cancelled,cvc::net::HttpCancelScope).CVC_EXEC_FORCE_MOVEa caller waits no longer than its deadline. This was an S1a hang: a worker that skipped a call past its deadline told no one.mt.ariadne_docs(docs 1/2/4/8 x t 0..8 x heavy/small frames). Its small-frames gate ("no helper wake") judges only points that can wake a helper, marks the othersn/a, fails vacuous points, and gates a heavy-frame worker-pump control in the same run.ariadne_runtime_test(CVC_EXEC_THREADS=4) andstate_lifetime_stress_test.stream_testandnet_ws_client_testrun in every leg, andariadne_host_testin the gcc legs.STATE_EXEC_THREADED.md's Ariadne half: 4.6, 4.8, 4.9, 4.12, 4.17, 5, 7, 8, 9.2;ARIADNE.md: documents in groups of their own, one pump per frame, adding verbs by kind; the stale line citations are now function names;APP_API.md's "Ariadne hosts and the frame pump";STATE_EXEC_EXCEPTIONS.md3.12 (the finisher);AriAppand the GIL).Behaviour changes with no host opting in
With the setting off and no host calling
exec_pump_frame, every document runs in group 0 as before, apart from these:init:calls an async verb; this was rechecked at this head.post_inputandpost_signalare host-thread calls (asserted in debug builds). Every shipped caller already calls them from its frame thread.init:async calls, which are now charged.Tests
New cases:
ariadne_runtime_test:ariadne_host_test,stream_test,state_exec_async_calls_test,net_ws_client_test,net_http_client_test,exec_pool_testandstate_lifetime_stress_test.Windows MSVC Release at 5b5c990 (master merged), all passing. At acb049b, after master's ariadne: the script_engine interface (P1b), with Python moved onto it #1091, ariadne: WebAssembly guests natively on wasmtime (G1, first part) #1093 and ariadne: guests' ari_init at load, and guest calls from init: (G1, second part) #1094, these were rerun:
ariadne_runtime_test298,ariadne_host_test48,ariadne_loader_test223,ariadne_server_document_test10,state_exec_groups_test28,exec_pool_test34,ariadne_script_engine_test24,ariadne_requires_test18 andstate_exec_async_calls_test75. At 2dc340b, after master's Ariadne: the read lane keeps its results until what they read is written #1084 and ariadne: wasm guests reach host objects by handle, and MemoryError (G1, third part) #1099, these were rerun:ariadne_runtime_test298,ariadne_script_engine_test24 (×3),ariadne_loader_test223,ariadne_media_test55 (×3; master's read-lane cache tests),ariadne_requires_test18,ariadne_data_test14,ariadne_host_test48 andariadne_bind_test19. At da0ba6a, after master's ariadne: an exported call from a program is the program's own sliced work (G1, fourth part) #1105 and ariadne: built-in sim.step and sim.restart (L0, last part: step and restart) #1097:ariadne_script_engine_test26 (×3),ariadne_runtime_test298,ariadne_loader_test224,ariadne_media_test55,ariadne_requires_test18,ariadne_host_test48,ariadne_scene_world_test10,ariadne_server_document_test10,state_exec_async_calls_test75,state_exec_groups_test28 andexec_pool_test34. At f7f5ba4, after master's ariadne: an instance is waited for through the lock manager, and RecursionError (G1, sixth part) #1126 and state_exec: a run's step budget counts what each pick charged (G1, fifth part) #1117:ariadne_script_engine_test28 (×3),ariadne_runtime_test298,ariadne_host_test48,ariadne_loader_test224,ariadne_server_document_test10,state_exec_async_test107,state_exec_async_calls_test75,state_exec_exceptions_test26,state_exec_data_steps_test54,state_exec_locks_test215,state_exec_priority_test40,state_exec_groups_test28 andexec_pool_test33 (FailedGroupsOfAReusedThreadIdskipped: Windows reused no thread id in 5,000 threads that run). At 1516bb8, after master's ariadne: the key, pointer, signal and message hooks (G1, seventh part) #1129 and ariadne: world_source and world_physics, the lab's world panels (L1) #1123:ariadne_script_engine_test34 (×3),ariadne_runtime_test298,ariadne_host_test48,ariadne_loader_test226 (2 of ariadne: world_source and world_physics, the lab's world panels (L1) #1123's skipped: no json-schema-validator in this build),ariadne_server_document_test10,state_exec_groups_test28 andexec_pool_test33. The rest were not rerun there, andariadne_wasm_testneeds wasmtime, which this build lacks. The table is the 5b5c990 run:ariadne_runtime_testariadne_host_testariadne_loader_testariadne_server_document_teststate_exec_groups_testexec_pool_testFailedGroupsOfAReusedThreadIdskipped (no thread id was reused this run)state_lifetime_stress_teststream_testariadne_stream_view_teststate_exec_async_calls_teststate_exec_async_testnet_ws_client_testnet_http_client_test_threads_autoCTest entriesThe bench smoke passes, the tool's self-tests pass (38), and clang-format against the base is clean.
The master merges:
anygroup they bind ashost_proxied;AriadneIsolatedDocs.TheBackendsVerbsRunOnTheFramesThreadchecks that. Master's headless scene world steps indrain_end, after the pump, and subscribes to nothing.Runtime::start_process):start_processsubmits to the document's scheduler. Master's version executed on group 0.AppRuntime::use_script_enginedeclares the newRuntime::require_host_thread, which gives it a host-affinity group under the late-registration rule.start_processrefuses a process with natives of its own while the document still runs in ananygroup.ScriptLane::stopandrunningreach the document's group.ScriptEngineTest.AnIsolatedDocumentThatUsesAnEngineRunsOnTheHostThread(it failed on the plain merge) andAProcessWithNativesIsRefusedInAWorkersGroup.ScriptLane::export_activationuses:host_only, on the calling program's own host.async_host::starting()). Master's version used group 0's host. For an isolated document's call that drops the call from the wrong host's list.start_processruns from the calling step, so it has noassert_outside_pump.ScriptEngineTest.AnIsolatedDocumentsExportedCallFinishesOnItsGroupandAsyncCalls.AStartSeesTheHostItWasMadeOn.init:(ariadne: guests' ari_init at load, and guest calls from init: (G1, second part) #1094) add a blocking form of an async work function, for a program that can't park, andScriptLane::run/Runtime::pump, which run an activation to its end outside the frame loop (a guest'sari_initat load, an exported call frominit:):parking_scheduler()is null:init:'s inline host, S1-Q2). Master testedictx.schedagainst group 0's scheduler, which would give an isolated document's actions the blocking form; thererunwould refuse the call from inside a step.Runtime::pumpisdrain_end's pump and sweep: group 0 asscheduler_to_pumpsays, and the document's group through the app's pool.runrefuses inside a step of either scheduler, or inside a frame'spump_all.ari_initorinit:call places the document before its channels are known, and the load then decides again.ScriptEngineTest.AnIsolatedDocumentsInitCallRunsInItsGroup, where an isolated document'sinit:calls an export at a first load (group 0) and at a reload (its group). With a group-0-only pump it fails: the reload's call runs past 30 s.(name ...)from a program that parks runs the activation as that program's own data job, a slice per data step of its process (da0ba6a):ictx.schedwith group 0's scheduler.exec_group::current()), else on group 0. Master looked only on group 0, where an isolated document's call found no process and raised RuntimeError.ScriptEngineTest.AnIsolatedDocumentsExportedCallFinishesOnItsGroupnow covers both forms.(name ...)steps in the program's process on the group, and(name-async ...)is the parked form finishing through the group's host. With master's group-0 lookup it fails with that RuntimeError.ariadne.h/.cppand the script-engine test, and both sides were kept:post_inputandpost_signalalso queue each event for the new event tap. They stay host-thread calls outside a pump, and post to the document's scheduler when a resident takes the event. The tap is set on the host thread.drain_begin, after the input residents and before thehas?snapshot, so what they start runs in the frame's pump.require_host_thread). So the hook queues need no locking.CameraController.cppmerged without a conflict but didn't compile: terrain_lab: step the new world into the scene, Orbit keys and Reset view, panel limits and tooltips #1124'sImpl::home(the Reset view box) and this branch'sImpl::home(the render thread's id for the 4.8 check) collided. 17916c7 renames the thread idrenderThread. The local build has cvcGL off, so it was checked with an MSVC syntax-only compile (asserts on): the 1516bb8 file fails with C2040, as CI's gcc and clang did, and the fixed one passes.package-linux / libcvc-release-grpc) first ran on this branch at 17916c7, and found 13 objects not ontools/singleton_scan/allowlist.txtand 3 stale lines. 0e3835e:Verbs::mutex). The providers' bodies hold the table by itsshared_ptr, so the mutex outlives the AppRuntime with them.t_starting(async_host),t_cancel_scope(http_client) andt_writingPose(GraphicsNode), each set and restored by an object on the stack. It also lists open-url's rate limit, the same object in its new functionregister_open_url.script_engine.cpp, and cvc::world: water_bodies, the sea, lakes and ponds and the shore grid (O1) #1109's thread-local EDT/SDF scratch.singleton-scan-libcvcartifact from that run, less the mutex. Rerun after the move:ariadne_script_engine_test34 (×3),ariadne_runtime_test298,ariadne_host_test48,ariadne_loader_test226,ariadne_server_document_test10,state_exec_async_calls_test75;_pycvc.pydbuilds.package-macos / libcvc-debugfailed at 0e3835e on two of ariadne: the key, pointer, signal and message hooks (G1, seventh part) #1129's hook tests, the first macOS run of them (ariadne: the key, pointer, signal and message hooks (G1, seventh part) #1129's own macOS jobs were cancelled before they ran).AKeyHookTakesEveryKeyInOrdersaw 4 outcomes for 3 keys andAFailedEventLetsTheNextOneGo3 for 2, on every retry. afcfc49:ScriptLane::take_queuemovedon_doneout of the delivery's options and then started the delivery with them. libc++ leaves a moved-fromstd::functionthat held a small callable still set, sostart()made it the process'sdoneas well, and the delivery's end came through as one more ok outcome. libstdc++ and MSVC empty the source, so Linux and Windows never showed it.std::exchange, which leaves the options'on_doneempty everywhere.ariadne_script_engine_test34 (×3) andariadne_runtime_test298 pass on Windows, where the tests passed before too, so the macOS rerun is what verifies it.cvcgl_lowmem_fastdrawfailed its first try in the same job and passed on retry, as before.allowmerged cleanly into start_process. STATE_EXEC_THREADED.md now lists the room-call verbs and segment.seeded, both registered without a kind. room-call's async functions stay on the app's host: a reply settles on the relay client's reader thread through host.finish, so moving them to *ictx.host needs a finisher first. MSVC Release, locally at aaf7aae: segmentation_intrinsics_test 9, ariadne_server_document_test 15, room_intrinsics_test 16, ariadne_runtime_test 319, ariadne_loader_test 238 (2 skipped), ariadne_host_test 49 (12 skipped), ariadne_script_engine_test 35.anygroup. (2) What they capture (scope, source, a copy of mount_names) is a NotifyScope taken on the host thread when a context is made; a spawned child, made on the thread that pumps its group, binds from its parent's copy through its spawn context instead of reading mount_names there. (3) quit_app kills an application's actions on current_sched() (the document's group), not only on group 0. New tests: AriadneIsolatedDocs.TheNotifyVerbsRunOnTheFramesThread and AriadneIsolatedDocs.QuitKillsALoadedDocumentsActionsInItsGroup. STATE_EXEC_THREADED.md has the notify verbs' provider row, Quit among the kills that go to the group, and the spawned child's notify scope. MSVC Release, locally: ariadne_runtime_test 340, ariadne_script_engine_test 35, ariadne_server_document_test 20, ariadne_loader_test 240 (2 skipped), ariadne_host_test 49 (12 skipped), room_intrinsics_test 16, result_job_test 19, state_exec_groups_test 28; ariadne_ftxui_test skips all 110 here, so CI covers it.AriadneAsyncFn.ActionCapsAreTreeSettingsAndChargeAsyncCalls: eebb1fe cut its loop to 20 rounds to fit the 0.1 s time cap on Linux debug CI, and state_exec async test: SL-7 times the sleeper from just before a warm sleep #1282 rewrote the test, raising the time cap to 30 s wherever the loop must finish. That fixes the same flake, so the test is master's as it stands (200 rounds again).tools/singleton_scan(allowlist included) is master's. MSVC Release, locally: ariadne_runtime_test 340, ariadne_host_test 50 (12 skipped), ariadne_loader_test 241 (2 skipped), ariadne_script_engine_test 35, state_exec_locks_test 217, state_exec_async_test 125, state_exec_groups_test 28, multi_app_integration_test 5, net_ws_client_test 12, stream_test 37; AriadneAsyncFn.* x3 with CVC_EXEC_THREADS=auto and x3 with CVC_EXEC_SLICE_STEPS=256. CI on afd914e: onlypackage-linux / libcvc-debugfailed, on a runner that ran every test 3-4x slower than state_exec async test: SL-7 times the sleeper from just before a warm sleep #1282's job (four 300 s timeouts in tests that take 93-126 s there, one of them also on docs-only docs(roadmap): the ocean roadmap's status line puts O8-O11, O15 and O17 on master #1301, and the tvision upload test), so the job was re-run; this push supersedes it.Runtime::add_program_intrinsics) and moves AppRuntime's provider there from the app's list; this branch had split it in seven, each on the app with its kind. Conflicts in ariadne.h, app_runtime.cpp and ariadne.cpp keep both:add_program_intrinsicstakes a kind too (none:host_only), AppRuntime adds its seven there with their kinds in the same order,install_providersruns the Runtime's own after the app's by the same rules wherever an env is built (action, resident, spawned child, names probe; init: as it is),host_only_bindingscounts the Runtime's ownhost_onlyones, a new one marks the placement stale, and the own list has a mutex of its own since a spawned child reads it on its worker. STATE_EXEC_THREADED.md updated. Built locally (MSVC Release, the Ariadne targets, ari and arix_engine_test); the suites wait for the box's A/B window, and a test of the own providers by kind follows.pycvc-linux / cp312failed on master's own arisrvx break (P0a: the last process state we control goes onto the app; the allowlist ends at the settled list #1276 and Bridged users: another chat system's users in a conference room #1302 crossed: five bridge ops calledserver_link()withoutself), fixed on master by ariadne_python: the bridge ops pass self to server_link (master's arisrvx build) #1328;package-linux / libcvc-debugtimed out in the segmentation action test and cvcgl_ariadne_realize on a runner 3.2x slower than usual (CPU-heavy families 4-5.5x, I/O-bound ones 1x; feat/arisrv-identity's run, without this branch, showed the same profile and the same timeout). tests: the segmentation action test gets 900 s on slow Debug runners #1319 has since given the segmentation test 900 s.anyprovider binds on the worker, an own host_proxied one runs only on the frame's thread with the group stayingany, an own host_only one that binds gives its document's grouphost), and each Runtime's has_function sees only its own. ariadne_runtime_test 341 passed, with ariadne_host_test, ariadne_script_engine_test, ariadne_loader_test, ariadne_server_document_test, multi_app_integration_test, room_intrinsics_test, state_exec_groups_test and arix_engine_test, at both c7735de and ebfaf55.any, and Ariadne: live textures, a raster stream on any node, uploaded a rectangle at a time (§5.4) #1236's raster verbs are a provider of their own, registeredhost_proxied(synchronous; raster-open and raster-publish write the raster's mirrors into the tree raw, and one thread paints and publishes a raster). Registered host_only, the default, they would have put every isolated document of an app with the stream verbs in a host-affinity group. STATE_EXEC_THREADED.md lists the raster and skeleton providers. MSVC Release, locally at 51a3a68: stream_raster_test 6, stream_test 37, ariadne_runtime_test 319, ariadne_loader_test 238 (2 skipped), ariadne_host_test 49 (12 skipped), ariadne_files_test 13 (2 skipped), ariadne_script_engine_test 35.call_args::context()) carries its group, registry and stream;async_host::callandbegin_externaltake it; the pool dropsin_pump_all()and the one-argumentrun_on_host. Here: the sliced script call finds its program's group from the call's context (exec_group::current(ctx));file-pickopens its picker throughrun_on_hostfor the group its verbs were bound for (inline in group 0 and the init lane);exec_pool::in_pump_all()is back for the host-thread calls' debug assertion andScriptLane::run's refusal, read from the pool's calls (callers' and pumpers' thread ids) under its mutex, not from thread-locals. The init lane's cycles test no longer compares against the calling thread's own registry, which master removed: it isAriadneInit.RunsAScriptThatLeavesCycles(and so in the sanitizer's required list). MSVC Release, locally: ariadne_runtime_test 316, ariadne_files_test 13 (2 skipped), ariadne_host_test 49 (12 skipped), ariadne_loader_test 230 (2 skipped), ariadne_script_engine_test 35, net_http_client_test 14, net_ws_client_test 12, stream_test 37, state_exec_async_test 125, state_exec_async_calls_test 75, state_exec_groups_test 28, state_exec_types_test 43, exec_pool_test 37, thread_pool_test 17, multi_app_integration_test 4, state_exec_locks_test 215, state_lifetime_stress_test 18; at slice 256 runtime 316, async 125, files 13, script engine 35; the isolated-docs, init and frames tests (28) 20 times in a row. git-clang-format against master changes nothing; the allowlist is master's.anygroup.http-uploadis a provider of its own,anyas the requests are: it parks on the calling program's host (ictx.host), takes its progress path fromictx.root_path, and a started upload keeps the host's finisher.file-pick,file-infoandfile-forgetbind into the env as they are in every group, not through the backend verbs' host_proxied wrapper (which cannot park an async verb):file-pickparks on the program's own host, claims the Runtime's picker hub under its lock where it is called, opens the picker on the host thread (exec_pool::run_on_host), and answers through the host's finisher. New test:AriadneIsolatedDocs.FilePickOpensItsPickerOnTheFramesThread.STATE_EXEC_THREADED.md's provider table gains http-upload, the file verbs, and the contours and point-classes providers, which are registered without a kind (host_only), so an isolated document in an app that installs them goes to a host-affinity group. Local, MSVC Release:ariadne_runtime_test316 (the new test passes 50 runs in a row, its picks starting on 2 threads),ariadne_files_test13 (2 skipped: the FTXUI and Turbo Vision pickers),ariadne_loader_test229,ariadne_host_test49 (12 skipped),ariadne_script_engine_test35,net_http_client_test14,state_exec_async_test125,state_exec_async_calls_test75,exec_pool_test35;ariadne_runtime_test,state_exec_async_testandariadne_files_testalso atCVC_EXEC_SLICE_STEPS=256; git-clang-format against master changes nothing, and the ratchet passes.step_run,set_sliceandprocess_table'sbegin_run/preemptedare master's, and this branch's one change on that path is the ingress post counter, taken under the ingress lock beside theingress_pending_flag that ends a run, so a post from another thread still ends a run within one step.STATE_EXEC_THREADED.mdtakes master's Stage S section andSTATE_EXEC_BENCH.mdits Stage S gates (without its placeholder line for S1b). Local, MSVC Release: see the next entry's suites, plusariadne_runtime_testandstate_exec_async_testatCVC_EXEC_SLICE_STEPS=256(the new*_slice256CTest variants), and the bench tool's 53 Python tests.register_uri_handlerandresolvetake the app and keepUriCancelled/UriLocalHandler; the http(s) handlers, the HTTP cache and the OIDC refresh pass the caller's cancel predicate to the app's client;net_intrinsics.cppkeeps the providers by kind onictx.hostand its finisher, with the requests, fetch and WebSocket verbs taking the app, itsWsTableand itsOpenUrlLimit(app slots, got once at registration), andopen-urlstays host_proxied on the app'sOpenUrlLimit. The allowlist is master's 76 lines (the one line this branch removed is gone there too). This branch's tests move onto the per-app APIs: the removedNetIntrinsicsGuard,L4GuardandNetHostGuardgo,set_http_client/sendtake the app,live_groupstakes it by reference, and worker pumps come frompool_stats::worker_pumpswhere the process-wideexec_pool_worker_pumps_total()was (tests,mt.ariadne_docs, docs). Also fixed: Ariadne: rich text, runs: on a text: with links (§5.20) #1180's three rich-text tests calledload_stringwithout the app No singletons: libcvc's process-wide state per app, per object or gone [4.0, breaking] #1203 added, which breaks master's ownariadne_runtime_testbuild. Local, MSVC Release:ariadne_runtime_test315,ariadne_loader_test228,ariadne_script_engine_test35,ariadne_host_test49 (12 skipped without FTXUI),net_http_client_test14,net_ws_client_test12,stream_test37,state_exec_async_calls_test75,exec_pool_test35,state_lifetime_stress_test18,state_exec_groups_test28; git-clang-format against master changes nothing, and the ratchet passes.ariadne.cppkeeps this branch'srequires.handstream_intrinsics.hand adds Ariadne: rich text, runs: on a text: with links (§5.20) #1180'srich_text.h, andariadne_runtime_test.cppkeepsstream/stream.hand addsrich_text.h. Ariadne: rich text, runs: on a text: with links (§5.20) #1180's rich text reads its runs and fireson_linkthrough the Runtime's existing reactive evaluation and handler queue, so it follows this branch's group routing unchanged; its last-good runs are a per-Runtime map. Local, MSVC Release:ariadne_runtime_test315,ariadne_host_test49 (12 skipped without FTXUI). git-clang-format against master changes nothing, and the ratchet passes.SAN_CXX_TESTSlist inci.yml: this branch'sstream_test,net_ws_client_testandariadne_host_testand P1 part 2: the VolumeRover Skeletonization port on cvc::tet_complex #1167'sskeleton_testare all kept.CameraController.cppmerged cleanly with this branch's render-thread assert. Local, MSVC Release:ariadne_runtime_test302,ariadne_host_test49 (11 skipped without FTXUI),state_exec_coordinator_test76;skeleton_testbuilds (its 10 cases skip here). The ratchet passes.ws-open's connect andws-recv's wait where the transport doesn't block (the browser without threads), and its start paths kept theasync_hostby reference and posted through it. Here they take the host's finisher andsettle_startedthrough it, ashttp_workanduri_fetch_workdo, because an isolated document's group's host may be gone when a socket answers. Innet_intrinsics.cppthe conflict kept this branch's providers by kind, with master'sNetAccess::wsinhave_ws, and theanyprovider's comment now says a host's own WebSocket transport must be as thread-safe as the compiled backend. Inariadne_runtime_testboth sides' L4 cases are kept, plus a newAStartedWebSocketCallKeepsTheHostItStartedOn. Local, MSVC Release:ariadne_runtime_test302 (all 11AriadneNetL4cases),ariadne_host_test49 (11 skipped without FTXUI),net_ws_client_test12,stream_test36. git-clang-format against master changes nothing, and the ratchet passes.cvc::tet_complex). Onlyci.yml's sanitizer test list conflicted, and it keeps this branch'sstream_test,net_ws_client_testandariadne_host_testand master'stet_complex_test. No other file changed on both sides, and P1 part 1: cvc::tet_complex, an exact incremental Delaunay (and the Qhull decision) #1157 touches only geometry, so it wasn't rebuilt here. The YAML parses, and the allowlist ratchet passes.docs/ARIADNE.mdconflicted: master's--exec-policyparagraph is kept, with this branch'sAppRuntime::loadadded to the calls that build the scheduler. ariadne: --exec-policy, and pure exports on the read lane (G1, tenth part) #1178's read functions (pure exports on the read lane) run inline in the reactive engine's eval and don't go through providers or pumps. Local, Windows MSVC Release:ariadne_runtime_test299,ariadne_host_test49 (11 skipped without FTXUI),ariadne_script_engine_test34,ariadne_loader_test228. git-clang-format against master changes nothing, and the allowlist ratchet passes.ariadne_wasm_testisn't in the Windows tree, so CI runs it.sea_surface::source'sthread_local, the one symbol release-grpc's singleton scan flagged at b929ce4. The ratchet against master's allowlist passes: the allowlist gained no line. The merge touches no state_exec or Ariadne code, so the local runs at b929ce4 (contour stack 22, Ariadne host 48, Ariadne runtime 298) still cover this branch's changes. CI verifies the rest.static, so the allowlist ratchet (ci: the writable-data allowlist only shrinks; third-party statics left out #1152) passes. This branch moved (open-url) intoregister_open_url, which renamed the static's allowlist line, and the ratchet counts a renamed line as an added one. The clock is now the app's:register_net_intrinsicsmakes it and its host_proxied provider hands it to each program's (open-url), so the one-a-second limit still covers every program the app builds. Against master, the allowlist only loses that line. b929ce4 merges master b745ea6 (ci: the writable-data allowlist only shrinks; third-party statics left out #1152, ports P0d, part 1: cvc::contour_stack, its formats on each app, contours.* and pycvc #1156, Demo pages fit a phone; iOS: byte voxels, a nearest shadow map; ?gldiag and ?nofloatlinear #1166). Onlyci.yml's sanitizer test list conflicted, and it keeps both sides' tests. Neither commit was built here, because the A/B window holds the box, so CI verifies them. release-grpc's scan still flags master'ssea_surface::sourcethread_localuntil ocean: the caller owns the sea's source memo, not a thread_local #1181 merges.state_sync_adapter.cppconflicted, where both sides had added next to each other: arisrv: bound reads, a read scope per principal (S6) #1147'sdrop_subtreeandapply_remote'sdelete_subtreebranch, and this branch's comments on the adapter's raw lookups. Both are kept. Sync adapter 11, peer registry 21, loader 228, runtime 298 and host 48 pass, as do the threaded runtime 291 and host 48. ocean: debris in lsystem_coast; B3's source on a lattice (O7c) #1159 adds a function-localthread_localmemo insea_surface::source(master's ocean code). It is not on the allowlist, and ocean: debris in lsystem_coast; B3's source on a lattice (O7c) #1159's release-grpc scan was cancelled, so this PR's scan may flag it. It is left unchanged here, and a fix on master is proposed.app.h'scompute_asynccomment,resolve_channel_key's doc comment and CVCGL-UI-DSL-ROADMAP.md told a host to wake a parkedmsg-recvthroughexec_scheduler().post_message. For a program of an isolated document, that post stays in group 0's queue and never wakes it. They now nameictx.host->parking_scheduler()(exec_scheduler()only when it is null), as AppRuntime's done channels and the developer guide do, and point at an async function on*ictx.hostas the simpler route. The guide also states the lifetime: a move or teardown destroys the group once its host's own calls end, which do not include an untrackedcompute_asyncjob. Comments and docs only.thread_locals, which the no-singletons rule (VOLROVER-LIBRARY-PORTS-ROADMAP.md 1.3) forbids when they carry context past a function's arguments. The allowlist is back to master's counts (cvc 451, cvcGL 222):t_cancel_scope(HttpCancelScope):resolve(uri, base, cancelled)hands aUriCancelledto the scheme'sUriHandler, and the http(s) handlers, cached or not, set it on their request.CredentialRenewer::renew(rejected, cancelled)sets it on the refresh.http_kernelanduri_fetch_kernelpass their call'scancel_requested(). Handlers that send no request register aUriLocalHandler(the old two-argument form), so the state, cvc and test schemes are unchanged.t_starting(async_host::starting()): the call names its host while its start runs,async_call::starting_host().async_start's signature is unchanged.t_writingPose: a scene-less node marks its own pose write on itself, an atomic thread id claimed by compare-exchange; the echo is dropped only on that thread.GraphicsNode) and the scan run only on CI.job_intrinsics_test.cppconflicted: master's job_intrinsics_test: register and clear the providers on the app (master does not build) #1150 fixed the same pre-P0a: the action-intrinsic providers are each app's own; cvc::app::slot<T>() [4.0, breaking] #1137 calls 600c144 fixed here, keeping a guard that clears the app's providers on the way out, and the merge takes master's version. The rest (Ariadne worlds L3: spawn points, the minimap and road suggestions; the world_lab demo #1151's spawn points, macOS: libcvc links cvcpkg's libcurl, which has WebSockets #1145's macOS libcurl with WebSockets, cvcpkg: wasmtime in the arix and ariglx recipes, linked by name (G1, ninth part) #1148's wasmtime recipes, ocean: the physics band residual, M chosen; OceanFFT's scissor and Nyquist fixes (O7b) #1149's ocean band) merged cleanly; none registers a provider or adds writable process-wide state (the only new statics arevehicle_view.cpp's constant colour tables).git clang-format --diff 6059ab9ais clean. Rebuilt cvc and the tests: job_intrinsics 21, scene_world 25, loader 228, runtime 298, host 48 and app_test 121 pass, and so do the threaded runtime 291 and host 48.room_media_intrinsics.cpp,oidc_host.cpp): master's app argument now sits in front of this branch's kind argument, so clang-format puts the app on its own line. Whitespace only;git clang-format --diff cecaad34is clean.register_action_intrinsicstakes the app, with or without a key and with or without a kind. The forms without a kind register host_only. The app'sapp.slottable holds this branch'sregistered_provider(key, provider, kind), and a keyed registration replaces both the provider and its kind.install_providers, the placement generation andhost_only_bindingsread the app's table.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. The tests' process-wide clears (isolated_providers_cleared,StreamActionGuard, the bench'sari_providers_reset) are gone, since each test's providers now go with its app.job_intrinsics_test(ports: result_job, node keys, generic intrinsics, T7 harness, pycvc jobs (P0b, part 2) #1113) still calls the pre-P0a: the action-intrinsic providers are each app's own; cvc::app::slot<T>() [4.0, breaking] #1137 forms, so it doesn't compile at master's head. This merge passes it the app.room_calls.cpp's statics. The docs name the app-taking forms.ariadne_registries_test7,app_test121,job_intrinsics_test21,result_job_test18 andariadne_requires_test18 pass. So do the threaded runs: runtime 291 and host 48. cvcGL, the scan and wasm run only on CI.room_calls.cppobjects that 78eccca and 94aaf52 added here. The only conflict was the cvc section's count. The merged list is the three-way union of both sides (812 lines, cvc 464) asscan.pyrenders it. ci: room_calls.cpp's process-wide objects on the writable-data scan's allowlist #1133 changes nothing else, so there was nothing to rebuild.g_messages, the atomic counter inroom_calls.cppthat numbers message ids. Linux release-grpc's scan reported it as the only new symbol and found no stale lines, so the other six predicted room_calls.cpp names were right. cvc is now 464 lines. All 7,246 tests in that job passed.src/cvc/tests/CMakeLists.txt, where both sides added tests afterphysics_replay_test; master'spermissive_libs_testand this branch's*_threads_autoruns are both kept and registered. Neither PR adds writable data to a scanned target, so the allowlist is unchanged.ocean_shore_test15 passes,permissive_libs_testskips locally (its libraries aren't in this build), and the threaded Ariadne runs pass (291, 48).register_room_intrinsics: master'sregister_room_call_intrinsics(app)call and this branch's host_proxied room provider are both kept.room-callworks in group 0 and host-affinity groups as on master, and is a NameError in ananygroup.room_calls.cpp, which no scan has seen yet because arisrvx: room-call, relay joins, TLS and a server document's python: (S2) #1122's CI ran before the scan existed: room-call's per-app client map and its mutex, and the registered-apps vector and its mutex. The names follow the list's existing function-local statics; if CI's scan names them differently, its artifact will say so.state_exec_codec_test75, the Ariadne suites,state_exec_async_calls_test75,state_exec_groups_test28,exec_pool_test34, and withCVC_EXEC_THREADS=autoariadne_runtime_test291 andariadne_host_test48;_pycvc.pydbuilds.room_relay_integration_testand arisrv aren't in the local build.ScriptLane::take_queue: master made the sameon_donefix as afcfc49 (below), and master's form is kept, so this branch no longer differs there.tools/singleton_scan/allowlist.txt: only the cvc header's count (457). The merged list is the base plus both sides' changes (805 lines): master drops the handler tables' statics, and both sides list ariadne: an exported call from a program is the program's own sliced work (G1, fourth part) #1105/ariadne: an instance is waited for through the lock manager, and RecursionError (G1, sixth part) #1126's parsed programs and cvc::world: water_bodies, the sea, lakes and ponds and the shore grid (O1) #1109's scratch the same way. It parses and is inscan.py's own order.ariadne_script_engine_test34,ariadne_runtime_test298,ariadne_host_test48,ariadne_loader_test226,ariadne_server_document_test10),state_exec_async_calls_test75,state_exec_groups_test28,exec_pool_test34,net_http_client_test10,net_ws_client_test12,stream_test36,state_lifetime_stress_test18, and withCVC_EXEC_THREADS=autoariadne_runtime_test291 andariadne_host_test48;_pycvc.pydbuilds.package-linux / libcvc-debugfailed at afcfc49 onAriadneAsyncFn.ActionCapsAreTreeSettingsAndChargeAsyncCalls, in the threaded run of the whole binary (ariadne_runtime_test_threads_auto) only: its 200-round loop ran out of the default 0.1 s action time (time_limit_exceeded) on all 3 tries, and on the first of 2 at 0e3835e. The per-test runs in the same job passed. eebb1fe:CVC_EXEC_THREADS=auto. So threaded mode adds no per-step cost; an unoptimized build late in a loaded ctest is what brought it near the time cap.AriadneAsyncFn.*passes ×5 plain and ×5 threaded, and the wholeariadne_runtime_testpasses plain (298) and threaded (291).ci.yml: this branch'sstream_test,net_ws_client_testandariadne_host_test, and master'sparam_table_test, all kept (param_table_test20 passing).script_engine.h/.cpp(both kept). An activation's lock is awith-lockkey on the app's one lock manager, which every group shares (4.19), so it excludes across group 0 and isolated groups alike. state_exec: a run's step budget counts what each pick charged (G1, fifth part) #1117's run loop counts what each pick charged, so a group's pump budget counts a slice's steps as group 0's does.ariadne.cpp's includes (2dc340b). The cache notes each state write under a lock on the writer's thread, through the tree root'schildChanged. So a write from an isolated document's group on a pool thread invalidates a kept result as a host-thread write does, and a result kept while a write is in flight is dropped at the next look.AR-3 on a 3-core runner: the frame's 0.1 s deadline skips the group that would start last (td 4.10), so its quick action completes in the next frame. AR-3 now allows that; td 4.11 item 7 says so.
macOS
NavSimWorldAgents.EachPolicyDrivesItsOwnAgentsfailed at 0c9a8cb. It is master's test, not this branch's:feat/wasm-guests-2fails it the same way.scatter_free's draw differs between standard libraries, and on macOS it leaves that agent where it began under both policies (-5.263 in both worlds).poscolumn. Master's ariadne: guests' ari_init at load, and guest calls from init: (G1, second part) #1094 then brought the same hunk, so after acb049b this branch doesn't differ from master in that file. Master's nav: scatter_free picks the same cells on every standard library #1114 then madescatter_freepick the same cells on every standard library (merged here at 7dab4ba,nav_sim_world_agents_test17 passing).package-macos / libcvc-releasefailed on the same test and nothing else. Its first tries ofcvcgl_terminal_scene(a kitty frame re-sent) andcvcgl_lowmem_fastdraw(a Fast-vs-Stock pixel delta of 5) failed and passed on retry. Both are VTK renders under Apple's software renderer, which this branch doesn't change.Not yet verified locally:
Reviews
Every review fixed below has a test that fails without the fix.
Midpoint review (two lenses: semantics, and concurrency and memory). It found 3 major and 16 minor problems, among them:
CVC_EXEC_FORCE_MOVEhang above;Skeptic pass over the fixes. It found 1 major and 7 minor:
Bench, CI and docs review. It found 1 major and 9 minor:
Gates
Section 6 of the plan, run in a quiet window on 2026-11-12 (Windows MSVC Release, two rounds). The base is 8cba3b1, master with S1a, as last merged here at 9b43e8a. The candidate is b4af08c. Verdicts are in comment 6837748380.
steps_totalis unchanged on the deterministic families.msg.*andasync.*included, within 3%. All 396 points are noisier than 3%, though both rounds were quiet.async.pool_agingat k=1000 and 3000 is +11% to +56%, andasync.inflight_taxwhere=background at c=0 and 1 is +6% to +22%.msgis +5% andsched.singleis -2% and -9%.mt.ariadne_docssmall frames wake no helper:helper_wakesis 0 at all 16 wakeable points.Joe accepted S1b as recorded on 2026-11-12 (comment 6838689168).
Open items
async.pool_agingandasync.inflight_taxwere slower in both S1b rounds, and slower in S1a's clean round too. They want a targeted look. This does not block the merge.host).host_only.state_sync_adapter's pinned walks.