log_contract
Module: startup::log_contract
Section titled “Module: startup::log_contract”Contents
Section titled “Contents”Structs
StartupReport- Inputs needed to emit the ready sequence.
Functions
compute_policy_bundle_version- Compute the deterministic policy bundle version.log_pre_ready_sequence- Emit contract lines 1-6 (everything beforeready).log_ready_line- Emit contract line 7 (ready). Callers must have already emittedlog_ready_sequence- Emit the seven contract lines at INFO level, in order.
firma_sidecar::startup::log_contract::StartupReport
Section titled “firma_sidecar::startup::log_contract::StartupReport”Struct
Inputs needed to emit the ready sequence.
Each field maps 1:1 to one structured field on the contract lines.
Generic Parameters:
- ‘a
Fields:
config_path: &'a std::path::Path- Filesystem path the sidecar config was read from.mapping_rules: usize- Number of mapping rules loaded across the primary file pluspolicy_bundle_version: String- Eight-character hex prefix of the SHA-256 of the concatenatedpolicy_count: usize- Count of.cedarfiles contributing to the bundle hash.authority_endpoint: String- Authority endpoint string (URL or"(disabled)").connector_hosts: usize- Per-host connector overrides count.connector_default_timeout_ms: u64- Default connector timeout, milliseconds.interceptor_addr: String- Interceptor listen address as printed in line 6.
firma_sidecar::startup::log_contract::compute_policy_bundle_version
Section titled “firma_sidecar::startup::log_contract::compute_policy_bundle_version”Function
Compute the deterministic policy bundle version.
Concatenates the bytes of every .cedar file directly under
policy_dir (sorted by file name for reproducibility), hashes the
result with SHA-256, and returns (version_hex_prefix, count).
Errors
Section titled “Errors”Returns an error when the directory cannot be read.
fn compute_policy_bundle_version(policy_dir: &std::path::Path) -> std::io::Result<(String, usize)>firma_sidecar::startup::log_contract::log_pre_ready_sequence
Section titled “firma_sidecar::startup::log_contract::log_pre_ready_sequence”Function
Emit contract lines 1-6 (everything before ready).
Split from [log_ready_sequence] so the sidecar can hold line 7
until the Authority streams hydrate (FIR-183) without breaking the
prefix surface scrapers depend on.
fn log_pre_ready_sequence(report: &StartupReport)firma_sidecar::startup::log_contract::log_ready_line
Section titled “firma_sidecar::startup::log_contract::log_ready_line”Function
Emit contract line 7 (ready). Callers must have already emitted
the pre-ready sequence via [log_pre_ready_sequence].
fn log_ready_line()firma_sidecar::startup::log_contract::log_ready_sequence
Section titled “firma_sidecar::startup::log_contract::log_ready_sequence”Function
Emit the seven contract lines at INFO level, in order.
fn log_ready_sequence(report: &StartupReport)