• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lucasliet / llm-telegram-bot / 21737185044 / 1
54%
main: 54%

Build:
DEFAULT BRANCH: main
Ran 06 Feb 2026 03:07AM UTC
Files 43
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Feb 2026 03:06AM UTC coverage: 64.154% (+5.0%) from 59.131%
21737185044.1

push

github

web-flow
fix: correct token estimation to include tool results before summarization (#23)

* fix: address code review issues from PR #22

- Fix buggy JSON.parse truthy check in readInitialStreamAndExtract
- Replace @ts-ignore with properly typed params object
- Add TSDoc to responseMap function
- Fix misleading 'parallel' TSDoc in AgentLoopExecutor
- Remove inline comment violating code style

* fix: correct token estimation to include tool results before summarization

The summarizeToolResults function was estimating tokens only from existing
messages without including the new tool results. This caused the safeguard
to fail - it would decide 'we have space' based on current messages, add
the large tool results, then exceed the context window on the next API call.

Changes:
- Add estimateToolResultsTokens() to calculate tokens from tool results
- Calculate totalTokensAfterAdding = currentTokens + toolResultsTokens
- Simplify condition: summarize when total > maxTokens
- Remove complex summarizationCost/minRequiredTokens logic

Fixes context overflow: 400 prompt token count exceeds limit of 128000

* fix: address code review issues for token estimation and add comprehensive tests

- Fix bug #1: estimate full ToolExecutionResult object instead of just result field
- Fix bug #2: add RESPONSE_BUFFER (2000 tokens) to summarization threshold
- Improve logging to show currentTokens and toolResultsTokens separately
- Add 20 comprehensive tests for AgentLoopExecutor covering:
  - Basic execution flow (4 tests)
  - Iteration limits (2 tests)
  - Tool execution (4 tests)
  - Summarization logic (5 tests) - validates bug fixes
  - Error handling (2 tests)
  - Observability callbacks (3 tests)
- Increase AgentLoopExecutor test coverage from 29.56% to 97.6%

138 of 296 branches covered (46.62%)

Branch coverage included in aggregate %.

2407 of 3671 relevant lines covered (65.57%)

19.59 hits per line

Source Files on job 21737185044.1
  • Tree
  • List 43
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 21737185044
  • 373d0008 on github
  • Prev Job for on main (#21691674121.1)
  • Next Job for on main (#21738785755.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc