evomimic / map-holons

3 stars 1 forks source link

79 implement abandonstagedchanges dance #92

Closed dauphin3 closed 1 month ago

evomimic commented 1 month ago

I've completed the rewrite and am running tests... ran into an interesting problem that will require more thought: H1 has AUTHORED_BY relationship to H2 and H3. when H2 was abandoned, it was not removed from H1's relationship_map. (There is no way for H2 to know that it is referenced in some other staged_holon's relationship_map)

So on the second commit pass (committing relationships), H1 gets an error trying to commit its relationship to H2.

evomimic commented 1 month ago

In response to problem noted above, I re-designed the commit processing for relationships... to skip trying to create smartlinks for target references for which a HolonId is not available (e.g., because a StagedReference was Abandoned rather than Saved). This involved replacing HolonReference's commit_smartlink method with a get_id method and then having StagedCollection's add_smartlinks_for_collection method iterate through its vector of HolonReferences and create a smartlink to it ONLY if it has a holon_id.