mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-12 09:33:23 +00:00
The identifier "discovery" named three unrelated subsystems; the FMP overlay coordinate-lookup subsystem is now consistently "lookup". This finishes the concept-#1 rename across the shell, config, and metric layers left after the earlier proto-layer rename: - Handler module node::handlers::discovery -> node::handlers::lookup, and reset_discovery_backoff -> reset_lookup_backoff. - The Node lookup-engine field Node.discovery -> Node.lookup, renamed by resolved binding so the metrics().discovery and node.discovery config paths are left untouched. - The lookup metric types DiscoveryMetrics -> LookupMetrics, DiscoveryStatsSnapshot -> LookupStatsSnapshot, and Metrics.discovery -> Metrics.lookup. Two surfaces cross a stability boundary and ship behind a compatibility window, both marked in-code for removal at the v2 cutover: - The control-socket metric family is dual-emitted under both "discovery" (deprecated alias) and "lookup" so existing dashboards keep working. - The node.discovery.* config table is split into node.lookup.* (mesh lookup scalars) and node.rendezvous.* (nostr/lan peer rendezvous). NodeConfig does not deny unknown fields, so a naive rename would make a deployed node.discovery: block deserialize into nothing and silently revert every setting to default. A deprecated all-Option DiscoveryConfigCompat field captures a legacy block and a new post-parse Config::normalize_deprecated_keys pass folds it into the new tables with a one-time deprecation warning. Flip the packaged fips.yaml templates to the new keys, add legacy/new/ scalar compat parse tests, and record the split and deprecations in the CHANGELOG. Behavior-neutral; fmt/clippy clean, lib suite green.
34 lines
1.3 KiB
Rust
34 lines
1.3 KiB
Rust
//! Sans-IO mesh lookup protocol state.
|
|
//!
|
|
//! Pure, runtime-agnostic mesh lookup state and rate limiting, migrated out
|
|
//! of the async node shell. The async I/O handlers remain in
|
|
//! `node::handlers::lookup`. The mesh lookup wire codec now lives here in
|
|
//! `wire.rs` (the `LookupRequest` / `LookupResponse` structs), per the
|
|
//! wire-migrates-with-subsystem policy.
|
|
//!
|
|
//! The sans-IO decision core lives in `core.rs`: it defines the `RoutingView`
|
|
//! read-seam trait plus the `plan_forward` / `plan_initiate` LookupRequest
|
|
//! planners and their `LookupAction` / `ForwardOutcome` types. The async
|
|
//! shell decodes wire
|
|
//! bytes, calls the planner, and drives the returned actions.
|
|
|
|
mod core;
|
|
mod limits;
|
|
mod state;
|
|
mod wire;
|
|
|
|
#[cfg(test)]
|
|
mod tests;
|
|
|
|
pub(crate) use core::{
|
|
ForwardOutcome, InitiateDecision, LookupAction, RequestOutcome, ResponseRoute,
|
|
ResponseRouteDecision, RoutingView, classify_request, classify_response, initiate_failed,
|
|
initiate_gate, on_response_accepted, plan_forward, plan_initiate, plan_response_route,
|
|
poll_pending,
|
|
};
|
|
pub(crate) use limits::{LookupBackoff, LookupForwardRateLimiter, MAX_RECENT_LOOKUP_REQUESTS};
|
|
#[cfg(test)]
|
|
pub(crate) use state::RecentRequest;
|
|
pub(crate) use state::{Lookup, PendingLookup};
|
|
pub use wire::{LookupRequest, LookupResponse};
|