Watch
0
0
Fork
You've already forked hyperhive
0

remove the hivectl-only quota verbs and the trollshell status feed

This commit is contained in:
atlas 2026-11-13 16:00:30 +01:00
commit cf360b74b9

View file

@ -451,9 +451,8 @@ fn compact(bus: &Bus, wake_prompt: Option<String>) -> Response {
message: "compact refused: effective context window is unknown (0)".to_owned(),
};
}
// Token counts stay well under 2^53 in practice, so the f64 conversion
// is exact; this is a threshold ratio, not a byte-count display, but the
// same "cosmetic precision loss" reasoning as `hivectl::quota::human_bytes` applies.
// Token counts stay well under 2^53 in practice, so the f64 conversion is exact.
// The ratio is only compared against a fixed threshold, so a last-place rounding error cannot change the outcome.
#[allow(clippy::cast_precision_loss)]
let fraction = usage.context_tokens() as f64 / window as f64;
if fraction < COMPACT_MIN_USAGE_FRACTION {