Skip to content

fix: use the store passed to Collection.save and drop the dead resolver option - #115

Open
ehennestad wants to merge 1 commit into
support-cross-namespace-loadingfrom
fix-collection-store-options
Open

fix: use the store passed to Collection.save and drop the dead resolver option#115
ehennestad wants to merge 1 commit into
support-cross-namespace-loadingfrom
fix-collection-store-options

Conversation

@ehennestad

@ehennestad ehennestad commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Found while verifying that an external graph database can integrate purely through the extension interfaces: a mock database with its own serializer, deserializer, metadata store and resolver, written against BaseSerializer, BaseDeserializer, openminds.interface.MetadataStore and AbstractLinkResolver without touching this repository.

Passing a store to save by name-value failed

elseif ~isempty(options.MetadataStore)
    outputPaths = obj.MetadataStore.save(instances);   % checks options, calls obj

obj.MetadataStore defaults to an empty store, so on any collection not constructed with a store the call errored with Invalid object. Value must be a scalar. rather than using the store it was given. The documented usage collection.save("", "MetadataStore", store) therefore never worked. It now calls the store from options.

Regression test added: saving through a name-value store on a collection constructed without one.

The dead LinkResolver option is removed

The constructor accepted options.LinkResolver but never assigned it, and the LinkResolver property was never read by anything. Resolvers are registered through openminds.registerLinkResolver and selected per reference from the registry, so a collection-level resolver has no role in the design that landed in this stack. Keeping a silently ignored parameter is worse than not having it, and nothing uses it — openminds-kg-sync included.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Test Results (R2022a)

761 tests  +1   760 ✅ +1   2m 38s ⏱️ +9s
 20 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 7b511a8. ± Comparison against base commit e05f38e.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.84%. Comparing base (e05f38e) to head (7b511a8).

Additional details and impacted files
@@                         Coverage Diff                         @@
##           support-cross-namespace-loading     #115      +/-   ##
===================================================================
+ Coverage                            79.80%   79.84%   +0.04%     
===================================================================
  Files                                  423      423              
  Lines                                 4070     4069       -1     
===================================================================
+ Hits                                  3248     3249       +1     
+ Misses                                 822      820       -2     

☔ 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.

@ehennestad
ehennestad force-pushed the fix-collection-store-options branch from b427088 to 3b4e7f8 Compare August 31, 2026 10:20
@ehennestad
ehennestad force-pushed the fix-collection-store-options branch from 0806e62 to d68984b Compare August 31, 2026 10:39
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Test Results (R2026a)

761 tests  +1   760 ✅ +1   2m 48s ⏱️ +23s
 20 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 7b511a8. ± Comparison against base commit e05f38e.

♻️ This comment has been updated with latest results.

@ehennestad
ehennestad force-pushed the fix-collection-store-options branch from d68984b to 4019af2 Compare September 1, 2026 14:31
…er option

Passing a metadata store to save by name-value failed on any collection
that was not constructed with one. The branch checked options.MetadataStore
but called save on obj.MetadataStore, which defaults to an empty store, so
the call errored on the empty object instead of using the store it was
given. Found while verifying that an external database integration can
work purely through the MetadataStore interface.

The constructor also accepted a LinkResolver option that was never stored
and a LinkResolver property that nothing read. Resolvers are registered
through openminds.registerLinkResolver and selected per reference from the
registry, so a collection-level resolver has no role. Both are removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ehennestad
ehennestad force-pushed the fix-collection-store-options branch from 4019af2 to 7b511a8 Compare September 1, 2026 20:58
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