Skip to content

fix(server): preserve integer metrics precision#32

Draft
esko wants to merge 1 commit into
AtomicBot-ai:feature/turboquant-kv-cachefrom
esko:fix/cache002-prometheus-integer-precision
Draft

fix(server): preserve integer metrics precision#32
esko wants to merge 1 commit into
AtomicBot-ai:feature/turboquant-kv-cachefrom
esko:fix/cache002-prometheus-integer-precision

Conversation

@esko

@esko esko commented Jul 15, 2026

Copy link
Copy Markdown

CACHE-002 completed all 36 requests but exact metric reconciliation failed: direct prompt timings summed to 1,423,152 while /metrics emitted 1,423,150 because integer JSON values were coerced to double and rendered with default stream precision.

This change preserves signed and unsigned integer JSON types and emits exact decimal literals. Finite floating metrics use round-trip-safe precision; nonnumeric and nonfinite values fail safely. HELP/TYPE/sample layout and metric names remain unchanged.

Validation:

  • Release + Metal + embedded Metal llama-server build passed
  • focused formatter test passed
  • relevant CTest selection passed 4/4
  • bounded /metrics endpoint smoke passed

Correctness-only change; no performance claim. Do not merge until deployment repin and full CACHE-002 rerun are reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant