Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Cross-package release notes for relayburn. Package changelogs contain package-le

## [Unreleased]

- `burn overhead` discovers the default Claude Code, Codex, and OpenCode user/ancestor/project instruction chains with harness-accurate precedence, boundaries, deduplication, and scope labels.
- Pricing recognizes Claude 5 and GPT-5.6 models, prefers first-party tariffs over reseller duplicates, and applies long-context price tiers.
- `burn hotspots --findings` surfaces unknown model pricing explicitly and ranks unpriced sessions by token volume instead of treating them as $0.00.

Expand Down
9 changes: 6 additions & 3 deletions crates/relayburn-cli/src/commands/overhead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ fn run_report(
since: since.clone(),
kind: kind.map(Into::into),
ledger_home: globals.ledger_path.clone(),
harness_home: None,
};
let progress = TaskProgress::new(globals, "overhead");
progress.set_task("analyzing overhead files");
Expand All @@ -66,7 +67,7 @@ fn run_report(
project_path.display()
),
None => format!(
"no overhead files found at {} (looked for CLAUDE.md, .claude/CLAUDE.md, AGENTS.md)\n",
"no overhead files found at {} (looked for active CLAUDE.md, CLAUDE.local.md, and AGENTS.md instruction chains)\n",
project_path.display()
),
};
Expand Down Expand Up @@ -107,6 +108,7 @@ fn run_trim(
ledger_home: globals.ledger_path.clone(),
top,
include_diff: None,
harness_home: None,
};
let progress = TaskProgress::new(globals, "overhead");
progress.set_task("finding trim candidates");
Expand All @@ -127,7 +129,7 @@ fn run_trim(
project_path.display()
),
None => format!(
"no overhead files found at {} (looked for CLAUDE.md, .claude/CLAUDE.md, AGENTS.md)\n",
"no overhead files found at {} (looked for active CLAUDE.md, CLAUDE.local.md, and AGENTS.md instruction chains)\n",
project_path.display()
),
};
Expand Down Expand Up @@ -225,9 +227,10 @@ fn push_file_block(
let display = format_file_display(&parsed.path);
let applies_to = describe_applies_to(&parsed.applies_to);
lines.push(format!(
"{display} — {} lines, ~{} tokens — applies to: {applies_to}",
"{display} — {} lines, ~{} tokens — scope: {} — applies to: {applies_to}",
format_uint(parsed.total_lines),
format_tokens(parsed.tokens),
parsed.scope.wire_str(),
));
if parsed.tokens == 0 {
lines.push(" (empty file — no attribution)".to_string());
Expand Down
6 changes: 6 additions & 0 deletions crates/relayburn-sdk-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ pub struct OverheadOptions {
pub since: Option<String>,
pub kind: Option<OverheadFileKind>,
pub ledger_home: Option<String>,
pub harness_home: Option<String>,
}

/// Per-file + per-section overhead cost attribution. Powers `burn overhead`.
Expand All @@ -925,12 +926,14 @@ pub fn overhead(opts: Option<OverheadOptions>) -> Result<BigIntPromoting, BurnEr
since: None,
kind: None,
ledger_home: None,
harness_home: None,
});
let raw = sdk::OverheadOptions {
project: maybe_path(opts.project),
since: opts.since,
kind: opts.kind.map(Into::into),
ledger_home: maybe_path(opts.ledger_home),
harness_home: maybe_path(opts.harness_home),
};
let result = sdk::overhead(raw).map_err(sdk_err)?;
let value = serde_json::to_value(&result)
Expand All @@ -950,6 +953,7 @@ pub struct OverheadTrimOptions {
pub top: Option<u32>,
/// Include the unified-diff text per recommendation. Default true.
pub include_diff: Option<bool>,
pub harness_home: Option<String>,
}

/// Trim recommendations for high-cost overhead-file sections. Powers
Expand All @@ -967,6 +971,7 @@ pub fn overhead_trim(opts: Option<OverheadTrimOptions>) -> Result<BigIntPromotin
ledger_home: None,
top: None,
include_diff: None,
harness_home: None,
});
let raw = sdk::OverheadTrimOptions {
project: maybe_path(opts.project),
Expand All @@ -975,6 +980,7 @@ pub fn overhead_trim(opts: Option<OverheadTrimOptions>) -> Result<BigIntPromotin
ledger_home: maybe_path(opts.ledger_home),
top: opts.top.map(u64::from),
include_diff: opts.include_diff,
harness_home: maybe_path(opts.harness_home),
};
let result = sdk::overhead_trim(raw).map_err(sdk_err)?;
let value = serde_json::to_value(&result)
Expand Down
6 changes: 3 additions & 3 deletions crates/relayburn-sdk/src/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ pub use hotspots::{
McpServerAggregation, SubagentAggregation,
};
pub(crate) use overhead::{
attribute_overhead, find_overhead_files, load_overhead_file, AttributeOverheadInput,
OverheadAttribution, OverheadFile, ParsedOverheadFile,
attribute_overhead, find_overhead_files, find_overhead_files_in_home, load_overhead_file,
AttributeOverheadInput, OverheadAttribution, OverheadFile, ParsedOverheadFile,
};
pub use overhead::{describe_applies_to, OverheadFileKind};
pub use overhead::{describe_applies_to, OverheadFileKind, OverheadFileScope};
pub(crate) use patterns::detect_patterns;
pub use patterns::DetectPatternsOptions;
pub(crate) use pricing::{load_pricing, PricingTable};
Expand Down
Loading
Loading