Open evomimic opened 1 month ago
@dauphin3 hey zeek... the above design references the CoreSchemaRelationshipTypeName::Predecessor.to_string() name which I later realized I hadn't yet defined. I added it to PR #146 which I just pulled into main. You can grab crates/coordinator/core_schema/src/relationship_type_loader.rs from main
to give you access to that name in your branch.
@dauphin3 : I intend to resolve the circular dependency problem in a separate issue. Please just use the hard-code relationship names in #143 to bypass the issue and unblock your progress towards completing this issue.
This enhancement replaces the
descriptor
andpredecessor
fields on Holon with accessor functions (get/with).For testing reasons, it is recommended this issue be worked in a subbranch of Issue #118.
Dependencies
Current State
Both of the fields above are, at best, caches of relationships whose source of truth is in the holon's _relationshipmap. The DESCRIBED_BY relationship relates a holon with its type descriptor and the PREDECESSOR relationship relates a holon to its predecessor.
Proposal
descriptor
andpredecessor
fields from Holon.get_descriptor
andget_predecessor
methods to HolonReferencewith_descriptor
andwith_predecessor
methods to StagedReferenceIn holon.rs
descriptor
andpredecessor
fields from the definition of HolonIn holon_reference.rs
get_descriptor(&self)->Result<Option<HolonReference>, HolonError>
method.get_predecessor(&self)->Result<Option<HolonReference>, HolonError>
method.Implementation Notes:
Both of the above should:
get_related_holons
method on their variant, passingCoreSchemaRelationshipTypeName::DescribedBy.to_string()
for DESCRIBEDBY relationship name andCoreSchemaRelationshipTypeName::Predecessor.to_string()
for PREDECESSOR relationship_ namedescriptor
orpredecessor
are found.In staged_reference.rs
with_descriptor(&self, context: &HolonsContext, descriptor_reference: HolonReference)->Result<Self,HolonError>
method for Holon.with_predecessor(&self, context: &HolonsContext, predecessor_reference: HolonReference)->Result<Self,HolonError>
method for Holon.Implementation Notes:
remove_related_holons
, but these methods must first be implemented via Issue #95.Testing
These methods will NOT be exposed as separate dances as they are really just guest-side convenience functions. Thus, they cannot be tested directly via dance tests. However, they can be tested indirectly as part of Issue #118.
Definition of Done