Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
63c99d9
docs(proofs): record safe Agda and cross-kernel reconciliation contract
hyperpolymath Nov 1, 2026
b14ccc9
feat(proofs): validate reconciliation evidence without promoting unve…
hyperpolymath Nov 1, 2026
bb8e80a
feat(proofs): export typed reconciliation ledger API
hyperpolymath Nov 1, 2026
493290c
test(proofs): establish fail-closed canonical Agda invocation
hyperpolymath Nov 1, 2026
34f856a
test(proofs): establish fail-closed canonical Agda invocation
hyperpolymath Nov 1, 2026
0a1dbcf
feat(proofs): expose reconciliation evidence ingestion via Burrower CLI
hyperpolymath Nov 1, 2026
cd620e4
docs(proofs): document reconciliation CLI and executable Agda check
hyperpolymath Nov 1, 2026
87ae9a9
style(proofs): rustfmt reconciliation code for CI
hyperpolymath Nov 1, 2026
7b4b05f
style(proofs): rustfmt reconciliation code for CI
hyperpolymath Nov 1, 2026
20b84fd
style(proofs): rustfmt reconciliation code for CI
hyperpolymath Nov 1, 2026
b203cc0
fix(proofs): resolve Agda nested modules and pinned library path
hyperpolymath Nov 1, 2026
0d96e94
fix(proofs): resolve Agda nested modules and pinned library path
hyperpolymath Nov 1, 2026
96699a9
Update crates/burrower-core/src/reconciliation.rs
hyperpolymath Nov 1, 2026
6fb19fd
Update docs/PROOF-RECONCILIATION.adoc
hyperpolymath Nov 1, 2026
0ae5a75
Update tests/agda-safe-check.sh
hyperpolymath Nov 1, 2026
68795ac
docs(reconciliation): document CLI dispatch, validation rules, and le…
coderabbitai[bot] Nov 1, 2026
c35d419
Merge branch 'main' into feat/proof-reconciliation-contract-20261101
hyperpolymath Nov 2, 2026
f12f532
Update crates/burrower-core/src/reconciliation.rs
hyperpolymath Nov 2, 2026
3e6173e
Merge branch 'main' into feat/proof-reconciliation-contract-20261101
hyperpolymath Nov 3, 2026
2184f27
Merge branch 'main' into feat/proof-reconciliation-contract-20261101
hyperpolymath Nov 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion crates/burrower-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
//! given a goal, return ranked candidate "homes".

use anyhow::Result;
use burrower_core::{parse_goal, rank, Corpus, Ledger, ProverConfig, Swarm};
use burrower_core::{
parse_goal, rank, record_reconciliation, Corpus, Ledger, ProofReconciliation, ProverConfig,
Swarm,
};
use clap::{Parser, Subcommand};
use std::path::PathBuf;

Expand Down Expand Up @@ -122,6 +125,18 @@ enum Cmd {
#[arg(long, default_value = "julia")]
oracle_julia: PathBuf,
},
/// Record a reconciliation receipt as UNVERIFIED evidence, not a proof.
Reconcile {
/// JSON file with the proof.reconciliation/1 receipt.
#[arg(long)]
receipt: PathBuf,
/// Original theorem statement for ledger identity.
#[arg(long)]
goal: String,
/// Existing interim Burrow Ledger (JSONL).
#[arg(long)]
ledger: PathBuf,
},
/// Burrow Ledger inspection.
Ledger {
#[command(subcommand)]
Expand Down Expand Up @@ -371,6 +386,9 @@ fn handle_attempt(
Ok(())
}

/// Dispatch the requested command. Reconciliation reads a JSON receipt and
/// records it as proposed evidence, propagating read, parse, validation and
/// ledger errors.
fn main() -> Result<()> {
let cli = Cli::parse();
match cli.cmd {
Expand Down Expand Up @@ -401,6 +419,18 @@ fn main() -> Result<()> {
oracle_julia,
)
}
Cmd::Reconcile {
receipt,
goal,
ledger,
} => {
let body = std::fs::read_to_string(&receipt)?;
let evidence: ProofReconciliation = serde_json::from_str(&body)?;
let ledger = Ledger::open(&ledger)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject receipt and ledger path aliases

If --ledger resolves to the same file as --receipt, including through a symlink alias, the command first parses the receipt successfully and then appends a ledger record to that same file while reporting success. This turns the receipt JSON into a mixed JSON/JSONL file that cannot be parsed as a receipt again, and whose original content is skipped as malformed by the ledger reader; reject aliased input and output paths before opening the ledger.

Useful? React with 👍 / 👎.

record_reconciliation(&ledger, &goal, &evidence)?;
Comment on lines +429 to +430

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate the receipt before creating the ledger

When the JSON deserializes successfully but fails semantic validation, such as for an unsupported schema or an invalid leg, this call has already touched the ledger file and created any missing parent directories because record_reconciliation performs validation only afterward. A rejected reconcile command therefore leaves persistent ledger state despite reporting failure; validate evidence before calling Ledger::open.

Useful? React with 👍 / 👎.

eprintln!("reconciliation evidence recorded as proposed, NOT verified");
return Ok(());
}
Cmd::Ledger { sub } => return handle_ledger(sub),
Cmd::Serve { socket } => return burrower_core::serve::run(socket),
Cmd::Index { root, output } => {
Expand Down
5 changes: 5 additions & 0 deletions crates/burrower-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub mod ids;
pub mod ledger;
pub mod oracle;
pub mod ranking;
pub mod reconciliation;
pub mod serve;
pub mod specialist;

Expand All @@ -49,6 +50,10 @@ pub use ledger::{
RecordResult,
};
pub use ranking::{rank, Home};
pub use reconciliation::{
record_reconciliation, CheckLeg, Checker, Correspondence, LegOutcome, OriginalProof,
ProofReconciliation, Route, RECONCILIATION_SCHEMA,
};
pub use specialist::{
Algebraist, Combinatorialist, ConsensusHome, OrderTheorist, Reading, Specialist, Swarm,
Synthesis,
Expand Down
Loading
Loading