fix: expand session MCP wiring + scheduling infinite loop#124
Conversation
… deps Add visited set to BFS algorithm to handle circular dependencies gracefully. Previously, cycles in the dependency graph caused the orchestrator to hang at 100% CPU indefinitely during startup. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace direct-DB feature creation with MCP tool path. The expand session now configures the feature MCP server and allows feature_create_bulk tool calls, matching how AssistantChatSession already works. Removes duplicated _create_features_bulk() method and <features_to_create> regex parsing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR adds circular dependency handling to the BFS-based depth calculation and replaces the REST-based feature creation system with an MCP-based workflow. The first change prevents infinite loops from circular dependencies, while the second refactors feature creation to use MCP server tools instead of in-file parsing logic. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thanks! |
- Fix settings inconsistency in ExpandChatSession: security_settings now uses "bypassPermissions" to match permission_mode parameter - Add comprehensive tests for dependency resolver (12 tests): - Cycle detection in compute_scheduling_scores (critical fix from PR #124) - Self-reference handling - Diamond dependency patterns - would_create_circular_dependency validation - Dependency satisfaction checks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…-mcp-and-scheduling fix: expand session MCP wiring + scheduling infinite loop
- Fix settings inconsistency in ExpandChatSession: security_settings now uses "bypassPermissions" to match permission_mode parameter - Add comprehensive tests for dependency resolver (12 tests): - Cycle detection in compute_scheduling_scores (critical fix from PR AutoForgeAI#124) - Self-reference handling - Diamond dependency patterns - would_create_circular_dependency validation - Dependency satisfaction checks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
fix: wire MCP server into ExpandChatSession for feature creation — The expand session (Web UI "Add Features" flow) was silently failing to create features because it had no MCP servers configured and only allowed
Read/Globtools. The prompt told Claude to callfeature_create_bulkbut the tool was unavailable. This wires the features MCP server intoExpandChatSession(matching howAssistantChatSessionalready works) and removes the duplicated direct-DB_create_features_bulk()method and<features_to_create>regex parsing.fix: prevent infinite loop in compute_scheduling_scores with circular deps —
parallel_orchestrator.pycould hang when computing scheduling scores if features had circular dependencies. Adds a visited set to break cycles.Test plan
python start_ui.py), select a project with 100% features, click "Add Features"feature_create_bulkMCP tool is called and features appear on kanban board🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.