Skip to content

feat(reasoning): OntologyInspect method and inline data triples for ShaclValidate - #48

Closed
Knucklessg1 wants to merge 4 commits into
mainfrom
feat/land-ontology-inspect
Closed

Knucklessg1 wants to merge 4 commits into
mainfrom
feat/land-ontology-inspect

Conversation

@Knucklessg1

@Knucklessg1 Knucklessg1 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

What

  • New wire method OntologyInspect (handler, read classification, typed result, Python client method and generated sender).
  • ShaclValidate accepts data_triples so 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." Both OntologyInspect and ShaclValidate.data_triples in this PR satisfy it.

Wire contract

Changed: 456 → 457 methods, one new params field. Contract regenerated with the repository generator; gen_contract -- --check reports 56 artifacts current after merging main (twice, through #39 and #49); API docs regenerated and --check clean. 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.toml sha256 pins updated; scripts/build_method_codec_wasm.py --check reports OK.

Checks run (build host)

  • cargo check / clippy -D warnings for eg-types, eg-capabilities, epistemic-graph (shacl)
  • cargo test -p epistemic-graph --features shacl --lib targeted (23 passed, incl. the read-classification partition test); --test usecase_kg_lifecycle
  • cargo 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)
  • secret-history, differential clone gate, complexity and duplicate-function stages clean

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 the
post-call tenant-list snapshot (assert calls_after == calls_before), not on
the pre-send ValueError the test name describes — that guard
(MultiTenantClient.create's VALID_GRAPH_TYPES check) is byte-identical to
main on this branch. The diff showed one extra pack__<digest> graph
appearing 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), racing
against this test over the one session-scoped live server every test in the
Python suite shares; a pre-existing pack__... graph is already present in
both 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

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>
Knucklessg1 and others added 3 commits October 2, 2026 03:48
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>
@Knucklessg1

Copy link
Copy Markdown
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.

@Knucklessg1 Knucklessg1 closed this Oct 4, 2026
@Knucklessg1
Knucklessg1 deleted the feat/land-ontology-inspect branch October 6, 2026 14:47
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