Flatten property schema validation branching (#36) - #197
Draft
leynos wants to merge 1 commit into
Draft
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Contributor
Reviewer's GuideRefactors property schema validation to use early returns and small helper functions for object and array types, simplifying control flow without changing validation behavior or public API. Flow diagram for flattened validate_property_schema control flowflowchart LR
A[validate_property_schema] --> B{prop.type present?}
B -- no --> C[return]
B -- object --> D[validate_nested_object_schema]
B -- array --> E[validate_array_items]
D --> F[validate_tool_schema_at]
subgraph ArrayValidation
E --> G{items present?}
G -- no --> H[push array property missing items]
G -- yes --> I{is_object_type}
I -- no --> J[return]
I -- yes --> K[child items path]
K --> L[validate_tool_schema_at]
end
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
leynos
force-pushed
the
issue-36-deep-nested-complexity-refactor-validate-property-schema
branch
from
July 16, 2026 09:54
0b124df to
335a293
Compare
leynos
force-pushed
the
issue-36-deep-nested-complexity-refactor-validate-property-schema
branch
from
July 17, 2026 22:24
335a293 to
7812c73
Compare
Split nested array and object handling out of `validate_property_schema` so the validator keeps the same behaviour while staying below the nesting threshold.
leynos
force-pushed
the
issue-36-deep-nested-complexity-refactor-validate-property-schema
branch
from
July 18, 2026 19:17
7812c73 to
95ca01c
Compare
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
This branch flattens
validate_property_schemain the tool schema helper soarray and nested object validation use guard-clause helpers instead of nested
conditionals. The validation rules, error strings and public API remain
unchanged.
Closes #36.
Related review thread: #18.
Review walkthrough
Validation
cargo fmt --all: passed.cargo test test_validate_tool_schema_nested_path_uses_child: passed.coderabbit review --agent: passed with 0 findings after one recoverable rate-limit retry.make all: passed, including 4,110 nextest tests and 5 GitHub tool tests.Notes
Summary by Sourcery
Enhancements: