v0.3.15-pre.006-fix.003
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!-- file: crates/ksp-app-raw-transaction-ingest-desk/README.md -->
|
||||
<!-- version: 4 -->
|
||||
<!-- version: 5 -->
|
||||
|
||||
# `ksp-app-raw-transaction-ingest-desk`
|
||||
|
||||
@@ -28,6 +28,7 @@ Worker -> acquisition continue et lifecycle d'exécution
|
||||
L'inventaire de routes est calculé côté Rust à partir du composite Config validé et des settings Transport/Store résolus. Il ne lance aucun probe réseau et n'ouvre ni Store ni Worker.
|
||||
|
||||
Les profils applicatifs sont réseau-centriques (`devnet`, `mainnet`, `testnet`). Un profil peut agréger plusieurs profils Transport du même réseau : le provider reste une source de capability et ne devient jamais une identité réseau ni un choix de profil applicatif.
|
||||
Une route explicitement liée à un provider n’est projetée pour un réseau que si le composite déclare une source Transport de ce provider. Ainsi, la route Helius Transaction existe sur Devnet/Mainnet mais n’est pas présentée sur Testnet tant qu’Helius ne fournit pas de source Testnet configurée.
|
||||
|
||||
Le frontend ne reçoit aucune URL, credential, URI Store, metadata secrète, source key, handle runtime ou payload `RawTransaction`.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- file: crates/ksp-app-raw-transaction-ingest-desk/USAGE.md -->
|
||||
<!-- version: 4 -->
|
||||
<!-- version: 5 -->
|
||||
|
||||
# Utilisation de `ksp-app-raw-transaction-ingest-desk`
|
||||
|
||||
@@ -32,6 +32,7 @@ génération d'inventaire
|
||||
`Configured` signifie uniquement que toutes les requirements Config nécessaires à la route sont cohérentes. Les profils `solana-public` standard committés déclarent explicitement les capabilities `Logs` et `Block`; `standard-block-direct` est donc Configured sur les trois réseaux logiques tant que ce socle Config reste valide. Aucun probe réseau, aucune ouverture de Store et aucun Worker ne sont déclenchés par l'inventaire.
|
||||
|
||||
Un refresh reconstruit l'inventaire depuis Config et publie une nouvelle génération. La sélection visuelle d'un réseau ne choisit aucune URL, provider ou ressource physique et ne démarre aucune acquisition. Une capability optionnelle dont le secret n'est pas résolu rend uniquement la route qui en dépend indisponible ; les routes satisfaites par le Transport de base du même réseau restent composables.
|
||||
Une route provider-specific dont aucune source n’est déclarée pour le réseau n’est pas une erreur de configuration : elle est hors inventaire pour ce réseau. Par exemple, Helius Transaction est projetée sur Devnet/Mainnet lorsque `transport.helius` existe, mais pas sur Testnet lorsqu’aucune source Helius Testnet n’est déclarée.
|
||||
|
||||
Les URLs, tokens, metadata secrètes, handles Transport/Store/Worker, URI Store, source keys et payloads RAW restent backend-only.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-raw-transaction-ingest-desk/src/dto_route.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
//! Safe route-identity, Config-composability and lifecycle DTOs for Raw Transaction Ingest Desk.
|
||||
|
||||
@@ -206,7 +206,7 @@ pub(crate) struct RawIngestProfileInventoryDto {
|
||||
pub(crate) network: std::option::Option<String>,
|
||||
/// Stable composite profile identifier.
|
||||
pub(crate) profile_id: String,
|
||||
/// Five logical routes in stable V1 presentation order.
|
||||
/// Logical routes applicable to this network profile in stable V1 presentation order; provider-specific routes may be absent when their Config source is not declared.
|
||||
pub(crate) routes: std::vec::Vec<crate::RawIngestRouteDto>,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-raw-transaction-ingest-desk/src/route_inventory.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
//! Config-only logical route inventory for Raw Transaction Ingest Desk.
|
||||
|
||||
@@ -16,6 +16,7 @@ struct RouteCapabilities {
|
||||
has_standard_logs: bool,
|
||||
has_standard_block: bool,
|
||||
has_helius_transaction: bool,
|
||||
helius_source_declared: bool,
|
||||
helius_source_missing_secret: bool,
|
||||
yellowstone_source_missing_secret: bool,
|
||||
}
|
||||
@@ -199,6 +200,9 @@ fn build_profile_inventory(
|
||||
crate::RawIngestRouteUnavailableReason::ProfileUnresolved,
|
||||
);
|
||||
}
|
||||
if component_id == crate::COMPOSITE_COMPONENT_ID_TRANSPORT_HELIUS {
|
||||
capabilities.helius_source_declared = true;
|
||||
}
|
||||
if component.resolved().file_id().as_str() != ksp_config_lib::FILE_ID_STD_TRANSPORT {
|
||||
return unavailable_profile(
|
||||
profile_id,
|
||||
@@ -257,7 +261,7 @@ fn build_configured_profile_routes(capabilities: &RouteCapabilities, network: &s
|
||||
} else {
|
||||
crate::RawIngestRouteUnavailableReason::MissingHeliusTransactionCapability
|
||||
};
|
||||
return vec![
|
||||
let mut routes = vec![
|
||||
route_with_requirements(
|
||||
crate::RawIngestRouteId::YellowstoneHydrated,
|
||||
network,
|
||||
@@ -279,20 +283,23 @@ fn build_configured_profile_routes(capabilities: &RouteCapabilities, network: &s
|
||||
network,
|
||||
&[(capabilities.has_standard_block, crate::RawIngestRouteUnavailableReason::MissingWsBlockCapability)],
|
||||
),
|
||||
route_with_requirements(
|
||||
];
|
||||
if capabilities.helius_source_declared {
|
||||
routes.push(route_with_requirements(
|
||||
crate::RawIngestRouteId::HeliusTransactionHydrated,
|
||||
network,
|
||||
&[
|
||||
(capabilities.has_helius_transaction, helius_reason),
|
||||
(capabilities.has_get_transaction, crate::RawIngestRouteUnavailableReason::MissingHttpGetTransaction),
|
||||
],
|
||||
),
|
||||
route_with_requirements(
|
||||
crate::RawIngestRouteId::HttpBlockPolling,
|
||||
network,
|
||||
&[(capabilities.has_http_block_scan, crate::RawIngestRouteUnavailableReason::MissingHttpBlockScan)],
|
||||
),
|
||||
];
|
||||
));
|
||||
}
|
||||
routes.push(route_with_requirements(
|
||||
crate::RawIngestRouteId::HttpBlockPolling,
|
||||
network,
|
||||
&[(capabilities.has_http_block_scan, crate::RawIngestRouteUnavailableReason::MissingHttpBlockScan)],
|
||||
));
|
||||
return routes;
|
||||
}
|
||||
|
||||
fn route_with_requirements(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-raw-transaction-ingest-desk/tests/desktop_security.rs
|
||||
// version: 2
|
||||
// version: 3
|
||||
|
||||
//! Desktop security canaries for the Raw Transaction Ingest Desk scaffold.
|
||||
|
||||
@@ -64,7 +64,7 @@ fn pre_006_frontend_tracing_is_control_inventory_and_command_oriented_only() {
|
||||
assert!(main.contains("navigation tab clicked"));
|
||||
assert!(main.contains("runtime status refresh requested"));
|
||||
assert!(main.contains("Config route inventory refresh requested"));
|
||||
assert!(main.contains("logical profile selected"));
|
||||
assert!(main.contains("logical network selected"));
|
||||
let invoke = read_text(app_root().join("frontend/ts/invoke.ts").as_path());
|
||||
assert!(invoke.contains("Frontend IPC command requested"));
|
||||
for forbidden in ["apiKey", "authorization", "connectionUri", "endpointUrl", "sourceKey", "rawTransaction", "transactionPayload", "x-token"] {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-raw-transaction-ingest-desk/unit_tests/route_inventory.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
#[test]
|
||||
fn pre_006_route_requirement_projection_is_fail_closed_and_ordered() {
|
||||
@@ -38,7 +38,7 @@ fn pre_006_unavailable_profile_projects_all_five_routes_without_physical_materia
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_006_fix_002_network_profiles_aggregate_same_network_transport_capabilities_and_standard_block() {
|
||||
fn pre_006_fix_003_network_profiles_aggregate_same_network_capabilities_and_omit_undeclared_provider_routes() {
|
||||
let management = committed_management();
|
||||
assert!(management.is_ok());
|
||||
let management = match management {
|
||||
@@ -91,12 +91,8 @@ fn pre_006_fix_002_network_profiles_aggregate_same_network_transport_capabilitie
|
||||
assert_optional_secret_route(testnet, crate::RawIngestRouteId::YellowstoneHydrated);
|
||||
assert_route(testnet, crate::RawIngestRouteId::StandardLogsHydrated, true, std::option::Option::None);
|
||||
assert_route(testnet, crate::RawIngestRouteId::StandardBlockDirect, true, std::option::Option::None);
|
||||
assert_route(
|
||||
testnet,
|
||||
crate::RawIngestRouteId::HeliusTransactionHydrated,
|
||||
false,
|
||||
std::option::Option::Some(crate::RawIngestRouteUnavailableReason::MissingHeliusTransactionCapability),
|
||||
);
|
||||
assert_route_absent(testnet, crate::RawIngestRouteId::HeliusTransactionHydrated);
|
||||
assert_eq!(testnet.routes.len(), 4);
|
||||
assert_route(testnet, crate::RawIngestRouteId::HttpBlockPolling, true, std::option::Option::None);
|
||||
}
|
||||
let serialized = serde_json::to_string(&inventory);
|
||||
@@ -121,7 +117,7 @@ fn pre_006_fix_002_network_profiles_aggregate_same_network_transport_capabilitie
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_006_fix_002_base_network_routes_remain_configured_independently_of_optional_sources() {
|
||||
fn pre_006_fix_003_base_network_routes_remain_configured_independently_of_optional_sources() {
|
||||
let management = committed_management();
|
||||
assert!(management.is_ok());
|
||||
let management = match management {
|
||||
@@ -198,6 +194,11 @@ fn assert_optional_secret_route(profile: &crate::RawIngestProfileInventoryDto, r
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_route_absent(profile: &crate::RawIngestProfileInventoryDto, route_id: crate::RawIngestRouteId) {
|
||||
let route = profile.routes.iter().find(|route| return route.route_id == route_id);
|
||||
assert!(route.is_none());
|
||||
}
|
||||
|
||||
fn assert_route(
|
||||
profile: &crate::RawIngestProfileInventoryDto,
|
||||
route_id: crate::RawIngestRouteId,
|
||||
|
||||
Reference in New Issue
Block a user