Skip to content

👌 Improve reduce_need for schema validation#1633

Open
ubmarco wants to merge 10 commits intomasterfrom
mh-reduce-need
Open

👌 Improve reduce_need for schema validation#1633
ubmarco wants to merge 10 commits intomasterfrom
mh-reduce-need

Conversation

@ubmarco
Copy link
Member

@ubmarco ubmarco commented Jan 29, 2026

The schema validation testing was lacking corner cases with regards to unevaluatedProperties.
This is now added, including fixes for default handling.

The docstring of reduce_need was expanded with the new rules.

unevaluated_properties_test.csv

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.59%. Comparing base (4e10030) to head (c506d26).
⚠️ Report is 232 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1633      +/-   ##
==========================================
+ Coverage   86.87%   88.59%   +1.71%     
==========================================
  Files          56       70      +14     
  Lines        6532     9955    +3423     
==========================================
+ Hits         5675     8820    +3145     
- Misses        857     1135     +278     
Flag Coverage Δ
pytests 88.59% <100.00%> (+1.71%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ubmarco ubmarco marked this pull request as ready for review January 30, 2026 17:16
@ubmarco ubmarco requested a review from chrisjsewell January 30, 2026 17:18
Currently reduce_need depends on the schema to determine whether core fields should be added to the to-be-validated need. To run unevaluatedProperties validations.

This is a performance issue, as the need reduction has to run for all need-schema combinations.
- Removed unnecessary checks for schema properties when processing link fields.
- Updated logic to retain only non-empty link fields in the reduced need.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant