v0.2.1-pre.006-fix.002

This commit is contained in:
2026-08-17 21:41:20 +02:00
parent 598474438b
commit e0a7ac0bf8
16 changed files with 190 additions and 26 deletions

View File

@@ -10,4 +10,4 @@
"core:default",
"tracing:default"
]
}
}

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-config-desk/frontend/sass/_bootswatch.scss
// version: 1
// version: 2
// Pulse 5.3.8
// Bootswatch
@@ -157,4 +157,4 @@
color: $list-group-disabled-color;
}
}
}
}

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-config-desk/frontend/sass/_fontawesome.scss
// version: 1
// version: 2
//@use '@fortawesome/fontawesome-free/scss/variables' with (
// // customizing $font-path - make sure it points to where your webfonts are stored in your project
@@ -16,4 +16,4 @@
@use '@fortawesome/fontawesome-free/scss/fa' as fa;
@use '@fortawesome/fontawesome-free/scss/brands' as fa-brands;
@use '@fortawesome/fontawesome-free/scss/regular' as fa-regular;
@use '@fortawesome/fontawesome-free/scss/solid' as fa-solid;
@use '@fortawesome/fontawesome-free/scss/solid' as fa-solid;

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-config-desk/frontend/sass/_simplebar.scss
// version: 1
// version: 2
/* Rtl support */
[data-simplebar] {
@@ -245,4 +245,4 @@
.simplebar-hover {
cursor: pointer;
}
}

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-config-desk/frontend/sass/_variables.scss
// version: 1
// version: 2
// Pulse 5.3.8
// Bootswatch
@@ -92,4 +92,4 @@ $list-group-border-color: transparent !default;
$list-group-hover-bg: lighten($list-group-bg, 10%) !default;
$list-group-active-color: $white !default;
$list-group-active-bg: $list-group-bg !default;
$list-group-disabled-color: lighten($list-group-bg, 30%) !default;
$list-group-disabled-color: lighten($list-group-bg, 30%) !default;

View File

@@ -28,4 +28,4 @@
"frontend",
"vite.config.ts"
]
}
}

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/src/client.rs
// version: 4
// version: 5
/// Passive runtime availability reported for one logical HTTP endpoint or role.
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
@@ -215,7 +215,7 @@ impl HttpEndpointClient {
return std::result::Result::Err(
ksp_core_lib::Error::new(crate::ERROR_CODE_HTTP_CONNECTION_FAILED, "HTTP endpoint client could not be initialized")
.with_context("endpoint_name", settings.name())
.with_source(error),
.with_source(error.without_url()),
);
},
};
@@ -468,7 +468,7 @@ fn map_reqwest_error(endpoint_name: &str, error: reqwest::Error) -> ksp_core_lib
} else {
crate::ERROR_CODE_HTTP_REQUEST_FAILED
};
return ksp_core_lib::Error::new(code, "HTTP JSON-RPC request failed").with_context("endpoint_name", endpoint_name).with_source(error);
return ksp_core_lib::Error::new(code, "HTTP JSON-RPC request failed").with_context("endpoint_name", endpoint_name).with_source(error.without_url());
}
fn parse_retry_after(headers: &reqwest::header::HeaderMap) -> std::option::Option<std::time::Duration> {

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/src/lib.rs
// version: 5
// version: 6
#![warn(missing_docs)]
#![deny(unreachable_pub)]
#![forbid(unsafe_code)]
@@ -7,8 +7,9 @@
//! KSP-owned Solana on-chain transport foundation.
//!
//! This crate owns runtime HTTP transport settings, Solana HTTP JSON-RPC envelopes and the audited standard method registry. It deliberately remains
//! independent from `ksp-config-lib`, Store and Program layers. Config may later construct these public settings through a one-way adapter. Logical endpoint
//! clients, priority-aware pools, bounded admission limits and retry/no-resend policy are available. The first typed Solana HTTP canaries execute real
//! independent from `ksp-config-lib`, Store and Program layers. `ksp-config-lib` now constructs these public settings through its one-way Config ->
//! Transport adapter without creating a reverse dependency. Logical endpoint clients, priority-aware pools, bounded admission limits and retry/no-resend policy
//! are available. The first typed Solana HTTP canaries execute real
//! JSON-RPC requests while the remaining audited methods stay staged by subsequent `0.2.x` releases.
mod client;

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/unit_tests/executor.rs
// version: 1
// version: 2
fn pool_for_url(url: &str, request_timeout: std::time::Duration, max_retries: u32) -> crate::HttpTransportPool {
let role = crate::HttpEndpointRoleSettings::new(
@@ -124,13 +124,18 @@ async fn executor_applies_retry_after_and_retries_http_429_for_retry_safe_method
}
#[tokio::test(flavor = "current_thread")]
async fn executor_maps_reqwest_timeout_to_ksp_timeout_error() {
async fn executor_maps_reqwest_timeout_to_ksp_timeout_error_without_endpoint_secret_leak() {
const SECRET_CANARY: &str = "SECRET-REQWEST-URL-CANARY";
let (url, handle) = serve_timeout();
let pool = pool_for_url(url.as_str(), std::time::Duration::from_millis(20), 0);
let sensitive_url = format!("{url}/rpc?api-key={SECRET_CANARY}");
let pool = pool_for_url(sensitive_url.as_str(), std::time::Duration::from_millis(20), 0);
let error = pool
.execute_standard_rpc(&crate::HttpRoleName::new("default"), health_method(), std::vec::Vec::new())
.await
.expect_err("timed out request must fail");
assert_eq!(error.code(), crate::ERROR_CODE_TIMEOUT);
assert!(!format!("{error:?}").contains(SECRET_CANARY));
let source = std::error::Error::source(&error).expect("transport timeout should preserve a sanitized reqwest source");
assert!(!format!("{source:?}").contains(SECRET_CANARY));
handle.join().expect("fixture server must join");
}