Skip to content

Feat/adopt reasoner v066#30

Merged
ThHanke merged 17 commits into
mainfrom
feat/adopt-reasoner-v066
Jul 22, 2026
Merged

Feat/adopt reasoner v066#30
ThHanke merged 17 commits into
mainfrom
feat/adopt-reasoner-v066

Conversation

@ThHanke

@ThHanke ThHanke commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Adopt rdf-reasoner-konclude v0.6.8, bump to v1.7.0

Summary

  • Upgrade rdf-reasoner-konclude from v0.3.2 (patched) to v0.6.8
  • Rename KoncludeReasoner → DlReasoner, simplify to thin pass-throughs
  • Delete 11,000+ lines of hand-rolled reasoning code now handled by the library (EL reasoner, entailment probe, laconic justification, locality module)
  • Enable incremental reasoning: pass sharedStore directly to reasoner (no per-run copy), use returnDelta API for change tracking
  • Enable explanation named graphs: justifications stored as RDF in store, queryable via getQuads()
  • Fix justification tooltips: all inferred types now show causal justifications (domain/range, sameAs propagation, someValuesFrom, hasValue, etc.)
  • Fix Windows CI: patch-package fix for NodeWorkerShim path resolution (fileURLToPath)
  • Rewrite EntailmentExplanation tooltip (portal-based, prefix-aware)

Thomas Hanke added 17 commits July 17, 2026 11:17
Remove locality-based module extraction (⊤⊥*-modules), EL fast-path
classifier, incremental baseline tracking, and extractModule MCP tool.
Auto-reasoning in ReactodiaCanvas now uses full reasoning path.
These capabilities will be provided by the rdf-reasoner-konclude package.

Removed ~8,150 lines across 20 files:
- src/workers/localityModule.ts (1,449 lines)
- src/workers/elReasoner.ts (859 lines)
- Incremental orchestration in rdfManager.runtime.ts (~1,200 lines)
- extractModule from worker protocol, impl, MCP tools, manifest
- 9 test files covering removed functionality
…PI migration

Delete profile/expressivity detection (owlProfile.ts, 530 lines + 382-line
test) — will be replaced by reasoner API detectProfiles() with per-named-graph
EL/QL/RL/DL classification. The profile field in DiagnosticsData is now
optional and no longer populated.

Add TODO(rdf-reasoner-konclude) annotations at all integration points that
will change when plan-050 API additions land:
- entailmentProbe.ts → reasoner explainEntailment() (Unit 2-3)
- laconicJustification.ts → reasoner explainInconsistencyLaconic() (Unit 4-5)
- KoncludeReasonerLike interface → replaced by RdfReasoner with workerUrl (Unit 1)
- computeRepairs.ts → reasoner repair API (deferred scope)
- axiomWeakening.ts → reasoner weakening API (deferred scope)
…er with package API

Replace ~800-line KoncludeReasoner (manual Worker RPC, BlackBox/HSDAG,
entailment probe, laconic post-processing) with ~130-line thin adapter
wrapping the package's RdfReasoner. Delete entailmentProbe.ts,
laconicJustification.ts and their tests — now internal to the package.
Wire explainEntailment() and explainInconsistencyLaconic() through the
adapter with de-skolemization and graph filtering preserved. Net -2735 lines.
Profile detection is ontosphere-local, not a reasoner concern. Restore
owlProfile.ts + test (530+382 lines), re-wire checkOwl2Profile and
detectOwl2Profiles into the reasoning diagnostics tool, make
DiagnosticsData.profile required again.
Upgrade to v0.4.2 which ships fully patched konclude.mjs (pthread pool,
Vite-safe Worker constructor). Update workerUrl construction to use
URL object for reliable resolution in nested Worker contexts.
…fix, blank node fix, caching

- Replace popover with native tooltip (title attr) — fixes clipping on collapsed nodes
- Trigger on hover (mouseEnter) instead of click
- Use PrefixContext + prefixShorten instead of toPrefixed for correct IRI shortening
- Fix blank node serialization in worker (prepend _: for BlankNode termType)
- Add worker-level entailment cache (cleared on reasoner reset)
- Remove debug timing console.debug
Use native dep-chain cache for O(1) entailment explanations instead of
BlackBox algorithm. Pass nativeOnly: true to skip BlackBox fallback that
reloads WASM and hangs browser. Rewrite EntailmentExplanation with portal
tooltip that escapes SVG foreignObject clipping.
…ughs

Replace multi-step store manipulation with thin delegations to
rdf-reasoner-konclude. Merge checkConsistency + getUnsatisfiableClasses
into validate(). Delete _deskolemize, _buildReasoningStore, and the
EXCLUDED_FROM_REASONING constants. Update worker protocol, impl, MCP
tool, and RepairSuggestions component.
Dead code — createNodeKoncludeReasoner had zero import sites. The
adapter duplicated de-skolemization and graph filtering logic now
removed from the production DlReasoner class.
Build a set of asserted S/P/O keys before the inferred-quad copy loop
and skip inferred quads that match. Prevents amber "inferred" styling
on asserted types like alice rdf:type Employee.

Add regression test exercising the dedup logic.
Component: .catch() now sets error text instead of silently swallowing.
Tests: query portal tooltip div instead of removed title attribute,
update assertion wording to match current formatResult output.
Switch from local file: dep to npm ^0.6.3 which wires inferredGraph
through all internal methods — fixes justification gap where Dave's
inferred Manager type showed "no justification available" because
entailment checks used wrong graph IRI.
Upgrade from v0.6.3 to v0.6.6 — adds sameAs type propagation
justification synthesis and fixes hasTripleJustification WASM binding.
Remove console.debug messages from EntailmentExplanation tooltip.
…asoning

- Bump rdf-reasoner-konclude from v0.6.6 to v0.6.8
- Pass sharedStore directly to reasoner instead of copy-per-run,
  enabling incremental reasoning with persistent caches
- Use returnDelta + explanations options from materialize() API,
  removing manual inferred-quad clear/copy-back pipeline
- Add patch-package patch for Windows CI path fix (fileURLToPath)
- Remove EXCLUDED_FROM_REASONING_WORKING_COPY filtering
@ThHanke
ThHanke merged commit 7d0ec90 into main Jul 22, 2026
4 checks passed
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