Repository navigation
state: move the state subsystem from core/ to its own state/ directory (layout refactor Phase 1, + compat shims) - #577
Merged
Conversation
Phase 1 of docs/roadmap/STATE_DIR_LAYOUT_REFACTOR.md: give cvc::state the same per-API layout as ariadne. Layout change only -- no logic, symbol or ABI change. - git mv: src/cvc/core/state*.cpp, distributed_state_session.cpp and core/state_exec/ -> src/cvc/state/; the matching 57 headers -> inc/cvc/state/. All 105 register as renames (94-100% similarity; 84 also carry the include rewrite). core/ keeps app, async_lane/task, text, thread_pool, world_clock/units, exception, namespace, types and config.h.cmake. - src/cvc/CMakeLists.txt: path prefixes in INCLUDE_FILES / SOURCE_FILES, plus the three other spellings that must move with them -- the WIN32 REMOVE_ITEM for state_transport_ipc.cpp, the CVC_STATE_MEMORY_MANAGER=OFF REMOVE_ITEM, and the gRPC block's state_transport_grpc.cpp (a stale REMOVE_ITEM path is a silent no-op). Adds the missing state_exec/generator.h + utf8.h to INCLUDE_FILES (list hygiene). - <cvc/core/state...> -> <cvc/state/state...> and <cvc/core/state_exec/...> -> <cvc/state/state_exec/...> across the tree (libcvc, cvcGL, cvc-cli, tests, pycvc SWIG + C++). Re-sorts the 55 include blocks whose order changes under .clang-format's SortIncludes, and realigns trailing comments on include lines in 5 files, where the one-character-longer path broke clang-format's alignment. - Docs: path references updated (incl. README's project tree, which gains a state/ entry); pre-existing stale paths in STATE_EXEC_ROADMAP.md and STATE_EXEC_PORTING_PLAN.md fixed. release.yml's historical comment kept.
…one release Step 6 of docs/roadmap/STATE_DIR_LAYOUT_REFACTOR.md: keep out-of-tree code that includes the old <cvc/core/state*.h>, <cvc/core/distributed_state_session.h> or <cvc/core/state_exec/*.h> paths compiling for one release cycle. The 57 shims live in compat/inc/cvc/core/, not at the old inc/cvc/core/ paths, and a separate install(DIRECTORY) rule ships them to the same installed paths (include/cvc/core/...), so installed consumers see no difference. Why not the old source paths: PRs here are squash-merged, and with a shim at inc/cvc/core/state.h the squashed commit would record that path as modified and inc/cvc/state/state.h as added. Git only pairs renames from deleted paths, so --follow and blame would lose all 57 headers' history. It also keeps compat/inc off libcvc's include path, so in-tree code cannot drift back to the old spellings before Phase 2 deletes them. state_compat_headers_test is the one target with compat/inc on its include path: it includes every shim by its old spelling, so a shim whose target moves or is renamed fails CI rather than a consumer's build. Docs: STATE_API.md names cvc/state/ as canonical; the refactor plan is marked Phase 1 implemented, with implementation notes and the Phase 2 removal list.
This was referenced Oct 7, 2026
transfix
added a commit
that referenced
this pull request
Oct 7, 2026
…r (layout refactor Phase 2) Phase 2 of docs/roadmap/STATE_DIR_LAYOUT_REFACTOR.md, as a hard cutover. Phase 1 (#577) moved the state subsystem to <cvc/state/...> and added forwarding headers at the old <cvc/core/state*.h> / <cvc/core/state_exec/*.h> paths; this removes them before any release ships them, so libcvc 3.5.0 has only the new layout. - Delete compat/ (57 forwarding headers), its install(DIRECTORY) rule and state_compat_headers_test with its src/cvc/tests/CMakeLists.txt entries. Both CMake files are back to their pre-shim content. In-tree code was never able to use the old paths, so nothing else changes. - Source break for out-of-tree code on the old paths (no ABI change): in includes, cvc/core/state -> cvc/state/state and cvc/core/distributed_state -> cvc/state/distributed_state. - docs: STATE_API.md says the old paths are gone as of 3.5.0; the refactor plan is marked complete (hard cutover) with Phase 2 notes. No cvc_revision bump here: the 3.5.0 version bump restarts revisions at 1.
transfix
added a commit
that referenced
this pull request
Oct 7, 2026
…r (layout refactor Phase 2) Phase 2 of docs/roadmap/STATE_DIR_LAYOUT_REFACTOR.md, as a hard cutover. Phase 1 (#577) moved the state subsystem to <cvc/state/...> and added forwarding headers at the old <cvc/core/state*.h> / <cvc/core/state_exec/*.h> paths; this removes them before any release ships them, so libcvc 3.5.0 has only the new layout. - Delete compat/ (57 forwarding headers), its install(DIRECTORY) rule and state_compat_headers_test with its src/cvc/tests/CMakeLists.txt entries. Both CMake files are back to their pre-shim content. In-tree code was never able to use the old paths, so nothing else changes. - Source break for out-of-tree code on the old paths (no ABI change): in includes, cvc/core/state -> cvc/state/state and cvc/core/distributed_state -> cvc/state/distributed_state. - docs: STATE_API.md says the old paths are gone as of 3.5.0; the refactor plan is marked complete (hard cutover) with Phase 2 notes. No cvc_revision bump here: the 3.5.0 version bump restarts revisions at 1.
transfix
added a commit
that referenced
this pull request
Oct 7, 2026
…r (layout refactor Phase 2) (#578) Phase 2 of docs/roadmap/STATE_DIR_LAYOUT_REFACTOR.md, as a hard cutover. Phase 1 (#577) moved the state subsystem to <cvc/state/...> and added forwarding headers at the old <cvc/core/state*.h> / <cvc/core/state_exec/*.h> paths; this removes them before any release ships them, so libcvc 3.5.0 has only the new layout. - Delete compat/ (57 forwarding headers), its install(DIRECTORY) rule and state_compat_headers_test with its src/cvc/tests/CMakeLists.txt entries. Both CMake files are back to their pre-shim content. In-tree code was never able to use the old paths, so nothing else changes. - Source break for out-of-tree code on the old paths (no ABI change): in includes, cvc/core/state -> cvc/state/state and cvc/core/distributed_state -> cvc/state/distributed_state. - docs: STATE_API.md says the old paths are gone as of 3.5.0; the refactor plan is marked complete (hard cutover) with Phase 2 notes. No cvc_revision bump here: the 3.5.0 version bump restarts revisions at 1.
transfix
added a commit
that referenced
this pull request
Oct 7, 2026
New minor version carrying the state subsystem's move from cvc/core/ to cvc/state/ (#577) as a hard cutover (#578): <cvc/core/state*.h>, <cvc/core/distributed_state_session.h> and <cvc/core/state_exec/*.h> are gone, a source break (no ABI change) that warrants the minor. Bumps project(VERSION) 3.4.0 -> 3.5.0 and every cvcpkg recipe's upstream_version to match (cvc_revision reset to 1, per the recipe-version gate).
transfix
added a commit
to transfix/volrover
that referenced
this pull request
Oct 9, 2026
…3.5.0) libcvc 3.5.0 moved the state subsystem out of cvc/core/ into cvc/state/ as a hard cutover (transfix/libcvc#577, #578): <cvc/core/state*.h> and <cvc/core/state_exec/*.h> no longer exist, and volrover3 consumes libcvc as an unpinned external SDK, so it cannot compile against 3.5.0 without this. Rewrites the 41 includes in 25 files (cvc/core/state -> cvc/state/state). Path change only; volrover has no .clang-format, so includes stay in place.
transfix
added a commit
to transfix/volrover
that referenced
this pull request
Oct 9, 2026
…3.5.0) (#48) libcvc 3.5.0 moved the state subsystem out of cvc/core/ into cvc/state/ as a hard cutover (transfix/libcvc#577, #578): <cvc/core/state*.h> and <cvc/core/state_exec/*.h> no longer exist, and volrover3 consumes libcvc as an unpinned external SDK, so it cannot compile against 3.5.0 without this. Rewrites the 41 includes in 25 files (cvc/core/state -> cvc/state/state). Path change only; volrover has no .clang-format, so includes stay in place.
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.
What
Phase 1 of
docs/roadmap/STATE_DIR_LAYOUT_REFACTOR.md, the plan merged in #574. The state subsystem moves out ofcore/into its ownstate/directory, matching the per-API layout ariadne uses. This is a layout change only: no logic, symbol or ABI changes.core/now holds only what the plan says stays there: app, async_lane/task, text, thread_pool, world_clock/units, exception, namespace, types andconfig.h.cmake.volren/state_settingsand ariadne'sstate_io/uri_statedo not move.Includes are now
<cvc/state/state.h>,<cvc/state/state_exec/evaluator.h>, etc.Commits
git mvfor all 105 files (every one registers as a rename, so history is kept), CMake list paths, include rename across libcvc / cvcGL / cvc-cli / tests / pycvc (SWIG + C++), and docs.Details worth a look
WIN32list(REMOVE_ITEM … state_transport_ipc.cpp), theCVC_STATE_MEMORY_MANAGER=OFFREMOVE_ITEM, and the gRPC block'sstate_transport_grpc.cppall needed new paths.REMOVE_ITEMwith a path that matches nothing does nothing and reports nothing, so a stale path would only show up as a Windows link failure or a flag that silently stops working. Also added the missingstate_exec/generator.h+utf8.htoINCLUDE_FILES..clang-formatsorts and regroups includes, and<cvc/state/…>sorts after<cvc/gl/…>,<cvc/lod/…>, etc., so 55 include blocks were re-sorted. In 5 files, the one-character-longer path also broke clang-format's trailing-comment alignment against unchanged neighbouring lines, so those comments were realigned. Note: CI'sgit clang-formatdiffs withdiff-index, which does not detect renames, so the format check treats all 105 moved files as new and checks them in full.compat/inc/cvc/core/, not at the oldinc/cvc/core/paths. This departs from step 6 of the plan. PRs here are squash-merged. With a shim atinc/cvc/core/state.h, the squashed commit would record that path as modified (872 lines → a 5-line forwarder) andinc/cvc/state/state.has added. Git only pairs renames from deleted paths, so--follow/blame would lose the history of all 57 headers.install(DIRECTORY compat/inc/cvc/ …)rule installs the shims at the same paths (include/cvc/core/state*.h,include/cvc/core/state_exec/), so installed consumers see no difference.compat/incis not on libcvc's include path, so in-tree code cannot drift back to the old paths before Phase 2 removes them.add_subdirectory/FetchContent(not an install) don't get the shims.state_compat_headers_test(new) is the only target withcompat/incon its include path. It includes all 57 shims by their old paths, andsizeof-asserts that a type from each area (state tree, distributed, exec) is complete. If a shim's target header moves, this test fails in CI instead of a consumer's build. Phase 2 deletes it along withcompat/and the install rule.README.md(its project tree gains astate/entry),USAGE.md,ARIADNE.mdandUNICODE_SUPPORT_ROADMAP.md. Fixed pre-existing stale paths (from beforecore/existed) inSTATE_EXEC_ROADMAP.mdandSTATE_EXEC_PORTING_PLAN.md.STATE_API.mdnow namescvc/state/as canonical. The plan doc is marked Phase 1 implemented and has implementation notes. Therelease.yml:459comment is left as is, per the plan.Verification
Local (this machine has no Boost, gtest or clang-format binary, so there was no full build; the CI matrix is the build/test gate):
#include <cvc/…>/%include "cvc/…"in the tree resolves to a file, on every#ifbranch. No new unresolved repo-path references in docs, and 10 stale ones fixed.src/cvc/CMakeLists.txtresolves. Each moved file appears in the lists the expected number of times,REMOVE_ITEMentries included.check_test_targets.pypasses (161 targets).git clang-format --diff <base>over all 324 files it will check (moved files in full, sincediff-indexdoes no rename detection). It uses the same line ranges and calls clang-format's ownsortIncludes+reformatthrough the system's libclang-cpp 14. All are clean exceptstate/state_telemetry_aggregator.cpp. There, v14 wants to re-break<<chains on lines this PR doesn't touch; v18 (CI) already accepted those lines when they last changed in4487598f.-std=c++20 -Wall -Wextra, Boost/gtest stand-ins), including with all 57 shims in reverse order and withtask.h's MSVC coroutine branch forced on. No errors and no new warnings. There are no namespace-scope name or macro collisions across the 57 headers.install(DIRECTORY)rules were run in a throwaway CMake project.#include <cvc/core/state.h>and<cvc/core/state_exec/evaluator.h>against the installed prefix resolve through the shims to the real headers, with nothing unresolved.git diff -M origin/master HEAD): all 105 moves show as renames (lowest similarity 94%), andgit log --follow inc/cvc/state/state.hreaches pre-move history.Plan gate still to run (from the PR-1 row): full
ctest(all CI lanes), cvcpkg recipe builds (libcvc,cvcgl,cvcgl-examples,pycvc-cp313), the wasm job, andnav_abi_smoke. pycvc wrappers need regenerating, since only the include paths changed.Rebased on #561, which touched four of the files this PR renames includes in. Its changes are preserved.
Phase 2 (next minor)
Delete
compat/, thecompat/incinstall rule andstate_compat_headers_test. Drop the "old paths still compile" note indocs/STATE_API.md, then bumpcvc_revisionfor cvcpkglibcvcand republish.