From e44cf827a915ca1c48453e278e019a9acd03f31d Mon Sep 17 00:00:00 2001 From: Sahil Gandhi Date: Sun, 22 Feb 2026 20:59:01 -0800 Subject: [PATCH 1/2] fix: include command name in err/test tracking labels rtk err and rtk test hardcoded their tracking labels to generic "rtk run-err" and "rtk run-test", losing the identity of the wrapped command in `rtk gain` output. Now they use the actual command (e.g., "rtk err pre-commit run --verbose") consistent with how other subcommands track themselves. --- src/runner.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/runner.rs b/src/runner.rs index 6ae6599e..afd77b80 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -58,7 +58,8 @@ pub fn run_err(command: &str, verbose: u8) -> Result<()> { } else { println!("{}", rtk); } - timer.track(command, "rtk run-err", &raw, &rtk); + let label = format!("rtk err {}", command); + timer.track(command, &label, &raw, &rtk); Ok(()) } @@ -99,7 +100,8 @@ pub fn run_test(command: &str, verbose: u8) -> Result<()> { } else { println!("{}", summary); } - timer.track(command, "rtk run-test", &raw, &summary); + let label = format!("rtk test {}", command); + timer.track(command, &label, &raw, &summary); Ok(()) } From 2a4d7873a7756142e8142cb7034482a942bbaadc Mon Sep 17 00:00:00 2001 From: Sahil Gandhi Date: Mon, 2 Mar 2026 10:07:58 -0800 Subject: [PATCH 2/2] fix: apply cargo fmt after merge --- src/discover/registry.rs | 4 +++- src/go_cmd.rs | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/discover/registry.rs b/src/discover/registry.rs index c3c52edc..c7164708 100644 --- a/src/discover/registry.rs +++ b/src/discover/registry.rs @@ -288,7 +288,9 @@ const IGNORED_PREFIXES: &[&str] = &[ "case ", ]; -const IGNORED_EXACT: &[&str] = &["cd", "echo", "true", "false", "wait", "pwd", "bash", "sh", "fi", "done"]; +const IGNORED_EXACT: &[&str] = &[ + "cd", "echo", "true", "false", "wait", "pwd", "bash", "sh", "fi", "done", +]; lazy_static! { static ref REGEX_SET: RegexSet = RegexSet::new(PATTERNS).expect("invalid regex patterns"); diff --git a/src/go_cmd.rs b/src/go_cmd.rs index 278c0ce2..42ff0cd9 100644 --- a/src/go_cmd.rs +++ b/src/go_cmd.rs @@ -267,8 +267,7 @@ fn filter_go_test_json(output: &str) -> String { // Handle build-output/build-fail events (use ImportPath, no Package) match event.action.as_str() { "build-output" => { - if let (Some(import_path), Some(output_text)) = - (&event.import_path, &event.output) + if let (Some(import_path), Some(output_text)) = (&event.import_path, &event.output) { let text = output_text.trim_end().to_string(); if !text.is_empty() {