Skip to content

state_exec: always built — remove CVC_STATE_EXEC (unbreaks gh-pages) - #493

Merged
transfix merged 3 commits into
masterfrom
fix/ariadne-no-state-exec
Sep 30, 2026
Merged

transfix merged 3 commits into
masterfrom
fix/ariadne-no-state-exec

Conversation

@transfix

@transfix transfix commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Problem

deploy gh-pages → Build the non-pthread demos has failed on every master push since c42e945:

src/cvc/ariadne/ariadne.cpp:630:20: error: no type named 'channel_policy' in namespace 'cvc::state_exec'

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 .ari apps, so having an OFF configuration at all works against that.

Change: state_exec is always built; the CVC_STATE_EXEC option is gone

  • CMake: removed option(CVC_STATE_EXEC), the core/state_exec/ source filter, the PUBLIC CVC_STATE_EXEC compile definition, and the five if(CVC_STATE_EXEC) test-gating blocks.
  • C++: removed every #ifdef/#ifndef CVC_STATE_EXEC, keeping the ON code. The files are the Ariadne runtime, loader, app_runtime and net_intrinsics, core async_task, and pycvc Exec. The OFF fallbacks are gone: reactive slots that warned and still showed, run_init's error, the throwing Exec stubs, and the no-op residents and verbs.
  • API: removed have_state_exec() from cvc::ariadne, AppRuntime and cvc::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.
  • Builds: no wasm build forces OFF any more. The -DCVC_STATE_EXEC=… flags are gone from build-wasm-demo.sh (gh-pages), the cvcgl-examples and pycvc-gl-cp312 build-wasm.{sh,ps1} scripts, and publish-cvcgl-wasm.yml. cvcgl-examples cvc_revision goes 2 → 3 so its wasm-mt bundle republishes over 3.4.0+cvc.2.
  • Docs: ARIADNE.md and the roadmaps are updated; historical checklist entries are annotated rather than rewritten.
  • Side effect: a stale build dir with CVC_STATE_EXEC=OFF cached 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

  • Ariadne uses the stackless evaluator and async_scheduler, and neither creates threads. The only std::thread in state_exec is the recursive evaluator with a timeout, which nothing on the wasm paths calls.
  • app.computePool() gets 0 workers without pthreads. emsdk's stub emscripten_num_logical_cores() returns 1, and I confirmed hardware_concurrency()==1 under node. It never calls pthread_create, which fails with ENOTSUP there. nav_city_swarm/nav_city_drive already rely on this in the shipped gallery.
  • None of the nine current gh-pages demos use Ariadne yet. Once .ari demos use async verbs (compute_async, which does spawn a thread), they need the wasm-mt gallery or an inline fallback.

Verification

  • gh-pages non-pthread build, locally (emsdk 5.0.7, against a threaded wasm deps prefix like CI's deps-wasm-mt): build-wasm-demo.sh with state_exec on finishes with rc=0. All 9 demos link and the gallery assembles. I served it and ran nav_city_swarm, the demo that uses computePool(): it runs (800 agents, render + minimap), and the only console error is the expected no-trained-weights fallback. After the removal commit, libcvc.a and libcvcGL.a rebuild cleanly under em++ (195/195).
  • Native, minimal flags (no yaml): the full test tree builds (448/448) and ctest passes 3150/3151. The one failure, VolumeOpsTest.BackProjectDimensions, is because the minimal config sets CVC_FFT_PROVIDER=none, which this change doesn't touch.
  • Native, stale CVC_STATE_EXEC=OFF cache, cvcGL + examples: all 297 steps build and link, including nav_compute and the executables that used to fail.
  • Native with yaml-cpp + pycvc/pycvc_gl, built with the cvcpkg swig 4.4.1 (SWIG_LIB/SWIG_DIR from the cvcpkg prefix; both modules carry swig_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 them pycvc_exec, pycvc_exec_async, pycvc_exec_coro and pycvc_integration.
    • pycvc_ari, pycvc_gl_world and pycvc_gl_chase_parity fail, but unmodified origin/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: an if args: keepalive %pythonappend hitting a named-parameter ImGuiOverlay.__init__ (NameError: args), a StageLighting.get_stage() value mismatch, and pycvc_gl.camera not importable from the build tree.
  • Dry-run dispatches (build + pack, no publish) on 71d8176, the flag-flip commit: publish-cvcgl-wasm (run 36660870376) and publish-pycvc-gl-wasm (run 36660872184).
  • git clang-format origin/master: clean. clang-format re-sorted include blocks that merged once the #ifdef separators were removed.

deploy-pages only runs on push to master, so the real non-pthread step runs once this merges.

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.
@transfix transfix changed the title fix(ariadne): guard channel_policy_ on CVC_STATE_EXEC (unbreak gh-pages wasm build) wasm: build with CVC_STATE_EXEC=ON everywhere (unbreak gh-pages) Sep 30, 2026
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 transfix changed the title wasm: build with CVC_STATE_EXEC=ON everywhere (unbreak gh-pages) state_exec: always built — remove CVC_STATE_EXEC (unbreaks gh-pages) Sep 30, 2026
@transfix
transfix enabled auto-merge September 30, 2026 03:31
@transfix
transfix merged commit f9f669e into master Sep 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant