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
Complete before_sibling_id removal - use has_child edge ordering #614
The codebase has an incomplete migration from before_sibling_id field-based sibling ordering to has_child edge-based ordering. The schema explicitly states ordering should live in edges, but code still references the old field.
Evidence
Schema comment (schema.surql:35):
-- NO beforeSiblingId - structure lives in has_child edges!
No field definition - before_sibling_id is not defined in the SCHEMAFULL node table, but code still writes to it.
Failing tests - Multiple tests fail because they expect before_sibling_id to work:
test_reorder_siblings - expects before_sibling_id to be Some(child1_id) but gets None
test_sibling_chain_ordering
Various markdown/MCP tests that depend on sibling ordering
Affected Code
Key files with before_sibling_id usage:
packages/core/src/db/surreal_store.rs - SurrealNode struct and queries
packages/core/src/services/node_service.rs - reorder_siblings and related functions
Expected Behavior
Sibling ordering should be determined by the order field on has_child edges:
DEFINE FIELD IF NOT EXISTS order ON TABLE has_child TYPE float ASSERT $value != NONE;
Acceptance Criteria
Remove before_sibling_id field from SurrealNode struct
Update all queries that reference before_sibling_id
Implement reorder_siblings using has_child edge order field
Activity
Remove before_sibling_id field - use has_child edge ordering (closes #…
Complete before_sibling_id removal - replace with insert_after API
Remove before_sibling_id field - use has_child edge ordering (closes #…
Remove before_sibling_id field - use has_child edge ordering (closes #…
Remove before_sibling_id field - use has_child edge ordering (closes #…
Complete before_sibling_id removal - use has_child edge ordering (#616)
Update documentation to reflect edge-based sibling ordering
Update documentation to reflect edge-based sibling ordering (#620)
Complete before_sibling_id removal - use has_child edge ordering (#616)
Update documentation to reflect edge-based sibling ordering (#620)
Refactor tree loading to use efficient adjacency list strategy (#632)
Complete before_sibling_id removal - use has_child edge ordering (#616)
Update documentation to reflect edge-based sibling ordering (#620)
Refactor tree loading to use efficient adjacency list strategy (#632)
Complete before_sibling_id removal - use has_child edge ordering (#616)
Update documentation to reflect edge-based sibling ordering (#620)
Refactor tree loading to use efficient adjacency list strategy (#632)
Complete before_sibling_id removal - use has_child edge ordering (#616)
Refactor tree loading to use efficient adjacency list strategy (#632)