test: unit tests for CLI decompose and eval pure-logic helpers (#861)#863
Merged
planetf1 merged 3 commits intogenerative-computing:mainfrom Apr 15, 2026
Merged
Conversation
…ative-computing#861) 35 tests covering reorder_subtasks (topological sort + cycle detection), verify_user_variables (input var and dependency cross-validation), validate_filename (path-traversal-safe regex), and parse_judge_output (JSON-then-regex fallback scoring parser).
…#861) - test_parse_invalid_json_falls_back_to_regex: assert reason == output to verify the regex fallback returns the raw text as justification, not just the score - _make_test_eval: pass explicit test_id so to_dict assertion is non-trivial - test_reorder_invalid_dependency_ignored: also assert tag survives intact - test_reorder_case_insensitive_dependency: new test verifying tag lookups are case-normalised (depends_on=["A"] resolves tag "a") - test_valid_filename_max_length: boundary test for the 250-char upper limit
…ative-computing#861) Aligns with codebase convention (test_openai_compatible_helpers.py, test_granite32_input.py, test_unit_test_eval.py all annotate helpers).
Contributor
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
This was referenced Apr 15, 2026
jakelorocco
approved these changes
Apr 15, 2026
Merged
via the queue into
generative-computing:main
with commit Apr 15, 2026
642ec7c
6 of 9 checks passed
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.
test: unit tests for CLI decompose and eval pure-logic helpers
Type of PR
Description
37 pure-logic unit tests for CLI helpers that have zero backend dependency:
reorder_subtasks— topological sort, cycle detection, case normalisation, renumbering of subtask textverify_user_variables— input variable and dependency cross-validation, conditional reorder triggervalidate_filename— path-traversal-safe filename regex, boundary conditionsparse_judge_output— JSON extraction with regex fallback for scoring, zero-score and no-score edge casesNo CI or docs changes required —
test/cli/is already collected by the standarduv run pytest testrun.Testing