commit c256673218325495ad82312f30a5093c9f3daf89
parent c83b69f154fb172d91a0c7b2649007559302a578
Author: triesap <tyson@radroots.org>
Date: Tue, 7 Jul 2026 19:40:27 +0000
transport: consume shared Reticulum message
- add direct shared transport dependency for status copy ownership
- replace the CLI-local Reticulum unavailable message constant
- update transport status tests to assert the shared message source
- keep profile output shape unchanged while removing duplicated copy
Diffstat:
4 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -3640,6 +3640,7 @@ dependencies = [
"radroots_sp1_host_trade",
"radroots_sql_core",
"radroots_trade",
+ "radroots_transport",
"radroots_transport_nostr",
"serde",
"serde_json",
diff --git a/Cargo.toml b/Cargo.toml
@@ -42,6 +42,7 @@ radroots_protected_store = { path = "../lib/crates/protected_store", features =
radroots_replica_db = { path = "../lib/crates/replica_db" }
radroots_replica_db_schema = { path = "../lib/crates/replica_db_schema" }
radroots_replica_sync = { path = "../lib/crates/replica_sync" }
+radroots_transport = { path = "../lib/crates/transport", default-features = false }
radroots_transport_nostr = { path = "../lib/crates/transport_nostr", default-features = false, features = [
"runtime-tokio",
] }
diff --git a/src/runtime/transport.rs b/src/runtime/transport.rs
@@ -1,6 +1,7 @@
use std::fs;
use radroots_sdk::{PushOutboxRequest, SyncStatusRequest};
+use radroots_transport::RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE;
use serde_json::Value as JsonValue;
use toml::{Value, map::Map};
@@ -13,11 +14,6 @@ use crate::view::runtime::{
};
const TRANSPORT_SOURCE: &str = "transport profile config";
-const RETICULUM_PREVIEW_UNAVAILABLE_MESSAGE: &str = concat!(
- "Reticulum transport is configured for future compatibility, ",
- "but this build does not implement Reticulum delivery."
-);
-
pub fn profile(config: &RuntimeConfig) -> TransportProfileView {
active_profile_view(config)
}
@@ -234,7 +230,7 @@ fn profile_view_from_parts(
let message = match profile_id {
"nostr" if usable_for_delivery => "Nostr relay transport is configured for delivery",
"nostr" => "Nostr transport requires configured Nostr relay targets",
- "reticulum_preview" => RETICULUM_PREVIEW_UNAVAILABLE_MESSAGE,
+ "reticulum_preview" => RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE,
"proxy" => "Proxy transport delegates delivery to the configured endpoint",
_ => "Local-only profile does not deliver to network transports",
};
diff --git a/tests/target_cli.rs b/tests/target_cli.rs
@@ -34,6 +34,7 @@ use radroots_replica_db::{farm, migrations};
use radroots_replica_db_schema::farm::IFarmFields;
use radroots_replica_sync::radroots_replica_pending_publish_batch;
use radroots_sql_core::SqliteExecutor;
+use radroots_transport::RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE;
use serde_json::Value;
use serde_json::json;
@@ -1300,10 +1301,7 @@ fn transport_profile_reticulum_preview_output_is_transport_specific() {
assert_eq!(result["implementation_state"], "preview_unavailable");
assert_eq!(result["usable_for_delivery"], false);
assert_eq!(result["reticulum_preview_behavior"], "defer_delivery_plans");
- assert_eq!(
- result["message"],
- "Reticulum transport is configured for future compatibility, but this build does not implement Reticulum delivery."
- );
+ assert_eq!(result["message"], RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE);
assert!(
!result["message"]
.as_str()
@@ -1340,10 +1338,7 @@ fn transport_status_reticulum_preview_output_reports_unusable_preview_state() {
assert_eq!(active["implementation_state"], "preview_unavailable");
assert_eq!(active["usable_for_delivery"], false);
assert_eq!(active["reticulum_preview_behavior"], "defer_delivery_plans");
- assert_eq!(
- active["message"],
- "Reticulum transport is configured for future compatibility, but this build does not implement Reticulum delivery."
- );
+ assert_eq!(active["message"], RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE);
assert!(
!active["message"]
.as_str()
@@ -1412,9 +1407,7 @@ fn transport_source_boundary_rejects_removed_relay_and_publish_proxy_surfaces()
let transport_source =
fs::read_to_string(manifest_dir.join("src/runtime/transport.rs")).expect("read source");
for required in [
- "RETICULUM_PREVIEW_UNAVAILABLE_MESSAGE",
- "Reticulum transport is configured for future compatibility, ",
- "but this build does not implement Reticulum delivery.",
+ "RADROOTS_RETICULUM_UNAVAILABLE_MESSAGE",
"if config.transport.profile != TransportProfileKind::ReticulumPreview",
] {
assert!(