Skip to content

fix: add fix for negative token values in metrics and add logs to tro…#3695

Merged
johnnyeric merged 1 commit into
mainfrom
johnnyeric/session-ingest-timing-logs
Jun 3, 2026
Merged

fix: add fix for negative token values in metrics and add logs to tro…#3695
johnnyeric merged 1 commit into
mainfrom
johnnyeric/session-ingest-timing-logs

Conversation

@johnnyeric
Copy link
Copy Markdown
Contributor

Summary

  • Adding logs to help troubleshoot session-ingest workers bottleneck
  • Fixed zed errors with negative token values in metrics

Verification

  • pnpm --filter cloudflare-session-ingest exec vitest run src/dos/session-metrics.test.ts src/queue-consumer.test.ts
  • pnpm --filter cloudflare-session-ingest typecheck
    scripts/lint-all.sh

Visual Changes

N/A

Reviewer Notes

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Jun 3, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Clean, targeted PR: the negative-token clamping fix is well-tested and correct, and the timing log additions follow existing codebase patterns without introducing any security, performance, or correctness issues.

Files Reviewed (4 files)
  • services/session-ingest/src/dos/session-metrics.tsnonNegative() helper + clamping at output, correct
  • services/session-ingest/src/dos/session-metrics.test.ts — test for negative-value clamping
  • services/session-ingest/src/queue-consumer.ts — timing logs in processItem and applyMetadataChanges
  • services/session-ingest/src/session-events.ts — timing log in notifyUserSessionEvent

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 570,738 tokens

Review guidance: REVIEW.md from base branch main

@johnnyeric johnnyeric merged commit 73ea1e2 into main Jun 3, 2026
16 checks passed
@johnnyeric johnnyeric deleted the johnnyeric/session-ingest-timing-logs branch June 3, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants