Skip to content

642 - SL5b-V1 — Holon space membership - #663

Open
nphias wants to merge 1 commit into
mainfrom
661-sub-issue-storage-sl5b-v1
Open

642 - SL5b-V1 — Holon space membership#663
nphias wants to merge 1 commit into
mainfrom
661-sub-issue-storage-sl5b-v1

Conversation

@nphias

@nphias nphias commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Every published lineage acquires OwnedBy → current HolonSpace; commit materializes the Owns
inverse on the space. Membership is queryable by ordinary traversal. GetAllHolons is untouched
— it still reads AllHolonNodes. No consumer-visible behavior change.

Changes

File Change
commit_functions.rs stage_space_membership, called from commit_holon's ForCreate arm after persist_holon so the new lineage's id is available to the self-ownership guard. Warns rather than skipping silently when no space is bound.
staged.rs RelationshipCommitScope::FullExceptMembership + setter, so a version-producing commit doesn't re-anchor membership; OwnedBy ordered first under Full so a failing user relationship can't preempt it.
inverse_resolution.rs OwnedBy → Owns short-circuit. resolve_inverse goes through the source's DescribedBy, which undescribed holons and the first core-schema load don't have.
guest_holon_service.rs retract_space_membership on delete. Reader left on AllHolonNodes — the repoint is V2.
execution_reference.rs assert_saved_content_eq treats OwnedBy as infrastructure-supplied, not fixture-authored.
harness (test_steps, adders, dance_tests, 2 new files) VerifySpaceMembership step + executor + space_membership_fixture.

Tests

space_membership_fixture asserts create, independent clone, and delete — exact member keys, both
directions (Owns on the space, OwnedBy back to it). Confirmed to fail with the stamp disabled.

Full npm run sweetest exit 0: 63 tests, 0 failed, 2 ignored, audit passed. holons_core 315.
All three workspace checks clean.

Self-containment check passes: zero churn in the count fixtures, constants.rs, or any
contract/SDK/TDL doc. All of that is V2.

Three notes

  1. Version leg deferred. Staging a new version stages Predecessor, whose inverse resolves
    through DescribedBy — so version-producing commits need a described holon, and this fixture
    is deliberately schema-free. add_verify_space_membership_count_step exists for schema-backed
    fixtures; wiring it into stage_new_version_fixture would close this. The staged.rs unit test
    covers the mechanism meanwhile.

  2. Two pre-existing bugs found, not caused by V1. related_holons(Owns) on the space returns
    empty even when the link exists (inverse name, anchor has no DescribedBy); all_related_holons()
    finds it. And GetAllHolons errors after a delete, because the index still lists the deleted
    holon — the same limitation that had delete_holon_fixture's assertion commented out. V2 fixes
    the second by construction. The executor sidesteps both by deriving the space from a member's
    OwnedBy.

Open

The Owns fan-in cost is still unmeasured — every inverse link is based on the space holon, and
put_smartlink scans that base, so a 191-holon schema load is ~O(n²) tag decodes. Belongs to V1
since this is where the writes are introduced. Baseline by checking out the parent commit, not by
stashing.

@nphias nphias linked an issue Aug 26, 2026 that may be closed by this pull request
@nphias
nphias marked this pull request as ready for review August 26, 2026 16:20
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.

[sub issue] Storage SL5b-V1 — Holon space membership

1 participant