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

lucasliet / llm-telegram-bot / 21737185044
55%

Build:
DEFAULT BRANCH: main
Ran 06 Feb 2026 03:06AM UTC
Jobs 1
Files 43
Run time 1min
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

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 %.

15 of 18 new or added lines in 2 files covered. (83.33%)

1 existing line in 1 file now uncovered.

2407 of 3671 relevant lines covered (65.57%)

19.59 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
57.63
0.2% src/service/openai/OpenAIService.ts

Uncovered Existing Lines

Lines Coverage ∆ File
1
57.63
0.2% src/service/openai/OpenAIService.ts
Jobs
ID Job ID Ran Files Coverage
1 21737185044.1 06 Feb 2026 03:06AM UTC 43
64.15
GitHub Action Run
Source Files on build 21737185044
  • 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 Repo
  • 373d0008 on github
  • Prev Build on main (#21691674121)
  • Next Build on main (#21738785755)
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