Skip to content

fix: leaks in flow and rate limit#74

Merged
nullboundary merged 1 commit into
calque-ai:mainfrom
ankittk:fix-leak-rl
Jan 16, 2026
Merged

fix: leaks in flow and rate limit#74
nullboundary merged 1 commit into
calque-ai:mainfrom
ankittk:fix-leak-rl

Conversation

@ankittk
Copy link
Copy Markdown
Contributor

@ankittk ankittk commented Jan 14, 2026

  • When a flow failed or was cancelled,a background tasks is stuck forever waiting for data that would never come. This is Fixed by making sure all data pipes are properly closed when the flow ends.
  • The rate limiter was busy-waiting and losing track of time between token refills.
  • simple context loss

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 69.56522% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/calque/flow.go 71.42% 3 Missing and 1 partial ⚠️
pkg/middleware/ctrl/ratelimit.go 66.66% 1 Missing and 1 partial ⚠️
pkg/calque/handler.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@nullboundary
Copy link
Copy Markdown
Contributor

@ankittk Awesome, nice bug catch!

@nullboundary nullboundary merged commit 3e3083b into calque-ai:main Jan 16, 2026
6 checks passed
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