test: exercise the extension points with a mock external backend - #118
Open
ehennestad wants to merge 1 commit into
Open
test: exercise the extension points with a mock external backend#118ehennestad wants to merge 1 commit into
ehennestad wants to merge 1 commit into
Conversation
Contributor
Test Results (R2022a)767 tests 766 ✅ 2m 5s ⏱️ Results for commit c43a2c8. ♻️ This comment has been updated with latest results. |
ehennestad
force-pushed
the
add-external-integration-test
branch
from
August 31, 2026 10:20
2b1f9ff to
6111644
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## add-resolver-reregistration #118 +/- ##
==============================================================
Coverage ? 80.02%
==============================================================
Files ? 422
Lines ? 4066
Branches ? 0
==============================================================
Hits ? 3254
Misses ? 812
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ehennestad
force-pushed
the
add-external-integration-test
branch
from
August 31, 2026 10:40
b7d5e14 to
59ee1c8
Compare
Contributor
ehennestad
force-pushed
the
add-external-integration-test
branch
from
September 1, 2026 14:31
59ee1c8 to
0772857
Compare
The reason the serialization, deserialization and resolution architecture exists is that an external library can integrate a database or format without changing this repository. Nothing verified that end to end. This adds a mock external backend built purely on the extension surface: a serializer producing database records on openminds.abstract .BaseSerializer, a deserializer on openminds.abstract.BaseDeserializer, a store on openminds.interface.MetadataStore and a resolver on openminds.interface.LinkResolver holding its database client as instance state. ExternalIntegrationTest drives it through the five things an external backend has to be able to do: save a collection as records, load the records back into one connected graph, reproduce the canonical JSON-LD document byte for byte after the round trip, resolve a reference whose type only the database knows by replacement, and populate a typed reference in place. If a change breaks these tests, it breaks every external integration, openminds-kg-sync included. The mock classes double as a worked example of the contract. The verification that led to this test found the Collection.save store bug fixed earlier in this stack. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ehennestad
force-pushed
the
add-external-integration-test
branch
from
September 1, 2026 20:58
0772857 to
c43a2c8
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.
The point of the serialization, deserialization and resolution architecture in this stack is that an external library can integrate a graph database or a new format without changing openMINDS_MATLAB. Until now nothing verified that end to end.
This adds a mock external backend written purely against the extension surface promoted two PRs down:
MockGraphSerializer— a non-JSON-LD record format onopenminds.abstract.BaseSerializer; implements only the constructor andformatOutput, inheriting traversal, reference and embedding handling.MockGraphDeserializer— implements onlyparseToStructsonopenminds.abstract.BaseDeserializer, inheriting type dispatch and cross-record link wiring.MockGraphMetadataStore—openminds.interface.MetadataStorebacked by an in-memory record database.MockGraphResolver—openminds.interface.LinkResolverholding its database client as instance state, which is what the instance-method resolver contract exists for.ExternalIntegrationTestdrives the five things an external backend has to be able to do:If a change breaks these tests, it breaks every external integration, openminds-kg-sync included. The mock classes double as a worked example of the contract — roughly 200 lines for a complete backend.
The verification run that produced this test also found the
Collection.savestore bug fixed in #115.🤖 Generated with Claude Code