Repository navigation
feat(reasoning): OntologyInspect method and inline data triples for ShaclValidate - #48
Closed
Knucklessg1 wants to merge 4 commits into
Closed
Knucklessg1 wants to merge 4 commits into
Knucklessg1 wants to merge 4 commits into
Conversation
Adds a read-only OntologyInspect method that reads named classes, object and
datatype properties, SHACL target classes, triple count and canonical digest
from either inline Turtle documents or the request graph's composed
GraphSchema sources. ShaclValidate gains an optional data_triples field so a
caller with no RDF parser can send plain {subject, predicate, object} triples
instead of a Turtle document; the engine builds the RDF terms itself.
Registers the new method across the policy, access-classification, mutation-
durability and contract-schema inventories the consistency suite checks, and
regenerates the engine contract (method count 456 -> 457) and API docs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The new OntologyInspect wire method (contract/methods.json method_count 456 -> 457) left clients/go/eg_method_codec.wasm and clients/js/eg_method_codec.wasm stale, failing CI's "Go and JavaScript clients" job: scripts/build_method_codec_wasm.py --check reported the committed modules did not cover the new Method variant. Regenerated both copies on the pinned toolchain (wasm32-unknown-unknown) and updated their sha256 pins in .config/generated-artifacts.toml; --check now reports OK for both. cargo run -p eg-capabilities --features "contract canonical-ledger contract-schema" --bin gen_contract -- --check also reports the contract current (56 artifacts match) after merging origin/main. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Member
Author
|
Superseded by PR62, merged as 10f72f13. Checked all 42 changed paths: 10 byte-identical, 18 canonically regenerated artifacts, and 14 preserved source changes with reviewed additions/corrections. OntologyInspect, typed SHACL input, generated senders, fixtures, and API documentation are present. Explicit empty SHACL datasets now remain empty; omitted/null retains fallback. Inspection also enforces parsing budgets and named vocabulary terms. All 13 enabled checks passed, including generated-contract, Python, Rust, client/WASM freshness, scanner, and security checks. Main's complete tree matches the reviewed candidate. The original branch is retained: this is content supersession, not a claim that PR48's head was merged as an ancestor. |
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.
What
OntologyInspect(handler, read classification, typed result, Python client method and generated sender).ShaclValidateacceptsdata_triplesso a caller can validate triples it supplies inline.The related "agent shapes as core catalog sources" work on the source branch is deliberately not included; the one test that depended on it was replaced by a content-agnostic test over the live core catalog.
Requirement
EG-TYPED-PACKS-R098(added by #49): "Ontology inspection method and inline data triples for validation." BothOntologyInspectandShaclValidate.data_triplesin this PR satisfy it.Wire contract
Changed: 456 → 457 methods, one new params field. Contract regenerated with the repository generator;
gen_contract -- --checkreports 56 artifacts current after merging main (twice, through #39 and #49); API docs regenerated and--checkclean. The Go/JavaScript method-codec WASM bundles (clients/go/eg_method_codec.wasm,clients/js/eg_method_codec.wasm) are now regenerated for the new method and their.config/generated-artifacts.tomlsha256 pins updated;scripts/build_method_codec_wasm.py --checkreports OK.Checks run (build host)
cargo check/clippy -D warningsforeg-types,eg-capabilities,epistemic-graph(shacl)cargo test -p epistemic-graph --features shacl --libtargeted (23 passed, incl. the read-classification partition test);--test usecase_kg_lifecyclecargo test -p eg-capabilities --features "contract canonical-ledger contract-schema"(69 passed)pytest tests/test_rdf_client.py tests/test_contract_wave_surface.py(20 passed)scripts/build_method_codec_wasm.py --check(OK, both clients)cargo run -p eg-capabilities --features "contract canonical-ledger contract-schema" --bin gen_contract -- --check(56 artifacts current)CI note on the one Python failure
The previous CI run's single Python failure,
test_unsupported_graph_type_client_raises_before_any_send, failed on thepost-call tenant-list snapshot (
assert calls_after == calls_before), not onthe pre-send
ValueErrorthe test name describes — that guard(
MultiTenantClient.create'sVALID_GRAPH_TYPEScheck) is byte-identical tomain on this branch. The diff showed one extra
pack__<digest>graphappearing between the two reads. That graph is produced by the pre-existing,
fully async connector-pack-projection background worker
(
src/server/connector_pack_projection.rs, unmodified by this PR), racingagainst this test over the one session-scoped live server every test in the
Python suite shares; a pre-existing
pack__...graph is already present inboth snapshots, so this is a timing race between unrelated tests, not a
behavior change in this PR's diff. Re-pushing to confirm.
🤖 Generated with Claude Code