chore(deps): bump mloda to 0.10.0 - #40
Merged
Merged
Conversation
Core 0.10.0 relaxed property_spec: allowed_values without strict=True is now
permitted, because a non-strict value space still maps a name-parsed value back
onto its PROPERTY_MAPPING key. KG specs are never name-parsed and
_validate_mapping enforces the allowed set only under strict_validation, so a
non-strict enum would be decorative here. Keep the rejection in the KG wrapper.
Core also reworded the strict-default rejection ("not one of the accepted
values"); the invariant is unchanged, so only the test regexes move.
… specs kg/spec.py rejects allowed_values without strict=True at construction, but specs are also hand-assembled (dict-spread in in_process_tuple_store, comprehension narrowing in the rest/citation readers), and core permits the shape since 0.10.0. Walk all 235 non-strict specs and assert none carries a decorative value space. Also correct the dev-extra comment: the KG contract harness imports nothing from mloda-testing (only tests/test_mloda_imports.py does), and reword the spec.py docstring to say why the floor is 0.10.0 rather than restating 0.9.0's news.
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.
Raises the mloda floor to
>=0.10.0(andmloda-testingto>=0.3.2), re-locks, and adapts to the one 0.10.0 breaking change that has surface in this repo.What 0.10.0 changed, and what it meant here
mloda 0.10.0 ships four breaking changes. Three have no surface in open-kgo, verified rather than assumed:
validation_function/type_validatorremoved: no usage anywhere inopen_kgo/,demo/, ortests/.input_features(), so there is no forwarding surface._assert_single_feature), so name ordering cannot change which feature a reader picks.The fourth one does bite. Core's
property_specnow permitsallowed_valueswithoutstrict=True, where it previously rejected it. Core relaxed the rule because a non-strict value space still maps a name-parsed value back onto its PROPERTY_MAPPING key. KG specs are never name-parsed (there is noFeatureChainParserin this repo): they drive credential-shape validation, and_validate_mappingenforces an allowed set only understrict_validation is True. A non-strict enum here would therefore be decorative, silently unenforced. So the rejection stays, moved from core into the KG wrapper (kg/spec.py), which already exists to hold exactly this kind of local convention.Because specs are also hand-assembled in places (dict-spread in
in_process_tuple_store, comprehension narrowing in the rest/citation readers), the constructor guard alone does not cover every path. A cross-reader contract walk now asserts the invariant over all 235 non-strict specs.Core also reworded its strict-default rejection message; the invariant is unchanged, so only the test regexes moved (to a fragment less likely to drift on the next reword).
Notes for review
uv.lockcarries some unrelated churn beyond the two version bumps: marker rewrites oncffi,exceptiongroup, andpyzmqfrom a newer uv resolver. Harmless, nothing to read into it.mloda >= 0.9.0mentions left inreader_base.pyandtest_reader_load_wrap.pyare statements about when a capability was introduced. Still true under 0.10.0, so rewriting them to 0.10.0 would assert something false.tests/test_mloda_imports.pyimports it); corrected while in the file.Verification
toxgreen: 1038 passed, 57 skipped, plusruff format --check,ruff check,mypy --strict,bandit. Reviewed independently by codex (no findings) and a second deep review whose findings are folded in.