Skip to content

docs(roadmap): VolumeRover ports: no GPL, wasm from the start, no singletons, state tree, intrinsics, tests - #1074

Merged
transfix merged 2 commits into
masterfrom
docs/volrover-ports-plan-v2
Nov 9, 2026
Merged

transfix merged 2 commits into
masterfrom
docs/volrover-ports-plan-v2

Conversation

@transfix

@transfix transfix commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Revises docs/roadmap/VOLROVER-LIBRARY-PORTS-ROADMAP.md (merged in #1057) before any port starts. Docs only. Two commits:

  • 5f2ea51 adds the rules every port follows.
  • 4726804 records Joe's answers to them.

Settled

  • No GPL code (§1.2). CGAL's kernel, 2D polygons and number types are LGPL, but every CGAL algorithm package these ports use is GPL-3+. Permissive libraries replace all of them, so there is no GPL library and no -gpl package:

    • reentrant Qhull for 3D Delaunay;
    • Clipper2 for Booleans, offsets and Minkowski sums;
    • CDT for constrained Delaunay;
    • Boost.Polygon's segment Voronoi diagram for the medial axis;
    • Shewchuk's predicates and Eigen.

    Geogram is rejected because GEO::initialize() installs process-wide singletons. libcvc's own GPL CGAL use goes in libcvc drops CGAL: nanoflann replaces its GPL Spatial Searching uses #1080.

  • An A/B against CGAL (§1.2, T16). tools/cgal_ab (started in libcvc drops CGAL: nanoflann replaces its GPL Spatial Searching uses #1080, with a cgal-ab CI job) runs every replacement beside the CGAL code it replaces, for results and time. It is GPL as built, so it is never installed or packaged.

  • Wasm from the first PR (§1.8, T14).

  • No singletons anywhere in libcvc (§1.3). An audit of master found 152 process-wide mutable objects (31 of them locks) and 63 thread_locals, plus three real bugs:

    • every cvc::app constructor appends duplicate handlers to the global I/O maps;
    • registries hold callbacks bound to one app, so the last app wins and the others' captures dangle;
    • some app*-keyed tables are never erased, so a new app at a reused address inherits stale entries.

    P0a moves all of it under cvc::app before the ports, subsystem by subsystem. An object-file scan in CI enforces it.

  • The other rules carried from the first commit:

    • one API shape that SWIG wraps (result_job<R>);
    • a param_table per params struct driving state keys and properties, CLI flags, Python keywords and DSL dicts;
    • bulk data on the data channel;
    • DSL async intrinsics;
    • a 16-row test matrix per port.
  • VolumeGridRover keeps the legacy XY/XZ/ZY switch (m_SliceCanvasTab) as its default layout, with quad as the other.

  • GenSeg keeps its local-maxima seeding as the default until the paper mode matches the legacy results.

Phases.

  • P0: P0a (all of libcvc under the app), P0b (shared pieces), P0c (the permissive libraries) and P0d (shared types).
  • Then in parallel: P1, P3a, P5 and P7.

Still open (§9)

  1. Library arrival: done as recommended in recipes: qhull for wasm/wasm-mt; new clipper2 (BSL-1.0), every platform cy-pca/cvcpkg#578.
  2. How close ContourTiler must match its legacy output.
  3. The 4.0 API break P0a needs.
  4. Names.
  5. What may stay process-wide: signal traps, SDL's event queue, curl/ImageMagick/Jolt/HDF5/gRPC init, and CUDA device state.

…ree, intrinsics, tests

Adds the rules every port follows (sections 1.2-1.7):
- the GPL-licensed parts (Skeletonization, ContourTiler: their CGAL packages
  are GPL) go in cvc_gpl / cvcgl_gpl / pycvc_gpl, never linked by libcvc,
  enforced with CGAL_LICENSE_ERROR and an OFF lane;
- no singletons, with a per-port inventory, per-app forms of the
  process-wide node-type, intrinsic and I/O handler registries, and an
  object-file scan in CI;
- one API shape SWIG wraps directly, with result_job<R> owning its result;
- every parameter declared once in a param_table that drives state keys,
  properties, CLI flags, Python keywords and DSL dicts; bulk data on the
  data channel, and GPL nodes reading LGPL nodes' data through it;
- DSL async intrinsics per port;
- a 14-row test matrix per port.
Phases gain P0a-c; decision 1 is settled and the open list is revised.
…r the app, CGAL A/B

Joe's answers to the second revision:
- No GPL code. Permissive libraries replace every GPL CGAL package the ports
  use, so there is no cvc_gpl library and no -gpl package:
  - reentrant Qhull for 3D Delaunay;
  - Clipper2 for Booleans, offsets and Minkowski sums;
  - CDT for constrained Delaunay;
  - Boost.Polygon's segment Voronoi for the medial axis;
  - Shewchuk's predicates and Eigen.
  CGAL's licence facts come from its package overview. Geogram is rejected
  for its process-wide init singletons. libcvc's own CGAL use is gone in #1080.
- Wasm from the first PR of every phase (new section 1.8, T14).
  cy-pca/cvcpkg#578 adds qhull wasm/wasm-mt and a clipper2 recipe. A
  local emsdk smoke under node checked both, plus CDT. Qhull runs as
  "d Qbb Qt Qz", since QJ adds slivers and seeds from the clock.
- Everything under an app: section 1.3 now holds the audit of libcvc's
  process-wide state:
  - 152 mutable objects, 31 of them locks, and 63 thread_locals;
  - three real bugs (duplicated I/O handlers per app, registries bound to
    the last app, stale app*-keyed tables);
  - what P0a does with each group.
  P0a becomes XL and comes before the ports.
- An A/B of every replacement against the CGAL code it replaces: the
  tools/cgal_ab harness from #1080, with its results, and T16.
- VolumeGridRover keeps the legacy XY/XZ/ZY switch (m_SliceCanvasTab) as the
  default layout, with quad as the other. The skeleton is a mesh_lab request
  again, and Tile is direct in volume_grid.
- GenSeg's default seeding is settled as recommended.
Section 9 now holds the library arrival (done), ContourTiler parity, the
4.0 API break, names, and what may stay process-wide.
@transfix transfix changed the title docs(roadmap): VolumeRover ports: GPL library, no singletons, state tree, intrinsics, tests docs(roadmap): VolumeRover ports: no GPL, wasm from the start, no singletons, state tree, intrinsics, tests Nov 9, 2026
@transfix
transfix enabled auto-merge (squash) November 9, 2026 03:37
transfix added a commit to cy-pca/cvcpkg that referenced this pull request Nov 9, 2026
…rm (#578)

* recipes: qhull for wasm/wasm-mt; new clipper2 (BSL-1.0), every platform

For libcvc's VolumeRover ports, which replace CGAL's GPL packages with
permissive libraries and must build for wasm-mt from the first PR
(transfix/libcvc#1074).

qhull 8.0.2 (cvc_revision unchanged, as when wasm-mt rows were added before):
- New wasm and wasm-mt rows (linux host), with build-wasm.sh.
- Emscripten links statically only, so these ship libqhullstatic_r.a and
  libqhullcpp.a, with a qhull_r.pc naming the static library.
- libqhull_r keeps all state in the caller's qhT. qh_clock's one function
  static compiles only with qh_CLOCKtype 2, and the default is 1.

clipper2 2.0.1 (new; Boost Software License 1.0):
- Polygon Booleans, offsets, Minkowski sums and polygon triangulation on
  int64 coordinates.
- Static Clipper2 and Clipper2Z on linux, macos, the three BSDs, windows,
  wasm and wasm-mt, with CMake targets Clipper2::Clipper2 and
  Clipper2::Clipper2Z.
- Static everywhere because its C++ API has no DLL export annotations.
- Utilities, examples and tests are off; they fetch GoogleTest.

Checked locally with emsdk (Windows host, the same CMake options):
- Both build for wasm-mt with -pthread.
- A smoke program linking them, with CDT's headers, runs under node 22:
  - Qhull's Delaunay of a cube's corners plus its centre is 12 tetrahedra
    with "d Qbb Qt Qz". QJ and Qt alone add flat slivers.
  - Two triangulations on two threads equal the sequential ones.
  - Clipper2's union, intersection, difference, mitred offset and Minkowski
    sum give the expected areas.

* clipper2: patch Triangulate's uninitialized error code (GCC -Werror)

The dev-cluster build of #578 failed on linux:
- GCC 11.4 flags Triangulate(const PathsD&, ...)'s `int ec;` as
  -Wmaybe-uninitialized, and Clipper2 builds its library with -Werror.
- The warning is real: ScalePaths does `error_code |= range_error_i`, so it
  reads the uninitialized int. Every other ScalePaths caller starts from
  `int error_code = 0;`.
- freebsd, openbsd, netbsd and windows built (clang, MSVC).

patches/triangulate-ec-init.patch makes it `int ec = 0;`, which keeps
upstream's -Werror. It applies cleanly (-p1) to the 2.0.1 tarball.
@transfix
transfix merged commit 016a203 into master Nov 9, 2026
6 of 30 checks passed
@transfix
transfix deleted the docs/volrover-ports-plan-v2 branch November 9, 2026 03:48
transfix added a commit that referenced this pull request Nov 9, 2026
… compute and scene server (#1090)

Joe asked for a plan to:
- port TexMol's legacy libraries;
- move the F2Dock server onto arisrv and Ariadne documents, with TexMol
  talking to it;
- make arisrv general for TexMol and VolumeRover compute, and for scientific
  visualizations and digital twins in separate rooms, in cyprty's conference
  mode.

New docs/roadmap/TEXMOL-F2DOCK-ARISRV-ROADMAP.md, built on the VolumeRover
plan's rules (#1074), ARIADNE_SCRIPTING_HOSTS' arisrvx stages, ARIADNE_WORLDS'
rooms, and cyconv's PLAN.md (D8, D12, D14, whose arisrv facts are stale):
- TexMol (section 2). An inventory of every library. Port about 68k lines:
  molecules, Blurmaps (with F2D generation), HLevelSet, Pocket on cvc::sdf,
  the docking analysis with the filters F2Dock also carries, the
  F2DockClient's Qt-free core, and later PocketTunnel and SecondaryStructures
  on the cocone core. Leave the GUI, the libcvc duplicates, the licence
  blockers (Decimation's SHASTRA/IMSL code is missing from TexMol's
  notices), and the dead code. Rewrite GB and PB only if wanted.
- F2Dock (section 3). The engine is single-job:
  - global queues, function statics and 55 exit() calls;
  - it mutates its inputs.
  The XML-RPC server never calls the engine. It shells out and blocks inside
  Submit, its markers race, failures read as COMPLETED, and a client can
  name any server file. Plan: F0 fixes (auto-detect ==, one output per
  state, cvc::fft namespace squat, NFFT3 auto-link), F1 libf2dock, F2 an A/B
  against the legacy executable, F3 the service, F4 cvc::dock.
- arisrv (section 4). From one room per process to many rooms with a lobby
  (RM1-RM2 brought forward), and room features (presence, avatars, media,
  scene, compute). Room scenes gain volumes, molecules, port geometry and
  data: sources, with assets by hash. Digital twins are live sources bound
  into a room. cyprty becomes the lobby and the lab rooms.
- One job service, cvc::jobs (section 5): kinds from parameter tables,
  jobs.<id>.* published and scoped per principal, paged results, a store,
  in-process and worker executors, and room-call, FastAPI and DSL fronts on
  one layer. Data, never paths.
- Tests R1-R2, J1-J3, C1; phases T0-T6, F0-F4, M0, J0-J1, R1-R3, C1.
- Decisions: a C++ job layer vs Python-only, rooms per process, the legacy
  client shim, MolSurf/PDB2PQR in-process, the arisrvx order, names.
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