open-code-review icon indicating copy to clipboard operation
open-code-review copied to clipboard

fix: remove hardcoded 180s timeout from REVIEW_FILTER_TASK

Open kunaaaalcodes opened this issue 4 months ago • 2 comments

What I changed

I removed the hidden 180s inner timeout on REVIEW_FILTER_TASK that was causing context deadline exceeded errors for people using local LLMs. Now it uses the same global timeout settings (OCR_LLM_TIMEOUT / --timeout) as every other task — no more, no less.

Files I touched

internal/agent/agent.go

Deleted the if ft.Timeout > 0 { ... } block in executeReviewFilter. The filter task was the only task wrapping its LLM call in an extra context.WithTimeout — and that 180s deadline was smaller than the 300s global timeout, so it always fired first.

internal/config/template/task_template.json

Removed "timeout" from all five tasks. They were dead code — only the filter task's timeout was ever read in production, and now that's gone too.

internal/config/template/template_test.go

Updated the test to expect Timeout == 0 instead of 120.

Tests

ok github.com/open-code-review/open-code-review/internal/agent 4.18s ok github.com/open-code-review/open-code-review/internal/config/template 0.61s ok github.com/open-code-review/open-code-review/internal/diff 11.76s

kunaaaalcodes avatar Jul 23 '26 19:07 kunaaaalcodes

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 23 '26 19:07 CLAassistant

✅ OpenCodeReview: No comments generated. Looks good to me.

github-actions[bot] avatar Jul 23 '26 19:07 github-actions[bot]

Thanks for the thorough review, @lizhengfeng101! I've pushed an additional commit that removes the same timeout block from internal/diff/relocation.go as you suggested. The dead code cleanup is done while keeping the Timeout struct fields intact for anyone using custom template files. Let me know if anything else needs tweaking!

kunaaaalcodes avatar Jul 24 '26 04:07 kunaaaalcodes