mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
* fix(ontology): preserve #-terminated namespaces in SHACLGenerator base_uri (#1082) SHACLGenerator.__init__ normalized base_uri with rstrip('/') + '/', turning a #-terminated RDF namespace (e.g. http://example.org/manufacturing#) into ...#/. Every generated URI then landed in a different namespace than the instance data, so SHACL validation silently passed because the shapes targeted nothing. __init__ now preserves a base_uri already ending in '/' or '#', matching the #-aware normalization generate() already applies. shapes_uri inherits the fix. Adds test_hash_namespace_base_uri_is_not_mangled (fails on the old normalization), plus a CHANGELOG entry. Full ontology suite green. Co-Authored-By: Claude <noreply@anthropic.com> * fix(ontology): collapse slash runs, only preserve #-terminated base_uri Qodo review caught that preserving any endswith('/') base left redundant trailing slashes (e.g. .../ns////) intact, leaking a different namespace into emitted IRIs. Now only '#'-terminated bases are kept verbatim; slash runs are collapsed to a single '/', matching generate() normalization. Adds test_slash_run_normalization_regression. --------- Co-authored-by: changshenhan <217217832+changshenhan@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>