887 B
887 B
Merged and completed.
Implementation:
- Merged branch
prompt-occupancy-token-estimatorintodevelopwithmerge: prompt occupancy estimator. llm-workertoken counter extrapolation now keeps exact measured prompt occupancy authoritative and no longer extrapolates one-measurement growth viatotal_input_tokens / history_bytes.- Extrapolation past the latest measurement uses a measured incremental span rate when available; otherwise it adds a conservative byte fallback for the unmeasured delta.
- Added pod interceptor regression coverage for the fresh-session / one-measurement overestimation case.
Validation after merge:
cargo test -p llm-worker token_counterpassed.cargo test -p pod pre_llm_request_does_not_yield_from_single_measurement_history_rate_projectionpassed../tickets.sh doctorpassed.
Review:
- External reviewer approved with no blockers.