diff --git a/work-items/open/20260601-001616-prompt-occupancy-token-estimator/item.md b/work-items/open/20260601-001616-prompt-occupancy-token-estimator/item.md index 2c3cd39e..5aea9647 100644 --- a/work-items/open/20260601-001616-prompt-occupancy-token-estimator/item.md +++ b/work-items/open/20260601-001616-prompt-occupancy-token-estimator/item.md @@ -7,7 +7,7 @@ kind: task priority: P1 labels: [compaction, token-accounting] created_at: 2026-06-01T00:16:16Z -updated_at: 2026-06-01T00:41:18Z +updated_at: 2026-06-01T00:59:20Z assignee: null legacy_ticket: null --- diff --git a/work-items/open/20260601-001616-prompt-occupancy-token-estimator/thread.md b/work-items/open/20260601-001616-prompt-occupancy-token-estimator/thread.md index fa823faa..2ba02a57 100644 --- a/work-items/open/20260601-001616-prompt-occupancy-token-estimator/thread.md +++ b/work-items/open/20260601-001616-prompt-occupancy-token-estimator/thread.md @@ -96,4 +96,30 @@ Validation: - `./tickets.sh doctor` in main workspace before finalization. +--- + + + +## Review: approve + +External reviewer recommendation: approve. + +Summary: +- Exact UsageRecord matches remain authoritative. +- Extrapolation after the latest measurement no longer uses `latest_total_input_tokens / latest_history_bytes`. +- Interpolation between two measurements still uses measured deltas where fixed overhead cancels. +- One-measurement extrapolation uses a conservative byte fallback added to latest measured total. +- Regression coverage exists in `llm-worker` token counter tests and pod `pre_llm_request` behavior. +- No intentional prune policy/savings, threshold/default, session schema, or compact lifecycle changes were found. + +Validation re-run by reviewer: +- `cargo test -p llm-worker token_counter` passed. +- `cargo test -p pod pre_llm_request_does_not_yield_from_single_measurement_history_rate_projection` passed. +- `git diff --check 3ea0058..HEAD` passed. +- `cargo fmt --check` passed. + +Non-blocking follow-up: +- Some comments still describe extrapolation as a latest/final measurement rate even though the implementation is now latest measured incremental span or byte fallback. Reviewer classified this as documentation drift only, not a blocker. + + ---