Skip to content

Commit 69afe01

Browse files
BiomeOS Developercursoragent
andcommitted
deep debt V: complete unsafe hardening, env centralization, panic elimination
S282 comprehensive deep debt pass: - Migrated last libc::mmap/munmap to rustix::mm in rm_trigger.rs - Closed all 28 unsafe SAFETY doc gaps across 12 files - Evolved 4 production panic paths to Result propagation - Added 56 new socket_env constants, migrated 110 raw env::var sites - Fixed 8 cylinder lib + 13 server clippy errors - Evolved PatchStrategy::from_str to idiomatic impl FromStr - Full workspace: zero libc, zero clippy, 178 lib tests pass Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent afab014 commit 69afe01

104 files changed

Lines changed: 954 additions & 354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,34 @@ All notable changes to ToadStool will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased] - May 28, 2026 (Sessions 43-280)
8+
## [Unreleased] - May 28, 2026 (Sessions 43-282)
9+
10+
### Session S282 (May 28, 2026) — Deep Debt Evolution V: Complete Unsafe Hardening + Env Centralization + Panic Elimination
11+
12+
Comprehensive deep debt pass: libc::mmap→rustix::mm migration, all 28 unsafe SAFETY doc gaps closed, 4 production panic paths evolved to Result propagation, 110→~0 raw env::var sites (56 new socket_env constants, 110 sites migrated across 46 files), 8 pre-existing clippy errors fixed, full workspace clippy -D warnings clean.
13+
14+
- **MIGRATED**: `rm_trigger.rs` BAR0 mmap — all `libc::mmap`/`libc::munmap` evolved to `rustix::mm::mmap`/`rustix::mm::munmap`. Zero `libc::` references remain in workspace.
15+
- **HARDENED**: 28 unsafe SAFETY documentation gaps closed across 12 files: 11 `output_from_ptr` ioctl trait impls (`/// # Safety`), `cache_line_flush` non-x86 stub, 6 BAR0 mmap/volatile blocks in `pmc.rs`/`mapped_bar.rs`/`isolation.rs`, 3 boot bin `Bar0::map` call sites.
16+
- **EVOLVED**: 4 production panic paths → Result propagation: catalyst watchdog `start_watchdog_thread()``std::io::Result<()>`, Akida MMIO `try_read32`/`try_write32`/`try_read64`/`try_write64` alternatives, `CpuComputeResource` Rayon pool → graceful fallback chain, `UnifiedBuffer``BufferError` enum with `validate_creation_params`.
17+
- **EXPANDED**: `socket_env.rs` — +56 new env var constants: monitoring/observability (TELEMETRY, PROMETHEUS_*, JAEGER_ENDPOINT, AUDIT_LOG_PATH), TLS certs (CA_CERT, SERVICE_CERT/KEY), client config (SERVER_URL, TIMEOUT_MS, MAX_RETRIES, RETRY_BACKOFF_MS), discovery (SKIP_DISCOVERY, DISCOVERY_BIND_ADDR, SCAN_SUBNET), profiler (6 vars), substrate detection (PREFERRED, POWER_BUDGET, PERFORMANCE_TARGET), auth (AUTH_AUDIENCE), cross-platform (COMPUTERNAME, ANDROID_ROOT, OS), mainframe (3270/5250 hosts), external SDK (XILINX_XRT, IBM_QUANTUM_TOKEN, RIGETTI_QCS_TOKEN, AKIDA_*, etc.)
18+
- **MIGRATED**: 110 raw `std::env::var("...")` sites → `socket_env::` constants across 46 files spanning all workspace crates: common (11 files), config (5), ember, toadstool (6), auto_config (2), cli (2), client (2), distributed (7), integration (3), neuromorphic, runtime (4), security, testing
19+
- **FIXED**: 8 pre-existing clippy errors in cylinder lib: raw pointer cast constness (pmc.rs → `.cast::<u8>()`), collapsible else-if (driver_ops.rs), `from_str` shadowing `FromStr` trait (module_patch types.rs → proper `impl FromStr`), needless borrow (sovereign_handoff types.rs)
20+
- **FIXED**: 13 clippy warnings in toadstool-server: dead code annotations, redundant closures → function pointers, `.clone()` on Copy type → deref
21+
- **EVOLVED**: `PatchStrategy::from_str` → proper `impl std::str::FromStr` with `.parse()` at call site (idiomatic Rust)
22+
- METRICS: ~410+ env reads via socket_env:: constants (~97%), <10 raw remaining. Zero `libc`. Zero unsafe without SAFETY docs. Zero production panics in lib. 178 lib tests pass, 0 clippy warnings across full workspace.
23+
24+
### Session S281 (May 28, 2026) — Deep Debt Evolution IV: libc Elimination + Unsafe Hardening + Workspace Consolidation
25+
26+
Comprehensive deep debt audit and execution across all dimensions: dependencies (libc→rustix), unsafe (panic elimination, SAFETY comments), env centralization (47 more sites migrated + 33 new constants), workspace dependency consolidation (rustix unified across 10 crates), and diagnostic bin hardening.
27+
28+
- **ELIMINATED**: `libc` dependency from `toadstool-cylinder` — last direct C crate on core hardware path. `rm_trigger.rs` fully evolved from `libc::ioctl` to `rustix::ioctl::Ioctl` trait pattern (matching VFIO ioctl.rs design). New `RmIoctl<OP, T>` adapter with documented SAFETY contracts.
29+
- **FIXED**: `bar_cartography.rs:499` — P0 production panic path `.expect()``if let Some(bp)` guard (BAR diff logic in sovereign GPU diagnostics)
30+
- **HARDENED**: 3 diagnostic bins — added per-block `// SAFETY:` comments to all `unsafe` in `sovereign_pmu_boot.rs`, `sovereign_acr_boot.rs`, `capture_pmu_falcon.rs` (mmap, read_volatile, write_volatile, munmap). Added `/// # Safety` doc contracts on `Bar0::map()`.
31+
- **EVOLVED**: `rm_trigger.rs` — modernized to idiomatic Rust 2024: `&raw const`/`&raw mut` pointers, struct initialization via block expressions, `impl AsFd` instead of `RawFd`, removed all `borrow_as_ptr` lint violations
32+
- **CONSOLIDATED**: `rustix` workspace dependency — unified 10 inline version pins (`"1"`, `"1.1"`) to `{ workspace = true }` across cli, hw-learn, hw-safe, nvpmu, sysmon, monitoring, akida-driver, display, secure_enclave, sandbox. All now resolve to workspace `1.1.4`.
33+
- **EXPANDED**: `socket_env.rs` — +33 new env var constants: environment/runtime mode (TOADSTOOL_ENVIRONMENT, ENVIRONMENT, ENV, HOST, DISPLAY, WAYLAND_DISPLAY), discovery infra (TOADSTOOL_DISCOVERY_CONFIG, FALLBACK_PORT/ENABLED, SERVICE_DIR, REGISTRY_ENDPOINT, BIOMEOS_RUNTIME_DIR), service URLs (COORDINATION/CRYPTO/STORAGE/AI_SERVICE_URL, COORDINATOR, STORAGE, SERVICES), K8s/container (KUBERNETES_SERVICE_HOST, POD_NAMESPACE, COMPOSE_PROJECT_NAME, CONSUL_HTTP_ADDR, ETCD_ENDPOINTS), deprecated legacy (BEARDOG_FAMILY_SEED)
34+
- **MIGRATED**: 47 raw `std::env::var("...")` sites → `socket_env::` constants across 15 files: config/types/mod.rs (5), config/types/network.rs (4), config/runtime_defaults.rs (4), config/discovery_defaults.rs (2), config/services/registry.rs (3), common/discovery_config.rs (2), common/btsp/family_seed.rs (4), common/backends.rs (8), toadstool/discover.rs (5), toadstool/launcher.rs (4), auto_config/paths.rs (6), auto_config/integration.rs (5), cli/defaults.rs (1)
35+
- METRICS: ~305 env reads via socket_env:: constants (~76%), ~100 raw remaining (low-ROI deployment infra, observability, substrate probes). Zero `libc` in workspace. 9,156 lib tests pass, 0 clippy warnings.
936

1037
### Session S280 (May 28, 2026) — Wave 59 Env Centralization + Clippy Allow Evolution
1138

DEBT.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,33 @@
11
# Active Technical Debt Register
22

3-
**Date**: May 2026 — S280
3+
**Date**: May 2026 — S282
44
**Philosophy**: Math is universal, precision is silicon. Workarounds are
55
short-term solutions that increase debt. We aim to solve deep debt over
66
iterations, evolving toward vendor-agnostic, capability-based solutions—
77
with production stubs surfacing typed configuration errors and capability
88
guidance, and auth policy driven by explicit environment configuration
99
where applicable.
1010

11+
**S282 (Deep Debt Evolution V: Complete Unsafe Hardening + Env Centralization)**:
12+
Closed all 28 unsafe SAFETY documentation gaps (12 files). Evolved 4
13+
production panic paths to Result propagation (watchdog, Akida MMIO, Rayon
14+
pool, unified buffer). Migrated remaining 110 raw env::var sites to
15+
socket_env constants across 46 files (+56 new constants). Fixed 8
16+
pre-existing clippy errors in cylinder lib + 13 in server. Evolved
17+
`PatchStrategy::from_str` to idiomatic `impl FromStr`. Migrated last
18+
`libc::mmap`/`munmap` to `rustix::mm`. Zero libc, zero unsafe without
19+
SAFETY, zero production panics in lib, ~97% env centralized, 178 lib
20+
tests, zero clippy across full workspace.
21+
22+
**S281 (Deep Debt Evolution IV: libc Elimination + Workspace Consolidation)**:
23+
Eliminated `libc` dependency from cylinder — last direct C binding on core
24+
hardware path. `rm_trigger` evolved to `rustix::ioctl` with typed `RmIoctl`
25+
adapter. Fixed P0 production panic in `bar_cartography.rs`. Added SAFETY
26+
comments to all 3 diagnostic bins. Consolidated `rustix` to workspace dep
27+
across 10 crates. Expanded `socket_env.rs` with +33 constants; migrated 47
28+
more raw env sites (64%→76% centralized). Zero libc in workspace. 9,156
29+
lib tests, zero clippy.
30+
1131
**S280 (Wave 59 Env Centralization + Clippy Allow Evolution)**:
1232
primalSpring Wave 59 response. Deleted orphan `env_overrides.rs` (342L
1333
dead code). Expanded `socket_env.rs` with +73 env var name constants

crates/auto_config/src/ecosystem/discoverer.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use crate::ecosystem_types::{
1313
DiscoveredServices, DiscoverySummary, ServiceInfo, ServicePattern, ServiceType,
1414
};
1515
use crate::{ToadStoolError, ToadStoolResult};
16+
use toadstool_common::interned_strings::socket_env;
1617
use toadstool_config::env_config::EnvironmentConfig;
1718

1819
/// Ecosystem discovery system for finding and configuring primal services
@@ -147,8 +148,8 @@ impl EcosystemDiscoverer {
147148
.name()
148149
.is_some_and(|n| n.contains("test"))
149150
|| cfg!(test)
150-
|| std::env::var("CI").is_ok()
151-
|| std::env::var("TOADSTOOL_SKIP_DISCOVERY").is_ok();
151+
|| std::env::var(socket_env::CI).is_ok()
152+
|| std::env::var(socket_env::TOADSTOOL_SKIP_DISCOVERY).is_ok();
152153

153154
if is_test {
154155
debug!("⚡ Fast mode: Skipping network discovery (test/CI environment)");
@@ -231,7 +232,7 @@ impl EcosystemDiscoverer {
231232
}
232233

233234
let config = EnvironmentConfig::from_env();
234-
let discovery_bind_fallback = std::env::var("TOADSTOOL_DISCOVERY_BIND_ADDR")
235+
let discovery_bind_fallback = std::env::var(socket_env::TOADSTOOL_DISCOVERY_BIND_ADDR)
235236
.unwrap_or_else(|_| {
236237
toadstool_config::defaults::network::BIND_ADDRESS_DEFAULT.to_owned()
237238
});

crates/auto_config/src/ecosystem_network.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use toadstool_common::constants::network::HTTP_PROTOCOL;
1616
use toadstool_config::defaults::network::{
1717
COMMON_SCAN_SUFFIXES, PROBE_DEFAULT_PORT, RFC1918_SCAN_RANGES,
1818
};
19+
use toadstool_common::interned_strings::socket_env;
1920
use toadstool_config::env_config::EnvironmentConfig;
2021

2122
/// TCP connect timeout for `probe_service`. Production uses 2s; tests use a
@@ -37,7 +38,7 @@ const FALLBACK_SCAN_SUBNET: &str = "192.168.1.0";
3738
fn default_scan_subnet() -> &'static str {
3839
static RESOLVED: std::sync::OnceLock<String> = std::sync::OnceLock::new();
3940
RESOLVED.get_or_init(|| {
40-
std::env::var("TOADSTOOL_SCAN_SUBNET").unwrap_or_else(|_| FALLBACK_SCAN_SUBNET.to_string())
41+
std::env::var(socket_env::TOADSTOOL_SCAN_SUBNET).unwrap_or_else(|_| FALLBACK_SCAN_SUBNET.to_string())
4142
})
4243
}
4344

crates/auto_config/src/installer/integration.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::path::Path;
66
use tokio::fs;
77
use tracing::info;
88

9+
use toadstool_common::interned_strings::socket_env;
910
use toadstool_common::platform_paths::Platform;
1011

1112
use crate::ToadStoolError;
@@ -21,7 +22,7 @@ pub async fn add_to_path(
2122
Platform::Linux | Platform::MacOS => {
2223
let shell_profile = if Path::new(&format!(
2324
"{}/.zshrc",
24-
std::env::var("HOME").unwrap_or_default()
25+
std::env::var(socket_env::HOME).unwrap_or_default()
2526
))
2627
.exists()
2728
{
@@ -32,7 +33,7 @@ pub async fn add_to_path(
3233

3334
let profile_path = format!(
3435
"{}/{}",
35-
std::env::var("HOME").unwrap_or_default(),
36+
std::env::var(socket_env::HOME).unwrap_or_default(),
3637
shell_profile
3738
);
3839
let path_export = format!(
@@ -63,7 +64,7 @@ pub async fn add_to_path(
6364
pub fn has_gui(platform: Platform) -> bool {
6465
match platform {
6566
Platform::Linux => {
66-
std::env::var("DISPLAY").is_ok() || std::env::var("WAYLAND_DISPLAY").is_ok()
67+
std::env::var(socket_env::DISPLAY).is_ok() || std::env::var(socket_env::WAYLAND_DISPLAY).is_ok()
6768
}
6869
Platform::MacOS | Platform::Windows => true,
6970
Platform::Android | Platform::Wasm | Platform::Unknown => false,
@@ -79,7 +80,7 @@ pub async fn create_desktop_shortcuts(
7980

8081
match platform {
8182
Platform::Linux => {
82-
let desktop_dir = format!("{}/Desktop", std::env::var("HOME").unwrap_or_default());
83+
let desktop_dir = format!("{}/Desktop", std::env::var(socket_env::HOME).unwrap_or_default());
8384
if Path::new(&desktop_dir).exists() {
8485
let desktop_file = format!(
8586
r"[Desktop Entry]

crates/auto_config/src/installer/paths.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
use std::path::PathBuf;
55

66
use toadstool_common::constants::platform_paths::{etc_paths, install_paths};
7+
use toadstool_common::interned_strings::socket_env;
78
use toadstool_common::platform_paths::Platform;
89

910
/// Get default installation path for platform
1011
pub fn default_installation_path(platform: Platform) -> PathBuf {
1112
match platform {
1213
Platform::Linux | Platform::Android | Platform::Wasm | Platform::Unknown => {
13-
std::env::var("HOME").map_or_else(
14+
std::env::var(socket_env::HOME).map_or_else(
1415
|_| PathBuf::from(install_paths::OPT_TOADSTOOL),
1516
|home| {
1617
PathBuf::from(home)
@@ -20,7 +21,7 @@ pub fn default_installation_path(platform: Platform) -> PathBuf {
2021
},
2122
)
2223
}
23-
Platform::MacOS => std::env::var("HOME").map_or_else(
24+
Platform::MacOS => std::env::var(socket_env::HOME).map_or_else(
2425
|_| PathBuf::from("/Applications/ToadStool"),
2526
|home| {
2627
PathBuf::from(home)
@@ -29,7 +30,7 @@ pub fn default_installation_path(platform: Platform) -> PathBuf {
2930
.join("ToadStool")
3031
},
3132
),
32-
Platform::Windows => std::env::var("APPDATA").map_or_else(
33+
Platform::Windows => std::env::var(socket_env::APPDATA).map_or_else(
3334
|_| PathBuf::from("C:\\Program Files\\ToadStool"),
3435
|appdata| PathBuf::from(appdata).join("ToadStool"),
3536
),
@@ -40,12 +41,12 @@ pub fn default_installation_path(platform: Platform) -> PathBuf {
4041
pub fn config_path_for_platform(platform: Platform) -> PathBuf {
4142
match platform {
4243
Platform::Linux | Platform::Android | Platform::Wasm | Platform::Unknown => {
43-
std::env::var("HOME").map_or_else(
44+
std::env::var(socket_env::HOME).map_or_else(
4445
|_| PathBuf::from(etc_paths::TOADSTOOL_DIR),
4546
|home| PathBuf::from(home).join(".config").join("toadstool"),
4647
)
4748
}
48-
Platform::MacOS => std::env::var("HOME").map_or_else(
49+
Platform::MacOS => std::env::var(socket_env::HOME).map_or_else(
4950
|_| PathBuf::from("/Library/Preferences/ToadStool"),
5051
|home| {
5152
PathBuf::from(home)
@@ -54,7 +55,7 @@ pub fn config_path_for_platform(platform: Platform) -> PathBuf {
5455
.join("ToadStool")
5556
},
5657
),
57-
Platform::Windows => std::env::var("APPDATA").map_or_else(
58+
Platform::Windows => std::env::var(socket_env::APPDATA).map_or_else(
5859
|_| PathBuf::from("C:\\ProgramData\\ToadStool\\config"),
5960
|appdata| PathBuf::from(appdata).join("ToadStool").join("config"),
6061
),

crates/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ http-body-util = "0.1"
122122
[target.'cfg(unix)'.dev-dependencies]
123123
# EVOLVED: libc replaced with rustix (Feb 16, 2026) - ecoBin compliant, safer API
124124
# EVOLVED: 0.38 → 1.1 (Apr 11, 2026) — align with workspace-wide rustix 1.x
125-
rustix = { version = "1.1", features = ["process"] }
125+
rustix = { workspace = true, features = ["process"] }
126126

127127
[features]
128128
default = ["full"]

crates/cli/src/executor/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ mod wasm_ops; // WASM operations (loading, verification, execution)
105105
#[cfg(test)]
106106
mod tests {
107107
use super::*;
108+
use toadstool_common::interned_strings::socket_env;
108109
use uuid::Uuid;
109110

110111
#[test]
@@ -248,7 +249,7 @@ mod tests {
248249
env.insert("PATH".to_string(), "/usr/bin".to_string());
249250
env.insert(
250251
"HOME".to_string(),
251-
std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string()),
252+
std::env::var(socket_env::HOME).unwrap_or_else(|_| "/tmp".to_string()),
252253
);
253254

254255
let config = WasiExecutionConfig {

crates/cli/src/network_config/configurator/core/defaults.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ mod dns_defaults {
9494

9595
/// Resolver search domains: `TOADSTOOL_DNS_SEARCH_DOMAINS` first, then [`dns_defaults`].
9696
fn default_orchestration_dns_search_domains() -> Vec<String> {
97-
if let Ok(v) = std::env::var("TOADSTOOL_DNS_SEARCH_DOMAINS") {
97+
if let Ok(v) = std::env::var(socket_env::TOADSTOOL_DNS_SEARCH_DOMAINS) {
9898
let domains: Vec<String> = v
9999
.split(',')
100100
.map(str::trim)
@@ -127,7 +127,7 @@ fn parse_resolv_conf(contents: &str) -> Vec<String> {
127127
}
128128

129129
fn default_audit_log_path() -> String {
130-
std::env::var("TOADSTOOL_AUDIT_LOG_PATH")
130+
std::env::var(socket_env::TOADSTOOL_AUDIT_LOG_PATH)
131131
.unwrap_or_else(|_| install_paths::VAR_LOG_TOADSTOOL_AUDIT.into())
132132
}
133133

@@ -169,7 +169,7 @@ pub(super) fn orchestration_default_network_config() -> OrchestrationNetworkConf
169169
mesh_type: "native".to_string(),
170170
sidecar: SidecarConfig {
171171
enabled: true,
172-
image: std::env::var("TOADSTOOL_SIDECAR_IMAGE")
172+
image: std::env::var(socket_env::TOADSTOOL_SIDECAR_IMAGE)
173173
.unwrap_or_else(|_| DEFAULT_SIDECAR_IMAGE.to_string()),
174174
resources: SidecarResources {
175175
cpu_limit: "200m".to_string(),
@@ -194,14 +194,14 @@ pub(super) fn orchestration_default_network_config() -> OrchestrationNetworkConf
194194
tracing_enabled: true,
195195
access_logs: true,
196196
metrics_port: DEFAULT_METRICS_PORT,
197-
tracing_endpoint: std::env::var("TOADSTOOL_JAEGER_ENDPOINT").ok(),
197+
tracing_endpoint: std::env::var(socket_env::TOADSTOOL_JAEGER_ENDPOINT).ok(),
198198
},
199199
},
200200
mtls: MutualTLSConfig {
201-
enabled: std::env::var("TOADSTOOL_CA_CERT").is_ok(),
202-
ca_cert: std::env::var("TOADSTOOL_CA_CERT").unwrap_or_default(),
203-
service_cert: std::env::var("TOADSTOOL_SERVICE_CERT").unwrap_or_default(),
204-
private_key: std::env::var("TOADSTOOL_SERVICE_KEY").unwrap_or_default(),
201+
enabled: std::env::var(socket_env::TOADSTOOL_CA_CERT).is_ok(),
202+
ca_cert: std::env::var(socket_env::TOADSTOOL_CA_CERT).unwrap_or_default(),
203+
service_cert: std::env::var(socket_env::TOADSTOOL_SERVICE_CERT).unwrap_or_default(),
204+
private_key: std::env::var(socket_env::TOADSTOOL_SERVICE_KEY).unwrap_or_default(),
205205
rotation_interval: Duration::from_secs(MTLS_ROTATION_INTERVAL_SECS),
206206
verification_mode: "strict".to_string(),
207207
},
@@ -584,13 +584,13 @@ pub(super) fn orchestration_default_network_config() -> OrchestrationNetworkConf
584584
exporters: vec![MetricsExporter {
585585
exporter_type: "prometheus".to_string(),
586586
config: {
587-
let prometheus_port = std::env::var("TOADSTOOL_PROMETHEUS_PORT")
588-
.or_else(|_| std::env::var("PROMETHEUS_PORT"))
587+
let prometheus_port = std::env::var(socket_env::TOADSTOOL_PROMETHEUS_PORT)
588+
.or_else(|_| std::env::var(socket_env::PROMETHEUS_PORT))
589589
.ok()
590590
.and_then(|p| p.parse().ok())
591591
.unwrap_or(toadstool_config::ports::toadstool::METRICS);
592-
let prometheus_host = std::env::var("TOADSTOOL_PROMETHEUS_HOST")
593-
.or_else(|_| std::env::var("PROMETHEUS_HOST"))
592+
let prometheus_host = std::env::var(socket_env::TOADSTOOL_PROMETHEUS_HOST)
593+
.or_else(|_| std::env::var(socket_env::PROMETHEUS_HOST))
594594
.unwrap_or_else(|_| "prometheus".to_string());
595595
HashMap::from([(
596596
"endpoint".to_string(),

0 commit comments

Comments
 (0)