refactor(runtime): split operator runtime into per-language crates - #2777
Conversation
|
😎 Merged successfully - details. |
|
🤖 Automated review by Claude — this review is fully automated and has not been verified by a human. I reviewed this refactor against the pre-split behavior, focusing on the daemon spawn path and both backends. It looks behavior-preserving:
No correctness or logic bugs found. One thing worth confirming (low confidence, non-blocking): the Generated by Claude Code |
|
🤖 Automated review by Claude — this is a fully automated review with no human in the loop. Treat it as a suggestion to verify, not as authority. I found one issue worth a look. This PR is billed as behavior-preserving, but I think it narrows behavior for shared-library operators hosted under a Python-embedded daemon (i.e. a pip-installed dora, where the daemon's Before the split, the unified The daemon's routing is reproduced verbatim: So for a pip-installed dora (daemon exe = the Python interpreter) running a runtime node with a C/C++/Rust shared-library operator, the launch command is reproduced exactly but the launched backend can no longer host the operator. This path isn't caught by CI: the C++/cmake shared-library examples run through the compiled If that configuration is still meant to be supported, the Generated by Claude Code |
|
🤖 Automated review by Claude — fully automated, no human in the loop; it may contain mistakes. Went through the split carefully — the mechanical moves look faithful (the One correction/refinement on the shared-library-under-Python regression noted in the automated comment above: it doesn't actually hit a normal Also flagging that the PR currently shows a merge conflict against Generated by Claude Code |
|
🤖 Automated review by Claude — this is a fully automated review with no human in the loop; treat findings as suggestions to verify, not as authority. I went through the split again focusing on the release wiring rather than the spawn path (earlier comments already cover that). One thing looks like it'll break at release time and isn't caught by The
On the next crates.io release I'd expect two failures:
Replacing the For context, the embedded-Python shared-library routing and the Generated by Claude Code |
7fa9c15 to
cf2bffe
Compare
|
🤖 Automated review by Claude — fully automated, no human in the loop; it may contain mistakes. Separate from the points raised earlier, one packaging change looks like it will break local
This PR drops that gating for the Python backend, but the documented Adding Generated by Claude Code |
|
🤖 Fully automated review by Claude — no human in the loop. Two supplementary points, separate from the (still-valid) telemetry/OTLP, embedded-Python routing, release-workflow, and PyO3 The new
The branch also still shows a merge conflict against Generated by Claude Code |
9090043 to
572f29e
Compare
Re-reviewed the rewritten commit against the earlier threads — the five prior points are addressed: shared-library/WASM operators are now delegated from One residual from the (Also still shows a merge conflict against Generated by Claude Code |
Extract a language-neutral runtime SDK, `dora-runtime-api` (event loop, node harness, and the `OperatorRunner` backend trait + `main(runner)` entry), and move the two runners into their own backend crates: `dora-runtime-shared-lib` (libloading/C-ABI, shipped in the `dora` CLI) and `dora-runtime-python` (the only crate linking PyO3, shipped in the wheel). The `python` cargo feature and all `#[cfg(feature = "python")]` dispatch are gone; adding a language is now one crate implementing `OperatorRunner`. `dora-cli` no longer pulls pyo3 in at all. Table-drive the daemon's runtime spawn logic via a new `spawn/runtime_registry.rs` keyed on `OperatorSource::runtime_name()` (new helper in `dora-message`, with `RUNTIME_*` name constants). The `python` / `shared-library` built-ins reproduce the existing launch commands verbatim (incl. the #1797/#1805 fixes); the registry is the seam where a future third-party-runtime resolver slots in. `dora-runtime-python` also hosts shared-library (and WASM) operators by delegating to `SharedLibRunner`. A daemon that is itself an embedded Python process routes *native* runtime nodes to `python -uc "import dora; dora.start_runtime()"`, and the pre-split `dora-runtime` served them because it compiled the shared-library backend in unconditionally. Without the delegation those operators would fail to init. Both publish workflows drop the now-gone `dora-runtime` for the three new crates, ordered before `dora-cli`. `dora-runtime-python` is excluded from `cargo test --all` alongside `dora-cli-api-python`: it is a plain rlib, so unlike the `extension-module` cdylibs its test binary links libpython, and the CI test job runs without setup-python. Its lib still builds there as a dependency of `dora-cli-api-python`. Behavior-preserving refactor: no descriptor/YAML changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
572f29e to
132a141
Compare
Splits the monolithic
dora-runtimeinto a language-neutral SDK plus per-language backend crates, and table-drives the daemon's runtime spawn logic. Behavior-preserving — no descriptor/YAML changes.dora-runtime-api— the SDK: operator event loop, node harness, and theOperatorRunnerbackend trait +main(runner)entry.dora-runtime-shared-lib— libloading/C-ABI backend, shipped in thedoraCLI (dora runtime).dora-runtime-python— PyO3 backend, the only crate linking pyo3, shipped in the wheel (dora.start_runtime()).The
pythoncargo feature and all#[cfg(feature = "python")]dispatch are gone; adding a language is now one crate implementingOperatorRunner. The daemon's python/shared-library selection moves tospawn/runtime_registry.rs, keyed on the newOperatorSource::runtime_name()helper, reproducing the existing launch commands verbatim (incl. the #1797/#1805 fixes). The registry is the seam where a follow-up can add third-party runtimes via an explicitruntimes:map.Verified: full
cargo test --all,clippy --all -D warnings,fmt --check,cargo check --examples, and an end-to-end shared-library operator dataflow (daemon → runtime → dlopen'd operator → sink, all green).