Repository navigation
[Refactor] Architecture, contracts and ergonomics audit (Part 1: Storage, Data & IO) (#643) - #645
Merged
remiceres merged 3 commits intoOct 23, 2026
Conversation
…ing model - Enhance package-info.java files across core.next.storage, api, operations, and impl.memory - Document session threading confinement, COW snapshot lifecycle, and graph matching semantics - Formalize stream closing requirements (try-with-resources) on QueryOperations.find() - Add StatementPattern.of(Statement) factory preserving default and named graph contexts - Add MetadataOperations.findPredicateStatistics(IRI) returning Optional - Add unit tests for StatementPattern.of and MetadataOperations default methods - All NextModuleBoundaryTest pass and 0 SonarLint issues (closes #643 part 1)
…ize data/io contracts - Add static shortcuts in Values for iri, bnode, literal, statement, and triple - Formalize immutability, graph context, and equality contract in Statement interface - Enhance package-info.java documentation across core.next.data and core.next.io - Add comprehensive unit tests in ValuesTest with zero Sonar alerts (compliant S9133) - All architectural boundary checks pass (closes #643 part 2)
|
Test Results 418 files 418 suites 37s ⏱️ Results for commit 72a9edd. ♻️ This comment has been updated with latest results. |
… part 1 - Add missing literal overloads in Values facade (byte, short, float, duration, xml calendar) - Add comprehensive unit tests in ValuesTest - Fix Javadoc HTML tags nesting (doclint compliance) in io and operations - Refine memory storage package documentation on batch ingestion and stream thread-safety
|
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.
Summary
This PR addresses Part 1 of the architecture, Single Responsibility Principle (SRP), and contracts audit on
core.next(#643), focusing on the foundationalstorage,data, andiomodules.Key Changes
1. Ergonomic Facade (
Values.java)Valuesdelegating strictly to the shared defaultValueFactory:Values.iri(...),Values.bnode(...),Values.literal(...)Values.statement(...)andValues.triple(...)2. Formalized Storage SPI & Concurrency Contracts
StorageManager: root instance is thread-safe, whileopenSession()views are strictly confined to a single thread.try-with-resourceslifecycle onQueryOperations.find(): explicitly documented that terminal operations (such asfindAny()orlimit()) do not auto-close the underlying stream, requiring caller closure to release partition snapshots.StatementPattern: absent/empty context array selects all graphs, while explicitnew Resource[] { null }selects only the default graph.StatementPattern.of(Statement)factory avoiding overload ambiguity.MetadataOperations.findPredicateStatistics(IRI)returningOptional<PredicateStatistics>.3. Formalized RDF Statement Contract (
Statement.java)getContext() == null).(subject, predicate, object, context).4. Architecture & Package Documentation
package-info.javaacrossstorage,storage.api,storage.api.operations,storage.impl.memory,data,data.api, andio.Verification & Quality
ValuesTest,StatementPatternTest,MetadataOperationsTest).NextModuleBoundaryTestpass (100% compliant).Closes #643 (Part 1)