Skip to content

Conversation

@theronic
Copy link
Owner

@theronic theronic commented Dec 3, 2025

No description provided.

theronic and others added 6 commits October 18, 2025 00:01
… entities. I initially avoided this because it pollutes `(d/touch (d/entity db eid))` for user entities, but it avoids additional Relationships entities and solves the composite tuple nil problem (which could also be solved using v6 data structures). Relationship now returns a vector of txes, not just one entity, which complicates fixtures a bit. Retracting relationships currently broken (should remove the tuples). May offer performance improvements by avoiding the additional entities & hops. Tuples also smaller. Some super-user related tests currently failing. Suspect bug in arrow traversal. Also spotted a bug: we're only fetching the first matching Relation, but it's possible to have multiple Relations on the same resource type & relation name, but with different subjects. The fixtures don't contain any, so that needs to be fixed (see issue #47).
The v7 Relationship tuples were encoding both resource-type and subject-type,
but these are redundant since they can be inferred from the Relation reference.

Changes:
- Schema: Simplified tuple structures from 4 elements to 2:
  - Forward: [relation-eid, resource-eid] (was [subject-type, relation-eid, resource-type, resource-eid])
  - Reverse: [relation-eid, subject-eid] (was [resource-type, relation-eid, subject-type, subject-eid])
- Renamed attributes for clarity:
  - :eacl.v7.relationship/subject-type+relation+resource-type+resource -> :eacl.v7.relationship/relation+resource
  - :eacl.v7.relationship/resource-type+relation+subject-type+subject -> :eacl.v7.relationship/relation+subject
- Updated tuple creation in tx-relationship to use simplified structure
- Updated all tuple destructuring in graph traversal functions
- Removed redundant type comparisons in drop-while/take-while predicates

This reduces storage overhead and simplifies the tuple structure while maintaining
all functionality through the Relation reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…use it). this branch is almost certainly broken
@theronic theronic changed the title WIP Feature/cache (don't merge, not ready) WIP v7 Feature/cache (don't merge, not ready) Dec 3, 2025
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.

3 participants