fix(spaces): ingest gen:hasGuest / gen:hasHost member RIs (#114)#116
Merged
Conversation
gen:hasGuest and gen:hasHost were missing from BackcompatRolePredicates, so a single-triple member RI like <space> gen:hasGuest <agent> — auto-typed by the predicate via the registry's single-triple-assertion trick — was not in TRIGGER_TYPES. isSpaceRelevant returned false and extract() dropped the nanopub entirely (not even stored), so guest/host members silently vanished while their sibling predicates (hasObserver, hasAdmin, hasProjectLead, hasTeamMember) worked. Add both as Direction.INVERSE (space-centric, matching hasObserver/hasAdmin). A re-materialization then picks up the existing guest/host role instantiations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 1.14.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
Fixes #114.
Problem
gen:hasGuestandgen:hasHostwere missing fromBackcompatRolePredicates.DIRECTIONS. A member role-instantiation like<space> gen:hasGuest <agent>is a single-triple assertion, so the registry auto-types it with the predicate IRI itself. Since that IRI wasn't inTRIGGER_TYPES,isSpaceRelevant(...)returnedfalseandSpacesExtractor.extract(...)dropped the nanopub entirely (not even stored). Guest/host members silently vanished, while their sibling predicates (hasObserver,hasAdmin,hasProjectLead,hasTeamMember) — all present in the list — worked fine.Fix
Add both predicates as
Direction.INVERSE(space-centric, matchinghasObserver/hasAdmin):A re-materialization then picks up the existing guest/host RIs (e.g. for
https://w3id.org/spaces/TheNanoPub: 6 guests + 1 host). Also added to the backcompat-predicate list indoc/design-space-repositories.md.Verification
extract_backcompatHasGuestAndHost_emitsRoleInstantiation_issue114(mirrors the existing INVERSE backcompat test) confirms both predicates now produce agen:RoleInstantiationwithnpa:inversePropertyand the right space/agent binding.Independent of #113 / #115 (that one is about roles attached to an
owl:sameAsalias); here everything is on the canonical IRI — the predicate was simply unrecognized.🤖 Generated with Claude Code