pub struct LedgerStore { /* private fields */ }Implementations§
Source§impl LedgerStore
impl LedgerStore
pub fn new(root: impl Into<PathBuf>) -> Self
pub fn machine_path(&self) -> PathBuf
pub fn markdown_path(&self) -> PathBuf
pub fn append_entry(&self, entry: &LedgerEntry) -> Result<(), LedgerError>
pub fn read_history(&self) -> Result<Vec<LedgerEntry>, LedgerError>
pub fn latest_entries(&self) -> Result<Vec<LedgerEntry>, LedgerError>
pub fn show(&self, sha: &str) -> Result<LedgerEntry, LedgerError>
pub fn unresolved_rejections(&self) -> Result<Vec<LedgerEntry>, LedgerError>
Sourcepub fn blocking_rejections(&self) -> Result<Vec<LedgerEntry>, LedgerError>
pub fn blocking_rejections(&self) -> Result<Vec<LedgerEntry>, LedgerError>
Entries that must surface in reinjection and block the pre-push gate: open
REJECT verdicts and any commit escalated to needs-human after exhausting
the bounded petition attempts.
Sourcepub fn flagged_entries(&self) -> Result<Vec<LedgerEntry>, LedgerError>
pub fn flagged_entries(&self) -> Result<Vec<LedgerEntry>, LedgerError>
FLAG entries — the reviewer accepted the claim but flagged evidence,
provenance, or process debt. Never blocks push or reinject; surfaces only
via truth-mirror debt.
Sourcepub fn history(&self) -> Result<Vec<LedgerEntry>, LedgerError>
pub fn history(&self) -> Result<Vec<LedgerEntry>, LedgerError>
All entries (across every SHA) — full history flattened for debt-by-finding-class grouping.
Sourcepub fn petition_attempts_for(&self, sha: &str) -> Result<u32, LedgerError>
pub fn petition_attempts_for(&self, sha: &str) -> Result<u32, LedgerError>
Look up the latest petition attempt count for a commit’s rejection. Returns 0 if no entry has ever recorded an attempt.
Sourcepub fn resolve(&self, sha: &str) -> Result<LedgerEntry, LedgerError>
pub fn resolve(&self, sha: &str) -> Result<LedgerEntry, LedgerError>
Append a resolution = Some(_) ledger event for an existing rejection,
keeping the same petition_attempts counter (use
[append_petition_transition] to increment it).
Sourcepub fn waive(&self, sha: &str, reason: &str) -> Result<LedgerEntry, LedgerError>
pub fn waive(&self, sha: &str, reason: &str) -> Result<LedgerEntry, LedgerError>
Waive an open rejection or a needs-human escalation. Waiving a needs-human escalation is the canonical human-side close after the petition attempts have been exhausted.
Sourcepub fn escalate_to_needs_human(
&self,
sha: &str,
reason: &str,
) -> Result<LedgerEntry, LedgerError>
pub fn escalate_to_needs_human( &self, sha: &str, reason: &str, ) -> Result<LedgerEntry, LedgerError>
Mark a rejection as escalated to needs-human (e.g. after the bounded
petition attempts have been exhausted). The latest known attempt count
is preserved on the new entry by default; pass attempts to override
(e.g. the petition plumbing knows the new count after the reviewer
verdict is recorded).
Sourcepub fn escalate_to_needs_human_with_attempts(
&self,
sha: &str,
reason: &str,
attempts: u32,
) -> Result<LedgerEntry, LedgerError>
pub fn escalate_to_needs_human_with_attempts( &self, sha: &str, reason: &str, attempts: u32, ) -> Result<LedgerEntry, LedgerError>
Escalate to needs-human and record a specific attempt count on the new
entry. Used by the petition plumbing after it has the authoritative new
count from the reviewer verdict.
Sourcepub fn append_petition_transition(
&self,
sha: &str,
disposition: Disposition,
kind: ResolutionKind,
reason: &str,
attempts: u32,
) -> Result<LedgerEntry, LedgerError>
pub fn append_petition_transition( &self, sha: &str, disposition: Disposition, kind: ResolutionKind, reason: &str, attempts: u32, ) -> Result<LedgerEntry, LedgerError>
Append a transition event for a rejection, preserving the latest known
petition_attempts counter by default (no increment). The caller passes
attempts_override only when it has authoritative new knowledge (the
petition plumbing increments this after the reviewer verdict is recorded).
pub fn stats(&self) -> Result<LedgerStats, LedgerError>
pub fn render_markdown_mirror(&self) -> Result<(), LedgerError>
Trait Implementations§
Source§impl Clone for LedgerStore
impl Clone for LedgerStore
Source§fn clone(&self) -> LedgerStore
fn clone(&self) -> LedgerStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more