state_exec: always built — remove CVC_STATE_EXEC (unbreaks gh-pages) - #493
Merged
Merged
Conversation
Runtime::Impl declared `cvc::state_exec::channel_policy channel_policy_` unconditionally, but <cvc/core/state_exec/intrinsics.h> (which defines it) is only included under #ifdef CVC_STATE_EXEC. Builds with -DCVC_STATE_EXEC=OFF -- notably the non-pthread wasm gh-pages demos -- failed to compile ariadne.cpp since the §12 channel-scoping work. Every use of the member (set_channel_policy, the ictx.channels wiring in submit_action / submit_resident) is already inside CVC_STATE_EXEC, so guarding the declaration is sufficient. No behaviour change when state_exec is enabled; set_channel_policy stays a no-op without it.
state_exec is the substrate Ariadne apps run on (the demos are moving to .ari apps), so forcing it OFF in the wasm builds only strips the program lanes and leaves an OFF configuration nothing else exercises -- which is how #467's unguarded channel_policy_ broke the gh-pages build. #438 already turned it ON for the wasm-mt libcvc/cvcgl publish; do the same for the rest: - src/cvcGL/examples/wasm/build-wasm-demo.sh (deploy-pages gh-pages gallery, both non-pthread and --pthread) - cvcpkg/recipes/cvcgl-examples/build-wasm.sh (wasm-mt gallery bundle); cvc_revision 2 -> 3 so the change republishes over 3.4.0+cvc.2 - cvcpkg/recipes/pycvc-gl-cp312/build-wasm.{sh,ps1} (CPython-wasm host; no wasm variant published yet, so no revision bump needed) The paths the demos use (stackless evaluator + async_scheduler) spawn no threads, so this is safe on the non-pthread build; the compute pool sizes itself to 0 workers there.
state_exec is core: Ariadne's program + read lanes run on it and the demos are moving to .ari apps. An OFF configuration only stripped those lanes and left a build mode nothing tested -- the gh-pages wasm build was its sole user, and #467's unguarded channel_policy_ broke it after merge. - CMake: drop option(CVC_STATE_EXEC), the core/state_exec/ source filter, the PUBLIC compile definition, and the if(CVC_STATE_EXEC) test gating. - Strip every #ifdef/#ifndef CVC_STATE_EXEC, keeping the ON code: ariadne (runtime, loader, app_runtime, net_intrinsics), core async_task, pycvc Exec. The OFF fallbacks (warn-and-show reactive slots, run_init error, throwing Exec stubs, no-op residents/verbs) are gone. - Remove have_state_exec() (cvc::ariadne, AppRuntime, cvc::gl AriRuntime) and its callers: nav_compute's runtime check, net_intrinsics' early return, and the GTEST_SKIP / Python skip guards in the tests. - Drop the now-meaningless -DCVC_STATE_EXEC=ON from the wasm build scripts and publish-cvcgl-wasm.yml; update docs. This also fixes the native OFF build's executable links (app.cpp's exec_scheduler() and nav_compute referenced state_exec unconditionally), since there is no OFF build any more.
transfix
enabled auto-merge
September 30, 2026 03:31
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.
Problem
deploy gh-pages→ Build the non-pthread demos has failed on every master push since c42e945:The gh-pages wasm build forced
-DCVC_STATE_EXEC=OFF. That was the only build using the OFF configuration, so any unguarded state_exec type slipped through PR CI and only broke after merge (here,channel_policy_from #467). State_exec is what Ariadne apps run on, and the demos are moving to.ariapps, so having an OFF configuration at all works against that.Change: state_exec is always built; the
CVC_STATE_EXECoption is goneoption(CVC_STATE_EXEC), thecore/state_exec/source filter, the PUBLICCVC_STATE_EXECcompile definition, and the fiveif(CVC_STATE_EXEC)test-gating blocks.#ifdef/#ifndef CVC_STATE_EXEC, keeping the ON code. The files are the Ariadne runtime, loader,app_runtimeandnet_intrinsics, coreasync_task, and pycvcExec. The OFF fallbacks are gone: reactive slots that warned and still showed,run_init's error, the throwingExecstubs, and the no-op residents and verbs.have_state_exec()fromcvc::ariadne,AppRuntimeandcvc::gl::AriRuntime, since it would now always return true. Its callers are gone too:nav_compute's runtime check,net_intrinsics' early return, and 79 C++ plus 9 Python test skip guards. Nothing in the sibling repos calls it.-DCVC_STATE_EXEC=…flags are gone frombuild-wasm-demo.sh(gh-pages), thecvcgl-examplesandpycvc-gl-cp312build-wasm.{sh,ps1}scripts, andpublish-cvcgl-wasm.yml.cvcgl-examplescvc_revisiongoes 2 → 3 so its wasm-mt bundle republishes over3.4.0+cvc.2.ARIADNE.mdand the roadmaps are updated; historical checklist entries are annotated rather than rewritten.CVC_STATE_EXEC=OFFcached now just builds state_exec. That also fixes the native OFF executable-link failures (app::exec_scheduler(),nav_compute).The commits are kept separate for review: the original
channel_policy_guard, then the wasm flag flip, then the option removal (which supersedes the guard).Safe on non-pthread wasm
async_scheduler, and neither creates threads. The onlystd::threadin state_exec is the recursiveevaluatorwith a timeout, which nothing on the wasm paths calls.app.computePool()gets 0 workers without pthreads. emsdk's stubemscripten_num_logical_cores()returns 1, and I confirmedhardware_concurrency()==1under node. It never callspthread_create, which fails withENOTSUPthere.nav_city_swarm/nav_city_drivealready rely on this in the shipped gallery..aridemos use async verbs (compute_async, which does spawn a thread), they need the wasm-mt gallery or an inline fallback.Verification
deps-wasm-mt):build-wasm-demo.shwith state_exec on finishes with rc=0. All 9 demos link and the gallery assembles. I served it and rannav_city_swarm, the demo that usescomputePool(): it runs (800 agents, render + minimap), and the only console error is the expected no-trained-weights fallback. After the removal commit,libcvc.aandlibcvcGL.arebuild cleanly under em++ (195/195).VolumeOpsTest.BackProjectDimensions, is because the minimal config setsCVC_FFT_PROVIDER=none, which this change doesn't touch.CVC_STATE_EXEC=OFFcache, cvcGL + examples: all 297 steps build and link, includingnav_computeand the executables that used to fail.SWIG_LIB/SWIG_DIRfrom the cvcpkg prefix; both modules carryswig_runtime_data5): the full tree builds (659/659). All 290 Ariadne tests pass, including the yaml-gated program-lane ones that skip without yaml, and so do all state_exec suites and 26 pycvc tests, among thempycvc_exec,pycvc_exec_async,pycvc_exec_coroandpycvc_integration.pycvc_ari,pycvc_gl_worldandpycvc_gl_chase_parityfail, but unmodifiedorigin/master(d6ac6a7) built the same way fails all three identically, so they are pre-existing and not caused by this PR. CI doesn't build pycvc, which is why nobody noticed. The errors: anif args:keepalive%pythonappendhitting a named-parameterImGuiOverlay.__init__(NameError: args), aStageLighting.get_stage()value mismatch, andpycvc_gl.cameranot importable from the build tree.publish-cvcgl-wasm(run 36660870376) andpublish-pycvc-gl-wasm(run 36660872184).git clang-format origin/master: clean. clang-format re-sorted include blocks that merged once the#ifdefseparators were removed.deploy-pages only runs on push to master, so the real non-pthread step runs once this merges.