Skip to content

chore(deps): bump mloda to 0.10.0 - #40

Merged
TomKaltofen merged 3 commits into
mainfrom
chore/bump-mloda-0-10-0
Jul 13, 2026
Merged

chore(deps): bump mloda to 0.10.0#40
TomKaltofen merged 3 commits into
mainfrom
chore/bump-mloda-0-10-0

Conversation

@TKaltofen

Copy link
Copy Markdown
Collaborator

Raises the mloda floor to >=0.10.0 (and mloda-testing to >=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_validator removed: no usage anywhere in open_kgo/, demo/, or tests/.
  • Bare-string input features now forward options like object children: KG feature groups are leaf reader sources and declare no input_features(), so there is no forwarding surface.
  • FeatureSet name accessors return sorted tuples: KG readers dispatch exactly one feature per load (_assert_single_feature), so name ordering cannot change which feature a reader picks.

The fourth one does bite. Core's property_spec now permits allowed_values without strict=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 no FeatureChainParser in this repo): they drive credential-shape validation, and _validate_mapping enforces an allowed set only under strict_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.lock carries some unrelated churn beyond the two version bumps: marker rewrites on cffi, exceptiongroup, and pyzmq from a newer uv resolver. Harmless, nothing to read into it.
  • The mloda >= 0.9.0 mentions left in reader_base.py and test_reader_load_wrap.py are statements about when a capability was introduced. Still true under 0.10.0, so rewriting them to 0.10.0 would assert something false.
  • The dev-extra comment claiming mloda-testing "backs the in-repo contract harness" was inaccurate (only tests/test_mloda_imports.py imports it); corrected while in the file.

Verification

tox green: 1038 passed, 57 skipped, plus ruff format --check, ruff check, mypy --strict, bandit. Reviewed independently by codex (no findings) and a second deep review whose findings are folded in.

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.
@TomKaltofen
TomKaltofen merged commit cdf37e0 into main Jul 13, 2026
10 checks passed
@TomKaltofen
TomKaltofen deleted the chore/bump-mloda-0-10-0 branch July 13, 2026 20:44
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