cli

Command-line interface for Radroots
git clone https://radroots.dev/git/cli.git
Log | Files | Refs | README | LICENSE

commit 01bd13eb27cdb36befa45d3cfc746a055b1f7ebe
parent a8b321470a4596a069ace3c461bb9bf1959c7919
Author: triesap <tyson@radroots.org>
Date:   Mon, 27 Apr 2026 20:24:04 +0000

cli: remove runtime job command surface

- drop runtime and job parser and registry entries
- remove daemon management dispatch from public operations
- update command docs and acceptance tests
- keep signer relay and sync runtime service paths active

Diffstat:
Msrc/main.rs | 28----------------------------
Msrc/operation_adapter.rs | 9---------
Msrc/operation_registry.rs | 154++-----------------------------------------------------------------------------
Msrc/operation_runtime.rs | 344+------------------------------------------------------------------------------
Msrc/target_cli.rs | 85-------------------------------------------------------------------------------
Mtests/target_cli.rs | 28++--------------------------
6 files changed, 9 insertions(+), 639 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -176,33 +176,6 @@ fn execute_request( TargetOperationRequest::SyncWatch(request) => { execute_with(RuntimeOperationService::new(config), request) } - TargetOperationRequest::RuntimeStatusGet(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::RuntimeStart(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::RuntimeStop(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::RuntimeRestart(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::RuntimeLogWatch(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::RuntimeConfigGet(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::JobGet(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::JobList(request) => { - execute_with(RuntimeOperationService::new(config), request) - } - TargetOperationRequest::JobWatch(request) => { - execute_with(RuntimeOperationService::new(config), request) - } TargetOperationRequest::FarmCreate(request) => { execute_with(FarmOperationService::new(config), request) } @@ -407,7 +380,6 @@ fn external_network_operation(operation_id: &str) -> bool { | "listing.archive" | "order.submit" | "order.event.watch" - | "job.watch" ) } diff --git a/src/operation_adapter.rs b/src/operation_adapter.rs @@ -1154,15 +1154,6 @@ target_operation_contracts! { SyncPull => (SyncPullRequest, SyncPullResult, "sync.pull"), SyncPush => (SyncPushRequest, SyncPushResult, "sync.push"), SyncWatch => (SyncWatchRequest, SyncWatchResult, "sync.watch"), - RuntimeStatusGet => (RuntimeStatusGetRequest, RuntimeStatusGetResult, "runtime.status.get"), - RuntimeStart => (RuntimeStartRequest, RuntimeStartResult, "runtime.start"), - RuntimeStop => (RuntimeStopRequest, RuntimeStopResult, "runtime.stop"), - RuntimeRestart => (RuntimeRestartRequest, RuntimeRestartResult, "runtime.restart"), - RuntimeLogWatch => (RuntimeLogWatchRequest, RuntimeLogWatchResult, "runtime.log.watch"), - RuntimeConfigGet => (RuntimeConfigGetRequest, RuntimeConfigGetResult, "runtime.config.get"), - JobGet => (JobGetRequest, JobGetResult, "job.get"), - JobList => (JobListRequest, JobListResult, "job.list"), - JobWatch => (JobWatchRequest, JobWatchResult, "job.watch"), FarmCreate => (FarmCreateRequest, FarmCreateResult, "farm.create"), FarmGet => (FarmGetRequest, FarmGetResult, "farm.get"), FarmProfileUpdate => (FarmProfileUpdateRequest, FarmProfileUpdateResult, "farm.profile.update"), diff --git a/src/operation_registry.rs b/src/operation_registry.rs @@ -422,141 +422,6 @@ pub const OPERATION_REGISTRY: &[OperationSpec] = &[ false ), operation!( - "runtime.status.get", - "radroots runtime status get", - "runtime", - "runtime_status_get", - "RuntimeStatusGetRequest", - "RuntimeStatusGetResult", - "Get runtime status.", - Any, - false, - None, - Low, - false, - false - ), - operation!( - "runtime.start", - "radroots runtime start", - "runtime", - "runtime_start", - "RuntimeStartRequest", - "RuntimeStartResult", - "Start runtime.", - Any, - true, - None, - Medium, - false, - true - ), - operation!( - "runtime.stop", - "radroots runtime stop", - "runtime", - "runtime_stop", - "RuntimeStopRequest", - "RuntimeStopResult", - "Stop runtime.", - Any, - true, - None, - Medium, - false, - true - ), - operation!( - "runtime.restart", - "radroots runtime restart", - "runtime", - "runtime_restart", - "RuntimeRestartRequest", - "RuntimeRestartResult", - "Restart runtime.", - Any, - true, - None, - Medium, - false, - true - ), - operation!( - "runtime.log.watch", - "radroots runtime log watch", - "runtime", - "runtime_log_watch", - "RuntimeLogWatchRequest", - "RuntimeLogWatchResult", - "Stream runtime logs.", - Any, - false, - None, - Low, - true, - false - ), - operation!( - "runtime.config.get", - "radroots runtime config get", - "runtime", - "runtime_config_get", - "RuntimeConfigGetRequest", - "RuntimeConfigGetResult", - "Read runtime configuration.", - Any, - false, - None, - Low, - false, - false - ), - operation!( - "job.get", - "radroots job get", - "job", - "job_get", - "JobGetRequest", - "JobGetResult", - "Get job details.", - Any, - false, - None, - Low, - false, - false - ), - operation!( - "job.list", - "radroots job list", - "job", - "job_list", - "JobListRequest", - "JobListResult", - "List jobs.", - Any, - false, - None, - Low, - true, - false - ), - operation!( - "job.watch", - "radroots job watch", - "job", - "job_watch", - "JobWatchRequest", - "JobWatchResult", - "Stream job events.", - Any, - false, - None, - Low, - true, - false - ), - operation!( "farm.create", "radroots farm create", "farm", @@ -1053,15 +918,6 @@ mod tests { "sync.pull", "sync.push", "sync.watch", - "runtime.status.get", - "runtime.start", - "runtime.stop", - "runtime.restart", - "runtime.log.watch", - "runtime.config.get", - "job.get", - "job.list", - "job.watch", "farm.create", "farm.get", "farm.profile.update", @@ -1105,9 +961,6 @@ mod tests { "store.backup.create", "sync.pull", "sync.push", - "runtime.start", - "runtime.stop", - "runtime.restart", "farm.create", "farm.profile.update", "farm.location.update", @@ -1136,7 +989,7 @@ mod tests { .copied() .collect::<BTreeSet<_>>(); assert_eq!(actual, expected); - assert_eq!(OPERATION_REGISTRY.len(), 62); + assert_eq!(OPERATION_REGISTRY.len(), 53); } #[test] @@ -1241,9 +1094,6 @@ mod tests { "sync.pull", "sync.push", "sync.watch", - "runtime.log.watch", - "job.list", - "job.watch", "listing.list", "market.refresh", "market.product.search", @@ -1269,6 +1119,8 @@ mod tests { assert!(!namespaces.contains("message")); assert!(!namespaces.contains("approval")); assert!(!namespaces.contains("agent")); + assert!(!namespaces.contains("runtime")); + assert!(!namespaces.contains("job")); } #[test] diff --git a/src/operation_runtime.rs b/src/operation_runtime.rs @@ -1,27 +1,17 @@ use serde::Serialize; -use serde_json::{Value, json}; +use serde_json::Value; use crate::operation_adapter::{ - JobGetRequest, JobGetResult, JobListRequest, JobListResult, JobWatchRequest, JobWatchResult, OperationAdapterError, OperationRequest, OperationRequestData, OperationRequestPayload, OperationResult, OperationResultData, OperationService, RelayListRequest, RelayListResult, - RuntimeConfigGetRequest, RuntimeConfigGetResult, RuntimeLogWatchRequest, RuntimeLogWatchResult, - RuntimeRestartRequest, RuntimeRestartResult, RuntimeStartRequest, RuntimeStartResult, - RuntimeStatusGetRequest, RuntimeStatusGetResult, RuntimeStopRequest, RuntimeStopResult, SignerStatusGetRequest, SignerStatusGetResult, SyncPullRequest, SyncPullResult, SyncPushRequest, SyncPushResult, SyncStatusGetRequest, SyncStatusGetResult, SyncWatchRequest, SyncWatchResult, }; use crate::runtime::RuntimeError; use crate::runtime::config::RuntimeConfig; -use crate::runtime::daemon::{self, DaemonRpcError}; -use crate::runtime::management::{ - RuntimeLifecycleAction, inspect_action, inspect_config_show, inspect_logs, inspect_status, -}; use crate::runtime_args::SyncWatchArgs; -const DEFAULT_RUNTIME_ID: &str = "radrootsd"; - pub struct RuntimeOperationService<'a> { config: &'a RuntimeConfig, } @@ -108,251 +98,6 @@ impl OperationService<SyncWatchRequest> for RuntimeOperationService<'_> { } } -impl OperationService<RuntimeStatusGetRequest> for RuntimeOperationService<'_> { - type Result = RuntimeStatusGetResult; - - fn execute( - &self, - request: OperationRequest<RuntimeStatusGetRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - let target = runtime_target(&request); - let inspection = map_runtime(inspect_status( - self.config, - target.runtime_id.as_str(), - target.instance_id.as_deref(), - ))?; - serialized_operation_result::<RuntimeStatusGetResult, _>(&inspection.view) - } -} - -impl OperationService<RuntimeStartRequest> for RuntimeOperationService<'_> { - type Result = RuntimeStartResult; - - fn execute( - &self, - request: OperationRequest<RuntimeStartRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - runtime_action::<RuntimeStartResult>(self.config, &request, RuntimeLifecycleAction::Start) - } -} - -impl OperationService<RuntimeStopRequest> for RuntimeOperationService<'_> { - type Result = RuntimeStopResult; - - fn execute( - &self, - request: OperationRequest<RuntimeStopRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - runtime_action::<RuntimeStopResult>(self.config, &request, RuntimeLifecycleAction::Stop) - } -} - -impl OperationService<RuntimeRestartRequest> for RuntimeOperationService<'_> { - type Result = RuntimeRestartResult; - - fn execute( - &self, - request: OperationRequest<RuntimeRestartRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - runtime_action::<RuntimeRestartResult>( - self.config, - &request, - RuntimeLifecycleAction::Restart, - ) - } -} - -impl OperationService<RuntimeLogWatchRequest> for RuntimeOperationService<'_> { - type Result = RuntimeLogWatchResult; - - fn execute( - &self, - request: OperationRequest<RuntimeLogWatchRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - let target = runtime_target(&request); - let inspection = map_runtime(inspect_logs( - self.config, - target.runtime_id.as_str(), - target.instance_id.as_deref(), - ))?; - serialized_operation_result::<RuntimeLogWatchResult, _>(&inspection.view) - } -} - -impl OperationService<RuntimeConfigGetRequest> for RuntimeOperationService<'_> { - type Result = RuntimeConfigGetResult; - - fn execute( - &self, - request: OperationRequest<RuntimeConfigGetRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - let target = runtime_target(&request); - let inspection = map_runtime(inspect_config_show( - self.config, - target.runtime_id.as_str(), - target.instance_id.as_deref(), - ))?; - serialized_operation_result::<RuntimeConfigGetResult, _>(&inspection.view) - } -} - -impl OperationService<JobListRequest> for RuntimeOperationService<'_> { - type Result = JobListResult; - - fn execute( - &self, - _request: OperationRequest<JobListRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - match daemon::bridge_job_list(self.config) { - Ok(jobs) => json_operation_result::<JobListResult>(json!({ - "state": if jobs.is_empty() { "empty" } else { "ready" }, - "source": daemon::bridge_source(), - "rpc_url": self.config.rpc.url, - "count": jobs.len(), - "reason": null, - "jobs": jobs, - "actions": [], - })), - Err(error) => job_error_result::<JobListResult>(self.config, error, None), - } - } -} - -impl OperationService<JobGetRequest> for RuntimeOperationService<'_> { - type Result = JobGetResult; - - fn execute( - &self, - request: OperationRequest<JobGetRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - let job_id = required_string(&request, "job_id")?; - match daemon::bridge_job(self.config, job_id.as_str()) { - Ok(Some(job)) => json_operation_result::<JobGetResult>(json!({ - "state": "ready", - "source": daemon::bridge_source(), - "rpc_url": self.config.rpc.url, - "lookup": job_id, - "reason": null, - "job": job, - "actions": [], - })), - Ok(None) => json_operation_result::<JobGetResult>(json!({ - "state": "missing", - "source": daemon::bridge_source(), - "rpc_url": self.config.rpc.url, - "lookup": job_id, - "reason": format!("job `{job_id}` was not found in radrootsd"), - "job": null, - "actions": ["radroots job list"], - })), - Err(error) => job_error_result::<JobGetResult>(self.config, error, Some(job_id)), - } - } -} - -impl OperationService<JobWatchRequest> for RuntimeOperationService<'_> { - type Result = JobWatchResult; - - fn execute( - &self, - request: OperationRequest<JobWatchRequest>, - ) -> Result<OperationResult<Self::Result>, OperationAdapterError> { - let job_id = required_string(&request, "job_id")?; - let interval_ms = u64_input(&request, "interval_ms").unwrap_or(1_000); - match daemon::bridge_job(self.config, job_id.as_str()) { - Ok(Some(job)) => json_operation_result::<JobWatchResult>(json!({ - "state": if job.terminal { job.state.as_str() } else { "watching" }, - "source": daemon::bridge_source(), - "rpc_url": self.config.rpc.url, - "job_id": job_id, - "interval_ms": interval_ms, - "reason": null, - "frames": [{ - "sequence": 1, - "observed_at_unix": job.completed_at_unix.unwrap_or(job.requested_at_unix), - "state": job.state, - "terminal": job.terminal, - "signer": job.signer, - "signer_session_id": job.signer_session_id, - "summary": job.relay_outcome_summary, - }], - "actions": [], - })), - Ok(None) => json_operation_result::<JobWatchResult>(json!({ - "state": "missing", - "source": daemon::bridge_source(), - "rpc_url": self.config.rpc.url, - "job_id": job_id, - "interval_ms": interval_ms, - "reason": format!("job `{job_id}` was not found in radrootsd"), - "frames": [], - "actions": ["radroots job list"], - })), - Err(error) => job_error_result::<JobWatchResult>(self.config, error, Some(job_id)), - } - } -} - -fn runtime_action<R>( - config: &RuntimeConfig, - request: &OperationRequest<impl OperationRequestPayload + OperationRequestData>, - action: RuntimeLifecycleAction, -) -> Result<OperationResult<R>, OperationAdapterError> -where - R: OperationResultData, -{ - let target = runtime_target(request); - let inspection = map_runtime(inspect_action( - config, - target.runtime_id.as_str(), - target.instance_id.as_deref(), - action, - request.context.dry_run, - ))?; - serialized_operation_result::<R, _>(&inspection.view) -} - -fn job_error_result<R>( - config: &RuntimeConfig, - error: DaemonRpcError, - lookup: Option<String>, -) -> Result<OperationResult<R>, OperationAdapterError> -where - R: OperationResultData, -{ - let (state, reason, actions) = match error { - DaemonRpcError::Unconfigured(reason) - | DaemonRpcError::Unauthorized(reason) - | DaemonRpcError::MethodUnavailable(reason) => ( - "unconfigured", - reason, - vec![ - "set RADROOTS_RPC_BEARER_TOKEN in .env or your shell", - "start radrootsd with bridge ingress enabled", - ], - ), - DaemonRpcError::External(reason) => ( - "unavailable", - reason, - vec!["start radrootsd and verify the rpc url"], - ), - DaemonRpcError::InvalidResponse(reason) - | DaemonRpcError::Remote(reason) - | DaemonRpcError::UnknownJob(reason) => ("error", reason, Vec::new()), - }; - json_operation_result::<R>(json!({ - "state": state, - "source": daemon::bridge_source(), - "rpc_url": config.rpc.url, - "lookup": lookup, - "reason": reason, - "count": 0, - "jobs": [], - "job": null, - "actions": actions, - })) -} - fn serialized_operation_result<R, T>(value: &T) -> Result<OperationResult<R>, OperationAdapterError> where R: OperationResultData, @@ -361,59 +106,10 @@ where OperationResult::new(R::from_serializable(value)?) } -fn json_operation_result<R>(value: Value) -> Result<OperationResult<R>, OperationAdapterError> -where - R: OperationResultData, -{ - OperationResult::new(R::from_value(value)) -} - fn map_runtime<T>(result: Result<T, RuntimeError>) -> Result<T, OperationAdapterError> { result.map_err(|error| OperationAdapterError::Runtime(error.to_string())) } -#[derive(Debug, Clone, PartialEq, Eq)] -struct RuntimeTargetInput { - runtime_id: String, - instance_id: Option<String>, -} - -fn runtime_target<P>(request: &OperationRequest<P>) -> RuntimeTargetInput -where - P: OperationRequestPayload + OperationRequestData, -{ - RuntimeTargetInput { - runtime_id: string_input(request, "runtime_id") - .unwrap_or_else(|| DEFAULT_RUNTIME_ID.into()), - instance_id: string_input(request, "instance_id"), - } -} - -fn required_string<P>( - request: &OperationRequest<P>, - key: &str, -) -> Result<String, OperationAdapterError> -where - P: OperationRequestPayload + OperationRequestData, -{ - string_input(request, key).ok_or_else(|| OperationAdapterError::InvalidInput { - operation_id: request.operation_id().to_owned(), - message: format!("missing required `{key}` input"), - }) -} - -fn string_input<P>(request: &OperationRequest<P>, key: &str) -> Option<String> -where - P: OperationRequestPayload + OperationRequestData, -{ - request - .payload - .input() - .get(key) - .and_then(Value::as_str) - .map(str::to_owned) -} - fn usize_input<P>(request: &OperationRequest<P>, key: &str) -> Option<usize> where P: OperationRequestPayload + OperationRequestData, @@ -443,8 +139,8 @@ mod tests { use super::RuntimeOperationService; use crate::operation_adapter::{ - JobListRequest, OperationAdapter, OperationContext, OperationRequest, RelayListRequest, - RuntimeStatusGetRequest, SignerStatusGetRequest, SyncStatusGetRequest, + OperationAdapter, OperationContext, OperationRequest, RelayListRequest, + SignerStatusGetRequest, SyncStatusGetRequest, }; use crate::runtime::config::{ AccountConfig, AccountSecretContractConfig, HyfConfig, IdentityConfig, InteractionConfig, @@ -485,7 +181,7 @@ mod tests { } #[test] - fn runtime_service_backs_sync_and_job_unavailable_states() { + fn runtime_service_backs_sync_status() { let dir = tempdir().expect("tempdir"); let config = sample_config(dir.path(), Vec::new()); let service = OperationAdapter::new(RuntimeOperationService::new(&config)); @@ -500,38 +196,6 @@ mod tests { .expect("sync envelope"); assert_eq!(sync_envelope.operation_id, "sync.status.get"); assert_eq!(sync_envelope.result["state"], "unconfigured"); - - let job = OperationRequest::new(OperationContext::default(), JobListRequest::default()) - .expect("job list request"); - let job_envelope = service - .execute(job) - .expect("job list result") - .to_envelope(OperationContext::default().envelope_context("req_job")) - .expect("job envelope"); - assert_eq!(job_envelope.operation_id, "job.list"); - assert_eq!(job_envelope.result["state"], "unconfigured"); - assert!(job_envelope.result["reason"].is_string()); - } - - #[test] - fn runtime_service_backs_runtime_status_default_target() { - let dir = tempdir().expect("tempdir"); - let config = sample_config(dir.path(), Vec::new()); - let service = OperationAdapter::new(RuntimeOperationService::new(&config)); - let request = OperationRequest::new( - OperationContext::default(), - RuntimeStatusGetRequest::default(), - ) - .expect("runtime status request"); - let envelope = service - .execute(request) - .expect("runtime status result") - .to_envelope(OperationContext::default().envelope_context("req_runtime")) - .expect("runtime envelope"); - - assert_eq!(envelope.operation_id, "runtime.status.get"); - assert_eq!(envelope.result["runtime_id"], "radrootsd"); - assert!(envelope.result["state"].is_string()); } fn sample_config(root: &Path, relays: Vec<String>) -> RuntimeConfig { diff --git a/src/target_cli.rs b/src/target_cli.rs @@ -56,8 +56,6 @@ pub enum TargetCommand { Relay(RelayArgs), Store(StoreArgs), Sync(SyncArgs), - Runtime(RuntimeArgs), - Job(JobArgs), Farm(FarmArgs), Listing(ListingArgs), Market(MarketArgs), @@ -121,25 +119,6 @@ impl TargetCommand { SyncCommand::Push => "sync.push", SyncCommand::Watch => "sync.watch", }, - Self::Runtime(args) => match &args.command { - RuntimeCommand::Status(status) => match status.command { - RuntimeStatusCommand::Get => "runtime.status.get", - }, - RuntimeCommand::Start => "runtime.start", - RuntimeCommand::Stop => "runtime.stop", - RuntimeCommand::Restart => "runtime.restart", - RuntimeCommand::Log(log) => match log.command { - RuntimeLogCommand::Watch => "runtime.log.watch", - }, - RuntimeCommand::Config(config) => match config.command { - RuntimeConfigCommand::Get => "runtime.config.get", - }, - }, - Self::Job(args) => match args.command { - JobCommand::Get => "job.get", - JobCommand::List => "job.list", - JobCommand::Watch => "job.watch", - }, Self::Farm(args) => match &args.command { FarmCommand::Create(_) => "farm.create", FarmCommand::Get => "farm.get", @@ -400,68 +379,6 @@ pub enum SyncStatusCommand { } #[derive(Debug, Clone, Args)] -pub struct RuntimeArgs { - #[command(subcommand)] - pub command: RuntimeCommand, -} - -#[derive(Debug, Clone, Subcommand)] -pub enum RuntimeCommand { - Status(RuntimeStatusArgs), - Start, - Stop, - Restart, - Log(RuntimeLogArgs), - Config(RuntimeConfigArgs), -} - -#[derive(Debug, Clone, Args)] -pub struct RuntimeStatusArgs { - #[command(subcommand)] - pub command: RuntimeStatusCommand, -} - -#[derive(Debug, Clone, Copy, Subcommand)] -pub enum RuntimeStatusCommand { - Get, -} - -#[derive(Debug, Clone, Args)] -pub struct RuntimeLogArgs { - #[command(subcommand)] - pub command: RuntimeLogCommand, -} - -#[derive(Debug, Clone, Copy, Subcommand)] -pub enum RuntimeLogCommand { - Watch, -} - -#[derive(Debug, Clone, Args)] -pub struct RuntimeConfigArgs { - #[command(subcommand)] - pub command: RuntimeConfigCommand, -} - -#[derive(Debug, Clone, Copy, Subcommand)] -pub enum RuntimeConfigCommand { - Get, -} - -#[derive(Debug, Clone, Args)] -pub struct JobArgs { - #[command(subcommand)] - pub command: JobCommand, -} - -#[derive(Debug, Clone, Copy, Subcommand)] -pub enum JobCommand { - Get, - List, - Watch, -} - -#[derive(Debug, Clone, Args)] pub struct FarmArgs { #[command(subcommand)] pub command: FarmCommand, @@ -827,8 +744,6 @@ mod tests { "relay", "store", "sync", - "runtime", - "job", "farm", "listing", "market", diff --git a/tests/target_cli.rs b/tests/target_cli.rs @@ -28,8 +28,6 @@ fn root_help_exposes_only_target_namespaces() { "relay", "store", "sync", - "runtime", - "job", "farm", "listing", "market", @@ -44,7 +42,7 @@ fn root_help_exposes_only_target_namespaces() { for removed in [ "setup", "status", "doctor", "sell", "find", "local", "net", "myc", "rpc", "product", - "message", "approval", "agent", + "runtime", "job", "message", "approval", "agent", ] { assert!( !help_lists(&stdout, removed), @@ -97,7 +95,7 @@ fn removed_order_submit_watch_flag_is_rejected_publicly() { fn removed_command_families_are_rejected_publicly() { for command in [ "setup", "status", "doctor", "sell", "find", "local", "net", "myc", "rpc", "product", - "message", "approval", "agent", + "runtime", "job", "message", "approval", "agent", ] { let output = radroots() .arg(command) @@ -120,7 +118,6 @@ fn target_outputs_do_not_suggest_removed_command_families() { ["--format", "json", "listing", "get", "eggs"].as_slice(), ["--format", "json", "listing", "list"].as_slice(), ["--format", "json", "sync", "status", "get"].as_slice(), - ["--format", "json", "runtime", "start"].as_slice(), [ "--format", "json", @@ -598,27 +595,6 @@ fn core_account_store_dry_runs_preflight_without_mutating_local_state() { } #[test] -fn runtime_lifecycle_dry_runs_inspect_without_changing_runtime_status() { - let sandbox = RadrootsCliSandbox::new(); - let before = sandbox.json_success(&["--format", "json", "runtime", "status", "get"]); - - for (command, operation_id, action) in [ - ("start", "runtime.start", "start"), - ("stop", "runtime.stop", "stop"), - ("restart", "runtime.restart", "restart"), - ] { - let value = sandbox.json_success(&["--format", "json", "--dry-run", "runtime", command]); - assert_eq!(value["operation_id"], operation_id); - assert_eq!(value["dry_run"], true); - assert_eq!(value["result"]["action"], action); - assert_eq!(value["result"]["runtime_id"], "radrootsd"); - } - - let after = sandbox.json_success(&["--format", "json", "runtime", "status", "get"]); - assert_eq!(after["result"], before["result"]); -} - -#[test] fn seller_dry_runs_preflight_without_mutating_farm_or_listing_files() { let sandbox = RadrootsCliSandbox::new(); sandbox.json_success(&["--format", "json", "account", "create"]);