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
refactor(api): integrate NodeRegistry with API Server to eliminate hardcoded node list
This commit resolves technical debt from Story 1-2 by refactoring Node Handler
to use NodeRegistry for dynamic node management instead of hardcoded node lists.
Key Changes:
- Server: Initialize NodeRegistry at startup with builtin nodes (checkout, run)
- API Handler: Accept NodeRegistry via dependency injection
- getKnownNodes(): Refactored from hardcoded list to registry.List() dynamic loading
- Router: Pass NodeRegistry instance from Server to NodeHandlers
- Error Handling: Fatal on builtin node registration failure, warn on plugin failures
Testing:
- New test files: server_noderegistry_test.go, node_handler_noderegistry_test.go,
node_handler_getknownnodes_test.go
- Coverage: node_handler.go 81-100%, server.go 90.5%
- All 7 NodeRegistry tests passing
- Backward compatible API response format
Documentation:
- Updated CHANGELOG.md with Changed/Fixed sections
- Marked Story 1-2 technical debt as resolved
- Created tech-debt-1-node-handler-registry.md story documentation
Benefits:
- Adding new nodes no longer requires code changes and redeployment
- Unified node management between Agent and API Server
- Supports future plugin extensibility
Fixes: Technical debt from Story 1-2 (REST API Service Framework)
Related: Story 4-1 (Plugin Manager & NodeRegistry)
Story: tech-debt-1-node-handler-registry
0 commit comments