test: add missing tests to achieve 100% coverage#38205
Merged
crazywoola merged 1 commit intoJun 30, 2026
Merged
Conversation
Copilot created this pull request from a session on behalf of
crazywoola
June 30, 2026 07:58
View session
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.
Important
Summary
This PR addresses the missing line coverage across several backend and frontend modules as highlighted in the issue. The goal was to reach 100% coverage on specific files to strengthen the testing baseline without altering the existing production logic.
Backend (
api/) additions:api/core/llm_generator/llm_generator.py: Added coverage for JSON repair fallbacks in_parse_string_list, context building failures ingenerate_workflow_instruction_suggestions, and edge cases inclassify_workflow_mode.api/controllers/console/app/generator.py: Added exhaustive testing of missing payload argument permutations and validation exception handlers (e.g.ProviderTokenNotInitError,QuotaExceededError) forRuleGenerateApi,RuleCodeGenerateApi,StructuredOutputGenerateApi, andInstructionGenerateApi.api/core/workflow/generator/runner.py: Added test cases for Kahn's cycle edge detection errors, empty iteration container error handling, and unresolved graph node reference reporting (UNKNOWN_NODE_REFERENCE,UNKNOWN_TOOL,INVALID_CONTAINER).Frontend (
web/) additions:web/service/base.ts: ExpandedhandleStreammock reader coverage to deal with malformed JSON buffer objects, errors on 400 statuses, and reasoning chunk dispatches. Verified standard HTTP export methods (get,post,deletc).web/service/debug.ts: Verified all exported functional signatures includingsendCompletionMessage,fetchSuggestedQuestions,fetchConversationMessages, andgenerateWorkflowStreamwith respective parameter/callback wiring logic.Screenshots
Checklist
make lint && make type-check(backend) andcd web && pnpm exec vp staged(frontend) to appease the lint gods