diff --git a/CHANGELOG.md b/CHANGELOG.md index 427f31ae..96436d98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Cross-package release notes for relayburn. Package changelogs contain package-le ## [Unreleased] +### Changed + +- `relayburn-cli`: `--no-archive` on `burn compare` and `burn summary` is now + an explicit no-op (accepted for TS CLI flag parity). + ## [2.7.2] - 2026-05-09 ### Changed diff --git a/crates/relayburn-cli/src/cli.rs b/crates/relayburn-cli/src/cli.rs index 37c8b981..bd843d7c 100644 --- a/crates/relayburn-cli/src/cli.rs +++ b/crates/relayburn-cli/src/cli.rs @@ -244,8 +244,8 @@ pub struct CompareArgs { #[arg(long)] pub csv: bool, - /// Bypass the SQLite archive and stream the ledger directly. - /// Honored when env `RELAYBURN_ARCHIVE=0`. + /// Accepted for TS CLI flag parity; a no-op against the Rust SDK, + /// which is SQLite-native and has no archive layer to bypass. #[arg(long = "no-archive")] pub no_archive: bool, } diff --git a/crates/relayburn-cli/src/commands/compare.rs b/crates/relayburn-cli/src/commands/compare.rs index 5b43b220..94edcd2f 100644 --- a/crates/relayburn-cli/src/commands/compare.rs +++ b/crates/relayburn-cli/src/commands/compare.rs @@ -128,11 +128,9 @@ fn run_inner(globals: &GlobalArgs, args: CompareArgs) -> Result { return Err(anyhow!("invalid --min-sample: {min_sample}")); } - // 6. Honor --no-archive by exporting RELAYBURN_ARCHIVE=0 for the - // duration of this call. The Rust SDK doesn't read RELAYBURN_ARCHIVE - // today (it's SQLite-only), but we set the env so any future archive - // layer behaves identically to the TS CLI's `--no-archive`. - let _archive_guard = ArchiveOverride::activate(args.no_archive); + // 6. `--no-archive` is accepted for TS CLI flag parity but is a no-op: + // the Rust SDK is SQLite-native and has no archive layer to bypass. + let _ = args.no_archive; // 7. Build the Query. let mut q = Query::default(); @@ -490,42 +488,6 @@ fn days_to_ymd(days_from_epoch: i64) -> (i64, u32, u32) { (year, m as u32, d as u32) } -/// Drop-in for `RELAYBURN_ARCHIVE=0`. Restores the previous value on -/// drop so a panic part-way through doesn't leak the override. -struct ArchiveOverride { - previous: Option, - activated: bool, -} - -impl ArchiveOverride { - fn activate(no_archive: bool) -> Self { - if !no_archive { - return Self { - previous: None, - activated: false, - }; - } - let previous = std::env::var("RELAYBURN_ARCHIVE").ok(); - std::env::set_var("RELAYBURN_ARCHIVE", "0"); - Self { - previous, - activated: true, - } - } -} - -impl Drop for ArchiveOverride { - fn drop(&mut self) { - if !self.activated { - return; - } - match self.previous.take() { - Some(v) => std::env::set_var("RELAYBURN_ARCHIVE", v), - None => std::env::remove_var("RELAYBURN_ARCHIVE"), - } - } -} - // --------------------------------------------------------------------------- // number formatting (matches packages/cli/src/format.ts) // --------------------------------------------------------------------------- diff --git a/crates/relayburn-cli/src/commands/summary.rs b/crates/relayburn-cli/src/commands/summary.rs index f74e6ea7..afd63551 100644 --- a/crates/relayburn-cli/src/commands/summary.rs +++ b/crates/relayburn-cli/src/commands/summary.rs @@ -104,9 +104,8 @@ pub struct SummaryArgs { #[arg(long)] pub quality: bool, - /// Bypass the archive sidecar and stream the ledger. Kept for parity - /// with the TS CLI and as an escape hatch for archive-corruption - /// debugging. + /// Accepted for TS CLI flag parity; a no-op against the Rust SDK, + /// which is SQLite-native and has no archive layer to bypass. #[arg(long = "no-archive")] pub no_archive: bool, } @@ -206,7 +205,9 @@ fn run_inner(globals: &GlobalArgs, args: SummaryArgs) -> anyhow::Result { None }; - let _archive_guard = ArchiveOverride::activate(args.no_archive); + // `--no-archive` is accepted for TS CLI flag parity but is a no-op: + // the Rust SDK is SQLite-native and has no archive layer to bypass. + let _ = args.no_archive; let progress = TaskProgress::new(globals, "summary"); let opts = match globals.ledger_path.as_deref() { @@ -346,43 +347,6 @@ fn run_ingest( }) } -/// Drop-in for `RELAYBURN_ARCHIVE=0`. The Rust SDK is already SQLite-native, -/// but this preserves the TS CLI flag contract for any lower layer that checks -/// the env escape hatch. -struct ArchiveOverride { - previous: Option, - activated: bool, -} - -impl ArchiveOverride { - fn activate(no_archive: bool) -> Self { - if !no_archive { - return Self { - previous: None, - activated: false, - }; - } - let previous = std::env::var("RELAYBURN_ARCHIVE").ok(); - std::env::set_var("RELAYBURN_ARCHIVE", "0"); - Self { - previous, - activated: true, - } - } -} - -impl Drop for ArchiveOverride { - fn drop(&mut self) { - if !self.activated { - return; - } - match self.previous.take() { - Some(v) => std::env::set_var("RELAYBURN_ARCHIVE", v), - None => std::env::remove_var("RELAYBURN_ARCHIVE"), - } - } -} - const COVERAGE_FIELDS: [CoverageField; 5] = [ CoverageField::Input, CoverageField::Output,