Skip to content

Clean up stale hub-and-spoke references after Universal Graph migration#800

Merged
malibio merged 1 commit into
mainfrom
feature/issue-798-cleanup-spoke-references
Jan 7, 2026
Merged

Clean up stale hub-and-spoke references after Universal Graph migration#800
malibio merged 1 commit into
mainfrom
feature/issue-798-cleanup-spoke-references

Conversation

@malibio

@malibio malibio commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #798

## Summary
- Delete hub_spoke_schema_test.rs (511 lines of obsolete tests)
- Update docstrings and comments across 11 files to remove "spoke" references
- Fix collection_membership_test.rs to use Universal Graph Architecture

## Files Changed
- behaviors/mod.rs: Updated DateNodeBehavior, QueryNodeBehavior, CollectionNodeBehavior docs
- db/surreal_store.rs: Removed stale REMOVED comments, simplified architecture docs
- mcp/handlers/nodes.rs, nodes_test.rs: Removed spoke table references
- models/: Updated core_schemas.rs, mod.rs, schema.rs
- services/node_service.rs: Cleaned up all spoke references in docs and tests
- services/schema_table_manager.rs: Simplified module docs
- tests/collection_membership_test.rs: Migrated test SQL to Universal Graph
- tests/query_service_test.rs: Updated module docs
- Deleted: tests/hub_spoke_schema_test.rs

Closes #798

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@malibio

malibio commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator Author

Code Review Report - PR #800

Review Type: Initial Review

Summary

This PR successfully cleans up stale hub-and-spoke terminology left behind after the Universal Graph Architecture migration (PR #786). The changes are purely documentation/comment updates with one test file deletion - no functional code changes.


Requirements Validation

Acceptance Criterion Status
hub_spoke_schema_test.rs deleted PASS - File deleted (511 lines removed)
All "spoke" references in comments/docstrings updated or removed PASS - Verified via grep: no remaining "spoke" references in src/ or tests/
No mention of "hub-and-spoke" pattern except in archived docs PASS - Verified via grep: no "hub-and-spoke" references in code
Code passes cargo clippy PASS - Clippy runs clean
All tests pass (cargo test) PASS - All targeted module tests pass (behaviors, node_service, surreal_store, collection_membership, query_service). Note: Pre-existing segfault in embedding/AI tests on main branch - not introduced by this PR.

Code Review Findings

Critical Issues

None.

Suggested Improvements

None.

Observations (No Action Required)

1. Consistent Terminology Updates (/packages/core/src/behaviors/mod.rs)
The docstring updates correctly replace hub-and-spoke terminology with Universal Graph Architecture:

// Before:
/// Query nodes use the hybrid hub-and-spoke pattern (similar to TaskNode/SchemaNode):
/// - **Hub (`node.content`)**: Plain text description
/// - **Spoke (`query` table)**: Structured query fields

// After:
/// Query nodes store all data in the unified `node` table (Universal Graph Architecture):
/// - **Content (`node.content`)**: Plain text description
/// - **Properties (`node.properties`)**: Structured query fields

2. Test SQL Updated (/packages/core/tests/collection_membership_test.rs:494-502)
The test SQL was correctly simplified to reflect Universal Graph Architecture - removed separate spoke table creation and moved properties inline:

-- Before:
CREATE task:`{uuid}` CONTENT {
    node: type::thing('node', '{uuid}'),
    status: 'open',
    priority: 'high'
};
CREATE node:`{uuid}` CONTENT {
    node_type: 'task',
    data: type::thing('task', '{uuid}'),
    ...
};

-- After:
CREATE node:`{uuid}` CONTENT {
    node_type: 'task',
    content: 'Task item',
    properties: { status: 'open', priority: 'high' },
    ...
};

3. Comment Simplification Pattern
The changes follow a good pattern of simplification rather than replacement:

  • "No spoke table" comments are removed entirely (not replaced with "no longer has spoke table")
  • Technical explanations now describe what IS rather than what ISN'T
  • Removed redundant "REMOVED:" comments (e.g., line 578 in surreal_store.rs)

Files Changed Summary

File Changes
src/behaviors/mod.rs -22/+17 lines - Updated QueryNode, DateNode, CollectionNode docstrings
src/db/surreal_store.rs -26/+17 lines - Removed spoke terminology from version history and comments
src/mcp/handlers/nodes.rs -4/+2 lines - Updated handler docstrings
src/mcp/handlers/nodes_test.rs -12/+6 lines - Removed spoke comments from tests
src/models/core_schemas.rs -4/+2 lines - Updated collection/query field comments
src/models/mod.rs -2/+1 lines - Updated type conversion comment
src/models/schema.rs -4/+2 lines - Updated relationship documentation
src/services/node_service.rs -69/+42 lines - Major comment cleanup
src/services/schema_table_manager.rs -4/+2 lines - Simplified module doc
tests/collection_membership_test.rs -11/+4 lines - Updated test SQL
tests/hub_spoke_schema_test.rs DELETED - 511 lines removed
tests/query_service_test.rs -2/+1 lines - Updated module doc

Total: 12 files, 56 insertions, 615 deletions


Recommendation

APPROVE

This is a clean technical debt cleanup that:

  1. Removes all stale hub-and-spoke terminology
  2. Deletes obsolete test file that tested patterns no longer in use
  3. Correctly updates test SQL to match Universal Graph Architecture
  4. Passes all quality gates (clippy, targeted tests)

The changes are well-scoped, follow the issue's cleanup guidelines, and improve codebase clarity without any functional impact.

@malibio malibio left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review complete - Recommendation: APPROVE. See detailed review in comments above.

@malibio
malibio merged commit 16262c7 into main Jan 7, 2026
@malibio
malibio deleted the feature/issue-798-cleanup-spoke-references branch January 7, 2026 13:13
malibio added a commit that referenced this pull request Feb 4, 2026
…on (#800)

## Summary
- Delete hub_spoke_schema_test.rs (511 lines of obsolete tests)
- Update docstrings and comments across 11 files to remove "spoke" references
- Fix collection_membership_test.rs to use Universal Graph Architecture

## Files Changed
- behaviors/mod.rs: Updated DateNodeBehavior, QueryNodeBehavior, CollectionNodeBehavior docs
- db/surreal_store.rs: Removed stale REMOVED comments, simplified architecture docs
- mcp/handlers/nodes.rs, nodes_test.rs: Removed spoke table references
- models/: Updated core_schemas.rs, mod.rs, schema.rs
- services/node_service.rs: Cleaned up all spoke references in docs and tests
- services/schema_table_manager.rs: Simplified module docs
- tests/collection_membership_test.rs: Migrated test SQL to Universal Graph
- tests/query_service_test.rs: Updated module docs
- Deleted: tests/hub_spoke_schema_test.rs

Closes #798

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

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
malibio added a commit that referenced this pull request Feb 5, 2026
…on (#800)

## Summary
- Delete hub_spoke_schema_test.rs (511 lines of obsolete tests)
- Update docstrings and comments across 11 files to remove "spoke" references
- Fix collection_membership_test.rs to use Universal Graph Architecture

## Files Changed
- behaviors/mod.rs: Updated DateNodeBehavior, QueryNodeBehavior, CollectionNodeBehavior docs
- db/surreal_store.rs: Removed stale REMOVED comments, simplified architecture docs
- mcp/handlers/nodes.rs, nodes_test.rs: Removed spoke table references
- models/: Updated core_schemas.rs, mod.rs, schema.rs
- services/node_service.rs: Cleaned up all spoke references in docs and tests
- services/schema_table_manager.rs: Simplified module docs
- tests/collection_membership_test.rs: Migrated test SQL to Universal Graph
- tests/query_service_test.rs: Updated module docs
- Deleted: tests/hub_spoke_schema_test.rs

Closes #798

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

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
malibio added a commit that referenced this pull request Feb 26, 2026
…on (#800)

## Summary
- Delete hub_spoke_schema_test.rs (511 lines of obsolete tests)
- Update docstrings and comments across 11 files to remove "spoke" references
- Fix collection_membership_test.rs to use Universal Graph Architecture

## Files Changed
- behaviors/mod.rs: Updated DateNodeBehavior, QueryNodeBehavior, CollectionNodeBehavior docs
- db/surreal_store.rs: Removed stale REMOVED comments, simplified architecture docs
- mcp/handlers/nodes.rs, nodes_test.rs: Removed spoke table references
- models/: Updated core_schemas.rs, mod.rs, schema.rs
- services/node_service.rs: Cleaned up all spoke references in docs and tests
- services/schema_table_manager.rs: Simplified module docs
- tests/collection_membership_test.rs: Migrated test SQL to Universal Graph
- tests/query_service_test.rs: Updated module docs
- Deleted: tests/hub_spoke_schema_test.rs

Closes #798

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

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.

Clean up stale hub-and-spoke references after Universal Graph migration

1 participant