Fix workflow stuck in refining/evaluation loops#120
Merged
neuromechanist merged 3 commits intodevelopfrom Mar 4, 2026
Merged
Conversation
- Make evaluation informational-only when run_assessment=False - Add 15s LLM call timeout via request_timeout on ChatLiteLLM - Default evaluation parsing to ACCEPT when ambiguous - Derive max_total_iterations from max_validation_attempts + 1 - Add per-node timing to all workflow nodes - Switch eval model default to openai/gpt-oss-120b on groq - Lower recursion_limit from 100 to 50 - Update default max_validation_attempts from 5 to 3 Closes #119
Deploying hedit with
|
| Latest commit: |
6cf0986
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://228724b8.hedit.pages.dev |
| Branch Preview URL: | https://119-fix-workflow-stuck-in-re.hedit.pages.dev |
- Move re import to module level in evaluation_agent.py - Add missing "Entering assess node" log for consistency - Centralize max_total_iterations derivation in state.py and workflow.py (was duplicated 3x in main.py, now defaults to max_validation_attempts + 1) - Update create_initial_state defaults (was stale at 5/10) - Fix ty warnings: remove unused type: ignore comments - Fix ty errors: add type: ignore for LangGraph/Starlette typing limitations - Fix return type on get_default_path (-> str | None) - Update test_state to match new default
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
- Add try/except with logging to evaluation, assessment, and feedback agents - Map timeouts to HTTP 504, rate limits to HTTP 429 in API endpoints - Add error_type field to streaming SSE error events - Sanitize error messages to avoid leaking internal details - Add debug log for silent ACCEPT fallback in evaluation parsing
Member
Author
PR Review SummaryThree specialized review agents analyzed this PR. Here is a summary of all findings and how each was addressed. Silent Failure HunterCRITICAL - No timeout error handling in LLM calls (evaluation, assessment, feedback agents)
HIGH - API endpoints return generic 500 for all errors
MEDIUM - Silent ACCEPT fallback in evaluation parsing
Code ReviewerStale defaults in
Missing "Entering assess node" log
Test assertion using old default (5 instead of 3)
Code Simplifier
Pre-existing Issues (not introduced by this PR)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
run_assessment=False(default), preventing the evaluation-driven refinement loop that caused the "stuck" behaviorrequest_timeouton ChatLiteLLM to prevent hanging on slow providersmax_total_iterationsfrommax_validation_attempts + 1(was hardcoded 10)time.monotonic()) to all workflow nodes for diagnosing slownessopenai/gpt-oss-120bongroqrecursion_limitfrom 100 to 50max_validation_attemptsfrom 5 to 3Behavior Change
run_assessment=Falserun_assessment=Truemax_validation_attempts + 1(4 by default)All settings remain tunable via the frontend (Max Validation Attempts dropdown, Run Assessment checkbox).
Test plan
run_assessment=Falsenever triggers refinement from evaluationrun_assessment=Trueallows refinement but caps atmax_validation_attempts + 1Closes #119