Fix context_validator running CASE validators during meshing-only JSON generation#1913
Merged
benflexcompute merged 4 commits intomainfrom Mar 23, 2026
Merged
Conversation
…N generation _intersect_validation_levels returned None when validation_level=None was requested, but context_validator treated None as "run all". This caused generate_process_json (upTo=SurfaceMesh) to fail when velocity_magnitude=0 without reference_velocity — a valid meshing-only scenario. Two fixes: - _intersect_validation_levels returns [] instead of None for no-match cases - context_validator skips when current_levels is None, consistent with validate_conditionally_required_field behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…SE level context_validator now skips when no ValidationContext is set, so the test needs an explicit ValidationContext(levels=[CASE]) for the validator to fire. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
angranl-flex
approved these changes
Mar 20, 2026
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
generate_process_jsonwithupTo=SurfaceMeshfails whenvelocity_magnitude=0withoutreference_velocity_magnitude, even though operating condition validation is irrelevant for meshing_intersect_validation_levelsreturnedNonewhenvalidation_level=None, andcontext_validatortreatedNoneas "run all validators"_intersect_validation_levelsreturns[]instead ofNone;context_validatorskips whencurrent_levels is None, consistent withvalidate_conditionally_required_fieldbehaviorTest plan
_intersect_validation_levelsreturning[]whenvalidation_level=Nonegenerate_process_jsonwithvelocity_magnitude=0,upTo=SurfaceMeshsucceedstest_validation_level_intersectionandtest_generate_process_jsonstill pass🤖 Generated with Claude Code
Note
Medium Risk
Changes validation gating semantics (
None/unset levels now skip context-aware validators), which could hide expected validation errors if any callers relied on the previous behavior.Overview
Fixes meshing-only
generate_process_jsonfailing due to unrelated Case validators by ensuring “no requested validation levels” means run no context-aware validators.This updates
_intersect_validation_levelsto return[](instead ofNone) when no levels are requested and adjustscontext_validatorto skip when there is no activeValidationContext. Tests are updated/added to cover the new intersection behavior and to assert meshing JSON generation succeeds even whenvelocity_magnitude=0without a reference velocity.Written by Cursor Bugbot for commit 26b071a. This will update automatically on new commits. Configure here.