Watch
0
0
Fork
You've already forked hyperhive
0

hive-agent: correct doc comments that describe sentinel files, session flags and outcomes the code no longer has

This commit is contained in:
damocles 2026-10-21 22:13:54 +02:00 • committed by mara
commit ac0bed47e9

View file

@ -151,9 +151,9 @@ pub struct Snapshot {
pub first_turn_ctx: Option<u64>,
/// Number of fresh claude sessions (i.e. rows in the `sessions` table)
/// that started within the window. A new session is minted whenever the
/// harness runs a turn without `--continue` (manual `/new-session`,
/// auto-compaction fallback, or first-ever turn). `None` when the
/// `sessions` table doesn't exist yet (older db) — same inert-until-data
/// harness creates a session instead of resuming it by title (manual
/// `/new-session`, auto-compaction fallback, or first-ever turn). `None` when
/// the `sessions` table doesn't exist yet (older db) — same inert-until-data
/// pattern as `first_turn_ctx`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub session_count: Option<u64>,
@ -380,7 +380,7 @@ fn snapshot(path: &Path, window: Window) -> Result<Snapshot> {
/// First-turn input tokens of the most recent fresh claude session that
/// started in `[from, now]`. Tracks system-prompt + AGENTS.md sprawl:
/// the first turn of a fresh session (`--continue` suppressed) pays the
/// the first turn of a fresh session (created, not resumed by title) pays the
/// full static prefix as uncached input, so watching this over time
/// surfaces creep. Uses the agreed per-session derive — the first turn
/// (`ORDER BY started_at LIMIT 1`) of the latest session row.
@ -404,8 +404,9 @@ fn read_first_turn_ctx(conn: &Connection, from: i64) -> rusqlite::Result<u64> {
/// Count of fresh claude sessions that started within `[from, now]`.
///
/// Each row in the `sessions` table represents one fresh `claude --print`
/// invocation (without `--continue`): a manual `/new-session`, an
/// auto-compaction fallback, or the very first turn after spawning.
/// invocation that created a session rather than resuming by title: a manual
/// `/new-session`, an auto-compaction fallback, or the very first turn after
/// spawning.
///
/// Returns `Err` when the `sessions` table doesn't exist (older db) so the
/// caller can map to `None` — same inert-until-data pattern as