hive-agent: keep the last turn's context size in the harness state file and drop the turn sqlite writes
This commit is contained in:
parent
7bd93ecfde
commit
5e5ff64b3c
1 changed files with 261 additions and 629 deletions
|
|
@ -39,7 +39,7 @@ use opentelemetry::metrics::{Counter, Gauge, Histogram, MeterProvider as _};
|
|||
use opentelemetry_otlp::{MetricExporter, Protocol, WithExportConfig};
|
||||
use opentelemetry_sdk::metrics::{PeriodicReader, SdkMeterProvider};
|
||||
|
||||
use crate::turn_stats::TurnStatRow;
|
||||
use crate::serve_common::TurnStatRow;
|
||||
|
||||
/// Export cadence. Matches `hive-c0re`'s container-metrics exporter so the
|
||||
/// two batch on the same rhythm.
|
||||
|
|
@ -123,7 +123,7 @@ static INSTRUMENTS: OnceLock<Option<Instruments>> = OnceLock::new();
|
|||
/// `fresh_session` is the harness's own "did this turn start a brand-new
|
||||
/// claude session" flag (`Bus::take_fresh_session`) — pass it through rather
|
||||
/// than re-deriving it here, since the harness only gets to observe it once
|
||||
/// per turn (the same flag gates minting a `turn_stats` `sessions` row).
|
||||
/// per turn.
|
||||
pub fn record(row: &TurnStatRow, fresh_session: bool) {
|
||||
let Some(inst) = INSTRUMENTS.get_or_init(build).as_ref() else {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue