[PR #181] [MERGED] feat: add Rust RPC v1 control plane and migrate web client #182

Closed
opened 2026-02-27 10:22:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/181
Author: @mikeyobrien
Created: 2/21/2026
Status: Merged
Merged: 2/24/2026
Merged by: @mikeyobrien

Base: mainHead: feat/rpc-v1-control-plane-cutover


📝 Commits (10+)

  • 5bb1d20 Fix CLI backend validation and command UX consistency
  • 4c9c2f4 Align CLI config behavior and docs with runtime
  • 7de30f8 feat: add Rust RPC v1 control plane and migrate web client
  • 1f8e77e refactor: simplify CLI/core text and loop utilities
  • 86a835f fix(ci): make rpc schema assets tracked and clean rust checks
  • 1fe9b55 fix: honor hat args and reject deprecated project key
  • 0c109af fix: harden rpc-v1 auth and planning session safety
  • 5bace59 fix(api): harden rpc-v1 control plane safety
  • a908444 fix(cli): keep single-file config support with hats override precedence
  • 358883e fix(fmt): apply rustfmt to rpc-v1 changes

📊 Changes

125 files changed (+14551 additions, -1832 deletions)

View changed files

📝 .hooks/pre-commit (+86 -25)
📝 .ralph/agent/decisions.md (+8 -0)
📝 Cargo.lock (+586 -20)
📝 Cargo.toml (+2 -0)
📝 README.md (+14 -7)
crates/ralph-api/Cargo.toml (+33 -0)
crates/ralph-api/README.md (+81 -0)
crates/ralph-api/data/rpc-v1-events.json (+396 -0)
crates/ralph-api/data/rpc-v1-schema.json (+1146 -0)
crates/ralph-api/src/auth.rs (+143 -0)
crates/ralph-api/src/collection_domain.rs (+351 -0)
crates/ralph-api/src/collection_domain/yaml.rs (+306 -0)
crates/ralph-api/src/config.rs (+199 -0)
crates/ralph-api/src/config_domain.rs (+126 -0)
crates/ralph-api/src/errors.rs (+205 -0)
crates/ralph-api/src/idempotency.rs (+140 -0)
crates/ralph-api/src/lib.rs (+20 -0)
crates/ralph-api/src/loop_domain.rs (+457 -0)
crates/ralph-api/src/loop_side_effects.rs (+105 -0)
crates/ralph-api/src/loop_support.rs (+64 -0)

...and 80 more files

📄 Description

Summary

  • add new Rust API crate (crates/ralph-api) implementing an RPC v1 control-plane runtime
  • migrate the web client data layer to RPC v1 calls + streaming client
  • align CLI/docs around core config + hat collection usage (-c + -H) and updated web startup paths
  • keep backward compatibility for users on single-file combined configs (-c ralph.yml with hats)
  • enforce precedence when both are supplied: -H overrides hats/events (and overlapping event_loop keys) from -c
  • add dedicated CLI integration coverage for configuration precedence (crates/ralph-cli/tests/integration_config_precedence.rs)
  • add RPC v1 contract fixtures/tests and parity regressions
  • harden control-plane safety after cutover:
    • enforce token-mode config requirements and websocket principal matching
    • lock trusted-local auth to loopback hosts by default
    • block planning session path traversal / hidden-file / symlink artifact escapes
    • enforce task state invariants (autoExecute + terminal/non-terminal field resets)
    • route loop.process through real CLI flow (ralph loops process) for parity
    • support hat-level backend args (backend_args / args) and reject deprecated project config key with clear error

Commits in this PR

  • 5bb1d20 Fix CLI backend validation and command UX consistency
  • 4c9c2f4 Align CLI config behavior and docs with runtime
  • 7de30f8 feat: add Rust RPC v1 control plane and migrate web client
  • 1f8e77e refactor: simplify CLI/core text and loop utilities
  • 86a835f fix(ci): make rpc schema assets tracked and clean rust checks
  • 1fe9b55 fix: honor hat args and reject deprecated project key
  • 0c109af fix: harden rpc-v1 auth and planning session safety
  • 5bace59 fix(api): harden rpc-v1 control plane safety
  • a908444 fix(cli): keep single-file config support with hats override precedence
  • 358883e fix(fmt): apply rustfmt to rpc-v1 changes
  • 4731fc4 docs: clarify single-file config compatibility and hats precedence
  • 3c7f8fb test(cli): add integration suite for config precedence

Validation

  • cargo test
  • cargo test -p ralph-cli --test integration_config_precedence
  • cargo test -p ralph-cli

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mikeyobrien/ralph-orchestrator/pull/181 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 2/21/2026 **Status:** ✅ Merged **Merged:** 2/24/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `feat/rpc-v1-control-plane-cutover` --- ### 📝 Commits (10+) - [`5bb1d20`](https://github.com/mikeyobrien/ralph-orchestrator/commit/5bb1d2086219ed9b99d5ddc2fedfd33fc12951f5) Fix CLI backend validation and command UX consistency - [`4c9c2f4`](https://github.com/mikeyobrien/ralph-orchestrator/commit/4c9c2f469ad0b736ce330d80724edca323b3ce06) Align CLI config behavior and docs with runtime - [`7de30f8`](https://github.com/mikeyobrien/ralph-orchestrator/commit/7de30f8cb9edee156b25084ab8f6a5eaa93d24b6) feat: add Rust RPC v1 control plane and migrate web client - [`1f8e77e`](https://github.com/mikeyobrien/ralph-orchestrator/commit/1f8e77ed8f9fb89df59d25414cd1b648213ce78a) refactor: simplify CLI/core text and loop utilities - [`86a835f`](https://github.com/mikeyobrien/ralph-orchestrator/commit/86a835f6f44a9f7d6cf98e2f229b57cee92fe243) fix(ci): make rpc schema assets tracked and clean rust checks - [`1fe9b55`](https://github.com/mikeyobrien/ralph-orchestrator/commit/1fe9b55dbedea085862e0b43c8eebfc4978704ee) fix: honor hat args and reject deprecated project key - [`0c109af`](https://github.com/mikeyobrien/ralph-orchestrator/commit/0c109aff55ba394713f8d3dfa2435bc2f51cfd10) fix: harden rpc-v1 auth and planning session safety - [`5bace59`](https://github.com/mikeyobrien/ralph-orchestrator/commit/5bace59daf61df7efb798a38867caf5f3bc4a760) fix(api): harden rpc-v1 control plane safety - [`a908444`](https://github.com/mikeyobrien/ralph-orchestrator/commit/a908444e76e597d622dc8ac9c3351d3b208b0fc1) fix(cli): keep single-file config support with hats override precedence - [`358883e`](https://github.com/mikeyobrien/ralph-orchestrator/commit/358883eb070cc543bd40841c6cdd069bf99821a1) fix(fmt): apply rustfmt to rpc-v1 changes ### 📊 Changes **125 files changed** (+14551 additions, -1832 deletions) <details> <summary>View changed files</summary> 📝 `.hooks/pre-commit` (+86 -25) 📝 `.ralph/agent/decisions.md` (+8 -0) 📝 `Cargo.lock` (+586 -20) 📝 `Cargo.toml` (+2 -0) 📝 `README.md` (+14 -7) ➕ `crates/ralph-api/Cargo.toml` (+33 -0) ➕ `crates/ralph-api/README.md` (+81 -0) ➕ `crates/ralph-api/data/rpc-v1-events.json` (+396 -0) ➕ `crates/ralph-api/data/rpc-v1-schema.json` (+1146 -0) ➕ `crates/ralph-api/src/auth.rs` (+143 -0) ➕ `crates/ralph-api/src/collection_domain.rs` (+351 -0) ➕ `crates/ralph-api/src/collection_domain/yaml.rs` (+306 -0) ➕ `crates/ralph-api/src/config.rs` (+199 -0) ➕ `crates/ralph-api/src/config_domain.rs` (+126 -0) ➕ `crates/ralph-api/src/errors.rs` (+205 -0) ➕ `crates/ralph-api/src/idempotency.rs` (+140 -0) ➕ `crates/ralph-api/src/lib.rs` (+20 -0) ➕ `crates/ralph-api/src/loop_domain.rs` (+457 -0) ➕ `crates/ralph-api/src/loop_side_effects.rs` (+105 -0) ➕ `crates/ralph-api/src/loop_support.rs` (+64 -0) _...and 80 more files_ </details> ### 📄 Description ## Summary - add new Rust API crate (`crates/ralph-api`) implementing an RPC v1 control-plane runtime - migrate the web client data layer to RPC v1 calls + streaming client - align CLI/docs around core config + hat collection usage (`-c` + `-H`) and updated web startup paths - keep backward compatibility for users on single-file combined configs (`-c ralph.yml` with hats) - enforce precedence when both are supplied: `-H` overrides hats/events (and overlapping `event_loop` keys) from `-c` - add dedicated CLI integration coverage for configuration precedence (`crates/ralph-cli/tests/integration_config_precedence.rs`) - add RPC v1 contract fixtures/tests and parity regressions - harden control-plane safety after cutover: - enforce token-mode config requirements and websocket principal matching - lock trusted-local auth to loopback hosts by default - block planning session path traversal / hidden-file / symlink artifact escapes - enforce task state invariants (`autoExecute` + terminal/non-terminal field resets) - route `loop.process` through real CLI flow (`ralph loops process`) for parity - support hat-level backend args (`backend_args` / `args`) and reject deprecated `project` config key with clear error ## Commits in this PR - 5bb1d20 Fix CLI backend validation and command UX consistency - 4c9c2f4 Align CLI config behavior and docs with runtime - 7de30f8 feat: add Rust RPC v1 control plane and migrate web client - 1f8e77e refactor: simplify CLI/core text and loop utilities - 86a835f fix(ci): make rpc schema assets tracked and clean rust checks - 1fe9b55 fix: honor hat args and reject deprecated project key - 0c109af fix: harden rpc-v1 auth and planning session safety - 5bace59 fix(api): harden rpc-v1 control plane safety - a908444 fix(cli): keep single-file config support with hats override precedence - 358883e fix(fmt): apply rustfmt to rpc-v1 changes - 4731fc4 docs: clarify single-file config compatibility and hats precedence - 3c7f8fb test(cli): add integration suite for config precedence ## Validation - `cargo test` - `cargo test -p ralph-cli --test integration_config_precedence` - `cargo test -p ralph-cli` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:22:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ralph-orchestrator#182
No description provided.