Module constants

Module constants 

Source
Expand description

Shared crate-wide constants for Switchyard.

Centralizes magic values and default labels used across modules. Adjusting these here will propagate through the crate.

Constants§

DEFAULT_BACKUP_TAG
Default logical tag used for naming backup artifacts and sidecar files. Example filenames: .<name>.<tag>.<millis>.bak and .<name>.<tag>.<millis>.bak.meta.json.
DEFAULT_LOCK_TIMEOUT_MS
Default lock timeout used by Switchyard::new() unless overridden by with_lock_timeout_ms().
FSYNC_WARN_MS
Threshold in milliseconds above which an fsync duration is annotated with a WARN severity in Audit v2. See api/apply.rs.
LOCK_POLL_MS
Poll interval in milliseconds for the file-backed lock manager (see adapters/lock_file.rs).
NS_TAG
UUIDv5 namespace tag for deterministic plan/action IDs. Derived from SPEC Reproducible v1.1 guidance; see SPEC/SPEC.md § Determinism.
RESCUE_MIN_COUNT
RESCUE_MUST_HAVE
Heuristic for rescue tool availability when BusyBox is not present. At least RESCUE_MIN_COUNT of the RESCUE_MUST_HAVE tools must be found on PATH.
TMP_SUFFIX
Temporary filename suffix used for atomic symlink swap staging within a directory. The temporary name is constructed as .{{fname}}{TMP_SUFFIX}; e.g., .ls.switchyard.tmp.