You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stamp access_tags on relationships (local schema + NodeService) #1217
Relationships need the same Stamped ACL treatment as nodes. Currently the local `relationship` table in `schema.surql` has no `access_tags` field. This means:
Relationships cannot be permission-filtered by LIVE SELECT on the cloud side
When a node's collection changes, its outgoing relationships don't get re-stamped
The cloud and local schemas are out of sync on relationship access control
A relationship inherits `access_tags` from its `in` node (the source) at creation time, and is re-stamped whenever the `in` node's `access_tags` change.
Required Changes
1. `packages/core/src/db/schema.surql`
Add `access_tags` field to the relationship table:
```sql
DEFINE FIELD IF NOT EXISTS access_tags ON TABLE relationship TYPE array DEFAULT [];
```
2. `NodeService::create_relationship`
When creating a relationship, fetch the `in` node's `access_tags` and stamp them onto the relationship record.
3. `NodeService` — re-stamp on access_tags change
When a node's `access_tags` are updated (collection change, migration), find all outgoing relationships where `in = node_id` and update their `access_tags` to match.
4. Cascade delete (already implemented)
`surreal_store.rs` already deletes all relationships where `in = node_id OR out = node_id` atomically when a node is deleted. No change needed here.
Acceptance Criteria
`access_tags` field defined on local `relationship` table
`NodeService::create_relationship` stamps `access_tags` from `in` node
Re-stamping a node's `access_tags` propagates to all outgoing relationships
Activity
malibio commentedon May 28, 2026
Frontend baseline: 4 files failed | 126 passed (pre-existing layout/persistence test failures, unrelated to this issue)
malibio commentedon May 28, 2026
Cancelled — not pursuing Stamped ACL on relationships at this time.