Watch
0
0
Fork
You've already forked hyperhive
0

hive-bash-mcp: count bash commands over OTEL in the daemon, drop the sqlite hand-off

This commit is contained in:
damocles 2026-11-18 19:44:18 +01:00 • committed by mara
commit 076df804e4

View file

@ -29,7 +29,6 @@ pub fn format_wake_prompt(from: &str, body: &str, redelivered: bool, interrupted
/// (`otel_turn_metrics::record`).
#[derive(Debug, Clone)]
pub struct TurnStatRow {
pub started_at: i64,
pub duration_ms: i64,
pub model: String,
pub wake_from: String,
@ -51,7 +50,6 @@ pub struct TurnStatRow {
/// `get_loose_ends` call before it's consumed — `Bus::take_tool_calls` resets
/// the counter, so there's only one chance to read it per turn.
pub struct TurnRowArgs<'a> {
pub started_at: i64,
pub duration_ms: i64,
pub model: String,
pub wake_from: String,
@ -68,7 +66,6 @@ pub struct TurnRowArgs<'a> {
#[must_use]
pub fn build_row(args: TurnRowArgs<'_>) -> TurnStatRow {
let TurnRowArgs {
started_at,
duration_ms,
model,
wake_from,
@ -101,7 +98,6 @@ pub fn build_row(args: TurnRowArgs<'_>) -> TurnStatRow {
Err(TurnError::Failed(_)) => "failed",
};
TurnStatRow {
started_at,
duration_ms,
model,
wake_from,
@ -149,7 +145,6 @@ mod build_row_tests {
tool_calls: &[(&str, u64)],
) -> super::TurnStatRow {
build_row(TurnRowArgs {
started_at: 10,
duration_ms: 2_000,
model: "opus".to_owned(),
wake_from: "todo".to_owned(),
@ -187,7 +182,7 @@ mod build_row_tests {
let _dir = crate::paths::harness_dir_guard();
let row = row_for(&Ok(false), &[("Bash", 3)]);
assert_eq!((row.started_at, row.duration_ms), (10, 2_000));
assert_eq!(row.duration_ms, 2_000);
assert_eq!(
(row.model.as_str(), row.wake_from.as_str()),
("opus", "todo")
@ -210,7 +205,6 @@ mod build_row_tests {
let bus = Bus::new();
bus.set_resolved_model(Some("claude-opus-4-8".to_owned()));
let row = build_row(TurnRowArgs {
started_at: 0,
duration_ms: 0,
model: "opus".to_owned(),
wake_from: "todo".to_owned(),