Shared by BOTH backends (the TS floor's compute drivers in graph.ts
and the wasm engine's __causl_compute handler in authoritative.ts)
so a user compute throw is byte-identical in type across the FFI seam
(causl-client#120). Internal control-flow sentinels (e.g. the iterative
driver's missing-upstream marker) are handled by their driver BEFORE
reaching this helper, so they are never wrapped.
Normalise a value thrown out of a derived's
compute(get)into the engine-independent error taxonomy: an engine-emitted CauslError (a CycleError, UndeclaredDependencyError, NonDeterministicComputeError, an already-wrapped DerivedComputeError, …) passes through UNCHANGED so its specific identity is retained; any other (host) throw is wrapped in a DerivedComputeError carrying the original ascause.Shared by BOTH backends (the TS floor's compute drivers in
graph.tsand the wasm engine's__causl_computehandler inauthoritative.ts) so a user compute throw is byte-identical in type across the FFI seam (causl-client#120). Internal control-flow sentinels (e.g. the iterative driver's missing-upstream marker) are handled by their driver BEFORE reaching this helper, so they are never wrapped.