From 9356c3a22501de8b7db0129136badc96458fb338 Mon Sep 17 00:00:00 2001 From: Miguel de Benito Delgado Date: Sun, 27 Sep 2026 18:55:26 +0200 Subject: [PATCH] :construction: WIP Step 12.4, Comments AI-assisted-by: gpt6-astra --- frontend/test/benches/render_wasm/cases.cljs | 7 +++++++ .../test/benches/render_wasm/scenes/core.cljs | 20 +++++++++++++++++++ .../benches/render_wasm/scenes/rects.cljs | 5 +++++ 3 files changed, 32 insertions(+) diff --git a/frontend/test/benches/render_wasm/cases.cljs b/frontend/test/benches/render_wasm/cases.cljs index 6c15565911..fa3e724662 100644 --- a/frontend/test/benches/render_wasm/cases.cljs +++ b/frontend/test/benches/render_wasm/cases.cljs @@ -4,6 +4,13 @@ ;; ;; Copyright (c) KALEIDOS SUBSIDIARY SL +;; Discovery loads each scene and its transitive requires, including any +;; colocated operation functions. Stripping :run! only makes output plain +;; data; it cannot isolate browser dependencies. Keep this entire import +;; graph safe for Node. Browser adapters supply execution capabilities in +;; rtx; discovery must never invoke operation bodies. Ticket 06 must prove +;; collection with a real pan body present, not just metadata-only cases. + (ns benches.render-wasm.cases "Case collection for the renderer benchmarks. diff --git a/frontend/test/benches/render_wasm/scenes/core.cljs b/frontend/test/benches/render_wasm/scenes/core.cljs index 03f33ecd00..4c16615d57 100644 --- a/frontend/test/benches/render_wasm/scenes/core.cljs +++ b/frontend/test/benches/render_wasm/scenes/core.cljs @@ -47,6 +47,26 @@ ;; tickets 05/06/14; this namespace fixes the binding name, the single ;; threaded value, and the body shape checked below. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Node/browser dependency contract (runtime wiring pending in ticket 06) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Scene declarations and bodies load in both Node and browser. Only the +;; browser driver executes bodies. Their transitive imports must stay safe +;; for Node; removing :run! from descriptors does not isolate dependencies. +;; +;; If an operation needs a browser API/helper, keep that import in a browser +;; adapter and pass a narrow function or prepared resource through rtx. +;; Keep pure calculations in portable helpers. Define arguments, return or +;; promise completion, timing and cleanup ownership for each capability. +;; Resource acquisition normally belongs to untimed preparation. Reuse +;; existing capabilities before adding one; never import the adapter back +;; into a scene, even if the operation body is not called during discovery. +;; +;; This keeps metadata and bodies together with one declaration authority, +;; at the cost of portable imports and a maintained capability contract. +;; If unrelated services accumulate in rtx, revisit this design explicitly. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Schemas ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/frontend/test/benches/render_wasm/scenes/rects.cljs b/frontend/test/benches/render_wasm/scenes/rects.cljs index 3926cb2693..46f0e28b01 100644 --- a/frontend/test/benches/render_wasm/scenes/rects.cljs +++ b/frontend/test/benches/render_wasm/scenes/rects.cljs @@ -30,6 +30,11 @@ [benches.render-wasm.scenes.builder :as sb :include-macros true] [benches.render-wasm.scenes.core :as core :include-macros true])) +;; This namespace is also loaded by Node discovery. Keep operation helpers +;; portable: browser API/helper imports belong in browser adapters supplied +;; through rtx, not in this require list or its transitive dependencies. +;; See scenes.core's dependency contract before adding a capability. + (def ^:private default-params {:count 1000 :width 1920