Skip to content

worlds: the relay seeds each room from a world document (WD0, WD1) - #1049

Merged
transfix merged 6 commits into
masterfrom
feat/world-documents
Nov 8, 2026
Merged

transfix merged 6 commits into
masterfrom
feat/world-documents

Conversation

@transfix

@transfix transfix commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

The first cut of ARIADNE_WORLDS.md: WD0 and WD1. Every room's world now comes from a world document, and so does its look. It builds on S0 (#1046).

WD1: the world document seeds the room

  • Where the world comes from.
    • arisrv runs cvc://worlds/default.ari, the 20 m room. arisrv --scene large runs cvc://worlds/large.ari.
    • Both live in the new src/cvc/ariadne/worlds/, installed beside components/, so the libcvc package's share/libcvc/ariadne/ carries them.
    • Both are ordinary documents and open in arigl as well (arigl cvc://worlds/default.ari).
    • A --doc whose document has a scene: with nodes or lights is the world instead. --scene together with such a --doc exits 2.
  • One revision. The relay publishes the world as one revision (conference::write_room_world): every field and the soft removals first, then scene.rev, once and last.
  • What the room carries. conference::room_world_from_scene turns a document's scene into what the room's wire holds:
    • the background, the chrome, the shadows and every light, rigs included;
    • each top-level geometry node with a plane, box or sphere source, or a mesh by URI with its fit:, along with its transform and plain material.
  • What it leaves out, with a warning at start-up:
    • other node types and sources, children, textures and shaders;
    • fit: up x and flip, visible: binds, and shadow softness and focus.
  • Bodies and physics. Every body is published as a static, because room_statics builds every object; server-dynamic entities are WD3's, and the relay warns about them. physics: waits for the headless world runtime (L0, §14).
  • The look is the world's (Q1).
  • Fallback. default_world() and large_world() are C++ twins of the two documents. A relay that can't find its world file says so and seeds the twin. RoomSceneTest.StockWorldsMatchTheirTwins pins each document and its twin to the same leaves.
  • ServerDocument. ServerDocument::read() now keeps the parsed scene, so the relay publishes the world before the document's init: runs. The load's "kept but not published" warning is gone; the physics warning stays.

WD0: --set order

--set now comes after the world and the room's policies, so it overrides them; a --set of scene.rev no longer stops the world from being seeded.

It still comes before a server document's init:, unlike the plan's "last". Otherwise the ariadne.limits.* it sets would no longer bound init:. The "under a sun" comment goes too.

Tests

  • gtests: RoomSceneTest.RigKnobsRoundTrip, RoomWorldIsOneRevision, RoomWorldFromSceneCarriesWhatTheWireHolds and StockWorldsMatchTheirTwins. ServerDocumentTest now also checks that read() keeps the scene.
  • ctests:
    • arisrv_world_from_doc: a document's world is published before init:, which reads it back.
    • arisrv_world_doc_and_scene: --doc and --scene together are refused.
    • arisrv_set_after_world: with --set of scene.rev and of an object's leaf, the world is still seeded and the leaf is moved.
  • Local run: a Windows static Release tree with gRPC, WS and tests. 59/59 passed for RoomSceneTest, ServerDocumentTest, ServerBlockTest, HolonSync and every arisrv_* ctest.
  • By hand:
    • --scene large published 26 objects from large.ari.
    • With no world file on the search path, the relay logged the miss and seeded the C++ twin.
    • ari check loads both worlds.
  • clang-format 18.1.8 is clean.

Notes for review

  • Other conference documents. A conference document outside libcvc that still declares its own rig and shadows would now light the room twice: once from its scene:, once from the room. It should drop its scene: block when it moves to this libcvc, as conference_roster.ari does here.
  • The room's environment gains one always-written leaf, shadows.interval. Rig knob leaves exist only on rig lights.
  • Not in this PR, kept for L0 (running on another box): the general revisioned-section writer, the GL/core split of scene_realize.cpp, the scene.physics token, sim_world and generated_world. WD1 reads cvc::ariadne::Scene only and adds no loader syntax.

CI: none here now

The macOS recipe lane failed on this PR first because cvcpkg was stale and cmake came from Homebrew, then because IPC socket paths ran past macOS's 104-byte sun_path. #1050 fixed both on master, so the merge of master (0139fba) takes its side: this PR changes no CI file, and ipc_socket_path.h and the five IPC tests are master's. The step that puts cvcpkg's cmake, ninja and pkg-config first on PATH in the recipe lanes, so that nothing comes from Homebrew, moves to #1054.

After the merge: 8 arisrv_* ctests and 43 gtests (RoomSceneTest, ServerDocumentTest, the IPC suites, WorldCloudLayer, RoomRelayLoopbackTest) pass on the local Windows tree.

ARIADNE_WORLDS.md's first cut.

WD1: a room's world comes from a world document.
- arisrv runs cvc://worlds/default.ari (the 20 m room) and --scene large runs
  cvc://worlds/large.ari: new src/cvc/ariadne/worlds/, installed beside the component
  library. A --doc whose document's scene: has nodes or lights is the world instead.
  --scene together with such a --doc is refused.
- The relay publishes the world in one revision (conference::write_room_world: every
  field, soft removals, then scene.rev once, last).
- room_world_from_scene carries what the room's wire holds. What it can't hold is left
  out with a warning: other node types and sources, children, textures, shaders, fit
  up x or flip, visible binds, shadow softness and focus. A body is published as a
  static until WD3; physics: waits for the headless world runtime (L0).
- The look is the world's (Q1). The three_point rig and its shadows move from
  conference_roster.ari into the world document. The wire gains a rig's tuning knobs
  (stage, key, fill, back, warmth, environment, ambient, wash) and the shadows'
  re-bake interval, and the conference document drops its scene: block.
- The C++ twins default_world() and large_world() are the fallback when the file can't
  be found; a test pins each twin equal to its document, leaf for leaf.
- ServerDocument::read() keeps the parsed scene, so the relay publishes the world
  before the document runs.

WD0: --set comes after the world and the room's policies, so it overrides them; a
--set of scene.rev no longer stops the world from being seeded. It still comes before
a server document's init:, so its ariadne.limits.* bound the document. The "under a
sun" comment goes.

Tests: RoomSceneTest.RigKnobsRoundTrip, RoomWorldIsOneRevision,
RoomWorldFromSceneCarriesWhatTheWireHolds and StockWorldsMatchTheirTwins; ctests
arisrv_world_from_doc, arisrv_world_doc_and_scene and arisrv_set_after_world. Docs:
ARIADNE.md 9.7, ARIADNE_WORLDS.md (sections 1 and 15), the conference roadmap, and
the scripting-hosts roadmap's 6.1.
…-deps

The recipe lanes installed cvcpkg from transfix/libcvc-deps@master. That repo is
archived and frozen at cvcpkg 2.2.1, whose builder puts the deps prefix on
DYLD_LIBRARY_PATH. Once imagemagick 7.1.2+cvc.25 pulled iconv 1.17+cvc.7 into
libcvc's closure, the prefix's GNU libiconv.2.dylib shadowed the system one, and
Homebrew's cmake aborted before configuring on macOS:

  dyld: Symbol not found: _iconv ... Expected in: <prefix>/lib/libiconv.2.dylib

cy-pca/cvcpkg master, which publish-cvcpkg.yml already installs, puts the prefix
on DYLD_FALLBACK_LIBRARY_PATH (cy-pca/cvcpkg#221), so system libraries resolve
first.

Its `build` command has no --fallback-to-source. That is an install flag now, so
the workflow_dispatch input moves to install-deps.
…ebrew's

The recipe lanes took cmake and ninja from the runner image, which on macOS
means Homebrew's (/opt/homebrew/Cellar/cmake/4.4.5). That was the cmake that
aborted on #1049. Homebrew is not used at all: the lanes now run
./.github/actions/cvcpkg-build-tools after the cvcpkg CLI, as the package and
release jobs do. It puts cvcpkg's cmake, ninja and pkg-config first on PATH for
every later step, and fails the job if one resolves anywhere else.
On macOS the recipe lane's 16 IPC tests threw "state_transport_ipc::start: socket
path too long". The failing suites were StateTransportIpcTest,
StateReconnectResilienceTest, StateExecMultiprocessIpc and
StateSnapshotProtocolTest.IpcSnapshotRequestResponse.

Each test put its socket under std::filesystem::temp_directory_path(). cvcpkg
2.5's builder, which the lane now installs from cy-pca/cvcpkg, points TMPDIR at
a per-job directory under /var/folders. A test's socket name there passes the
104 bytes of macOS's sockaddr_un::sun_path.

The new tests/ipc_socket_path.h (cvc_test::ipc_socket_path) keeps the temp
directory when the path fits and uses /tmp when it doesn't. The five IPC test
files build their paths with it.
#1050 made the same two fixes this branch carried for the macOS recipe
lane (b5597c7, dfd8d0e, 7791c2e), and it is on master now. The merge
takes master's side of each, so this branch no longer changes CI:

- .github/workflows/ci-recipe.yml is master's: the packaged cvcpkg 2.5.12
  from cvcpkg.org's install.sh / install.ps1. The cvcpkg build-tools step
  (no Homebrew cmake) and the --fallback-to-source move to install-deps go
  to #1054, the PR that takes Homebrew out of CI.
- src/cvc/tests/ipc_socket_path.h and the five IPC tests are master's.
#1047 added `sun: true` to a rig light: the key (and back) become a
directional sun over the whole world instead of spots on the stage. The
room's wire carries a rig's tuning knobs, so a world document's rig with
sun: true lost it on the way to the clients. scene.env.lights.<id>.sun now
holds "1", "0" or empty for unset, like the other knobs, and a plain light
clears it.

RigKnobsRoundTrip and RoomWorldFromSceneCarriesWhatTheWireHolds cover it.
transfix added a commit that referenced this pull request Nov 8, 2026
The recipe lanes took cmake and ninja from the runner image, which on
macOS is Homebrew's. They now run ./.github/actions/cvcpkg-build-tools
after installing cvcpkg, as the package and release jobs do, so cvcpkg's
cmake, ninja and pkg-config come first on PATH for the recipe's build
script and the job fails if one resolves anywhere else.

cvcpkg 2.5's `build` has no --fallback-to-source (it is an install and
install-deps flag; `build --no-deps` has no deps to build), so the
workflow_dispatch input now goes to install-deps.

This was on #1049 until #1050 fixed the rest of the macOS recipe lane on
master.
@transfix
transfix merged commit fcab927 into master Nov 8, 2026
51 of 56 checks passed
@transfix
transfix deleted the feat/world-documents branch November 8, 2026 14:15
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