Skip to content

log_contract

Structs

Functions


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 plus
  • policy_bundle_version: String - Eight-character hex prefix of the SHA-256 of the concatenated
  • policy_count: usize - Count of .cedar files 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).

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)