Skip to content

[bug]: Kiro CLI mutable request deltas stay in the start bucket across days #164

Description

@pitimon

Bug

Kiro CLI live requests are mutable cumulative snapshots. TokenTracker computes positive per-request growth correctly but always applies every later delta to the immutable request_start_timestamp_ms bucket.

A request that remains active across midnight therefore grows its start-day total.

Evidence

  • parseKiroCliIncremental() reads cumulative prompt/response sizes and stores a per-request watermark.
  • want.bucketStart is derived from request_start_timestamp_ms.
  • The positive delta at the watermark application stage is always added to want.bucketStart.
  • Existing mutation coverage grows one request while retaining the start timestamp, but does not cross midnight.

Expected policy

  • First positive contribution: request-start bucket.
  • Later positive growth for an existing request: current sync observation bucket.
  • Preserve watermark adoption, migration, reset/degraded-read behavior, conversation counts, and token conservation.
  • Add deterministic cross-midnight regression coverage.

Confirmed by provider-wide audit after Hermes #154 and Goose #158. Affected through v0.39.47.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions