//! Config hashing for deployment change detection.
//!
//! WHY: The deployment engine skips deploying when the config hasn't changed.
//! A deterministic hash of the serialized config enables cheap comparison.
//!
//! WHAT: `config_hash` serializes any `Serialize` value to canonical JSON
//! and returns its SHA-256 hex digest.
//!
//! HOW: `serde_json::to_string` (keys sorted by serde default) → SHA-256 → hex.
use Serialize;
use ;
use crateStorageError;
/// Compute a deterministic SHA-256 hash of a serializable config value.
///
/// The value is serialized to JSON (compact, keys in insertion order per serde)
/// and then hashed. Two configs that serialize identically produce the same hash.
///
/// # Errors
///
/// Returns an error if JSON serialization fails.