Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions crates/relayburn-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
44 changes: 3 additions & 41 deletions crates/relayburn-cli/src/commands/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,9 @@ fn run_inner(globals: &GlobalArgs, args: CompareArgs) -> Result<i32> {
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();
Expand Down Expand Up @@ -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<String>,
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)
// ---------------------------------------------------------------------------
Expand Down
46 changes: 5 additions & 41 deletions crates/relayburn-cli/src/commands/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -206,7 +205,9 @@ fn run_inner(globals: &GlobalArgs, args: SummaryArgs) -> anyhow::Result<i32> {
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;

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 Clarify or warn when summary --no-archive is ignored

run_inner now drops args.no_archive as a no-op, but the SummaryArgs help text in this file still describes --no-archive as a functional archive-bypass escape hatch. That creates a user-visible contract mismatch: scripts or debugging workflows can pass the flag believing behavior changed when it did not. Please either update the help text to match the new no-op behavior (as done for compare) or emit an explicit warning when the flag is provided.

Useful? React with 👍 / 👎.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
let progress = TaskProgress::new(globals, "summary");
Comment on lines +209 to 211

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 SummaryArgs --no-archive help text not updated to reflect no-op status

The PR's stated intent is to make --no-archive a no-op in both burn compare and burn summary. The help text for CompareArgs.no_archive was correctly updated at crates/relayburn-cli/src/cli.rs:247-248 to say "Accepted for TS CLI flag parity; a no-op against the Rust SDK", but the corresponding SummaryArgs.no_archive help text at crates/relayburn-cli/src/commands/summary.rs:107-109 still reads "Bypass the archive sidecar and stream the ledger. Kept for parity with the TS CLI and as an escape hatch for archive-corruption debugging." — implying the flag actively bypasses something. Users running burn summary --help will see a misleading description for a flag that is now a no-op.

Prompt for agents
The help text for the `no_archive` field in `SummaryArgs` (crates/relayburn-cli/src/commands/summary.rs, lines 107-109) still reads "Bypass the archive sidecar and stream the ledger. Kept for parity with the TS CLI and as an escape hatch for archive-corruption debugging." This was not updated as part of this PR, even though the identical help text in `CompareArgs` (crates/relayburn-cli/src/cli.rs:247-248) was correctly updated to "Accepted for TS CLI flag parity; a no-op against the Rust SDK, which is SQLite-native and has no archive layer to bypass." Update the SummaryArgs doc comment to match the CompareArgs wording so both commands consistently describe `--no-archive` as a no-op.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.


let opts = match globals.ledger_path.as_deref() {
Expand Down Expand Up @@ -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<String>,
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,
Expand Down