Skip to content

🧪 Add network-local reduction parity fixtures#1734

Merged
chrisjsewell merged 1 commit into
masterfrom
schema-network-local-reduction-fixtures
Jun 30, 2026
Merged

🧪 Add network-local reduction parity fixtures#1734
chrisjsewell merged 1 commit into
masterfrom
schema-network-local-reduction-fixtures

Conversation

@chrisjsewell

Copy link
Copy Markdown
Member

Adds two schema-validation fixtures that pin sphinx-needs' behaviour for a network-context local schema using unevaluatedProperties, to serve as the parity oracle for the ubcode port.

  • network_local_unevaluated_reduced_ok — a linked spec with no extra fields, reduced to just {type: spec}, validates cleanly. Confirms _validate_need_local applies reduce_need inside the network path exactly as for top-level local validation.
  • network_local_unevaluated_reduced_error — the linked spec sets an extra asil field the schema does not reference; reduction keeps actively-set extra fields, so unevaluatedProperties: false still fails. Confirms reduction does not mask real violations.

No behaviour change — fixtures + snapshots only.

Add two schema-validation fixtures exercising a network-context `local`
schema that uses `unevaluatedProperties`:

- `network_local_unevaluated_reduced_ok`: a linked spec with no extra
  fields, reduced to just `{type: spec}`, validates cleanly — confirming
  `_validate_need_local` applies `reduce_need` inside the network path as
  it does for top-level local validation.
- `network_local_unevaluated_reduced_error`: the linked spec sets an
  extra `asil` field the schema does not reference; reduction keeps it, so
  `unevaluatedProperties: false` still fails — confirming reduction does
  not mask real violations.

These pin the existing behaviour as an oracle for the ubcode port.

@ubmarco ubmarco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would I have to say against more testing?!

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1734      +/-   ##
==========================================
+ Coverage   86.87%   89.37%   +2.49%     
==========================================
  Files          56       72      +16     
  Lines        6532    10549    +4017     
==========================================
+ Hits         5675     9428    +3753     
- Misses        857     1121     +264     
Flag Coverage Δ
pytests 89.37% <ø> (+2.49%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@chrisjsewell chrisjsewell merged commit cbf245c into master Jun 30, 2026
24 checks passed
@chrisjsewell chrisjsewell deleted the schema-network-local-reduction-fixtures branch June 30, 2026 19:19
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.

2 participants