cli

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

commit 8e2dd9402d1b0fb1230bd63298ab208bf298ab85
parent c256673218325495ad82312f30a5093c9f3daf89
Author: triesap <tyson@radroots.org>
Date:   Tue,  7 Jul 2026 23:33:46 +0000

transport: share reticulum unavailable CLI copy

Diffstat:
Msrc/ops/exec/core.rs | 7+++----
Msrc/runtime/provider.rs | 3++-
Mtests/target_cli.rs | 35+++++++++++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/src/ops/exec/core.rs b/src/ops/exec/core.rs @@ -1,5 +1,6 @@ use std::path::PathBuf; +use radroots_transport::RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE; use serde::Serialize; use serde_json::{Value, json}; @@ -866,16 +867,14 @@ fn publish_runtime_view( transport_family: config.transport.profile.transport_family().to_owned(), state: "preview_unavailable".to_owned(), executable: false, - reason: Some( - "reticulum preview transport does not perform MVP network delivery".to_owned(), - ), + reason: Some(RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE.to_owned()), signed_write_required, relay, provider: PublishProviderRuntimeView { provider_runtime_id: "reticulum_preview".to_owned(), state: "preview_unavailable".to_owned(), source: config.transport.source.as_str().to_owned(), - reason: Some("reticulum preview is non-networked in the MVP".to_owned()), + reason: Some(RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE.to_owned()), }, }, } diff --git a/src/runtime/provider.rs b/src/runtime/provider.rs @@ -6,6 +6,7 @@ use crate::runtime::config::{RuntimeConfig, TransportProfileKind}; #[cfg(test)] use crate::runtime::hyf; use crate::view::runtime::PublishRuntimeView; +use radroots_transport::RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE; #[cfg(test)] const WRITE_PLANE_TARGET_DETAIL: &str = @@ -114,7 +115,7 @@ pub fn resolve_write_plane_provider( TransportProfileKind::ReticulumPreview => ( "reticulum_preview", "reticulum_preview", - "reticulum preview transport is non-networked in the MVP", + RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE, ), }; WritePlaneProviderView { diff --git a/tests/target_cli.rs b/tests/target_cli.rs @@ -1353,6 +1353,41 @@ fn transport_status_reticulum_preview_output_reports_unusable_preview_state() { } #[test] +fn config_get_reticulum_preview_transport_exec_readiness_uses_shared_unavailable_copy() { + let sandbox = RadrootsCliSandbox::new(); + sandbox.write_app_config( + "[transport]\nprofile = \"reticulum_preview\"\n\n[transport.reticulum_preview]\nbehavior = \"defer_delivery_plans\"\n", + ); + + let value = sandbox.json_success(&["--format", "json", "config", "get"]); + let result = &value["result"]; + + assert_eq!(value["operation_id"], "config.get"); + assert_eq!(result["publish"]["transport"], "reticulum_preview"); + assert_eq!(result["publish"]["state"], "preview_unavailable"); + assert_eq!(result["publish"]["executable"], false); + assert_eq!( + result["publish"]["reason"], + RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE + ); + assert_eq!( + result["publish"]["provider"]["reason"], + RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE + ); + assert_eq!( + result["write_plane"]["detail"], + RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE + ); + assert_eq!( + result["transport"]["message"], + RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE + ); + let result_json = serde_json::to_string(result).expect("result json"); + assert!(!result_json.contains("MVP network delivery")); + assert!(!result_json.contains("non-networked in the MVP")); +} + +#[test] fn mesh_status_reports_reticulum_preview_unusable_state_without_fallback() { let sandbox = RadrootsCliSandbox::new();