feat: Beads issue integration for workspace creation#47
Open
feat: Beads issue integration for workspace creation#47
Conversation
Implements data model, beads module, and service layer changes for workspace creation from beads issues. Changes: - Bump metadata schema to v4 with issue_id field (backward compatible) - Create beads infrastructure module for bd command integration - Add workspace_name parameter to support custom workspace names - Add create_from_issue() wrapper for issue-based workspace creation - Update WorkspaceInfo to include issue_id field - Add comprehensive tests for beads module (84% coverage) Completed tasks: - agentspaces-1io.1: Data model with issue_id field - agentspaces-1io.2: Beads infrastructure module - agentspaces-1io.4: Service layer integration - agentspaces-1io.5: Custom workspace names support Related: agentspaces-1io
…e 3) Implements user-facing commands for creating workspaces from Beads issues. Changes: - Add --next-issue and --issue-id flags to workspace create command - Add mutual exclusivity validation (attach/next-issue/issue-id) - Add issue-specific formatters with rich panels - Display copyable claude command with issue context - Comprehensive error handling for all beads operations Completed tasks: - agentspaces-1io.3: CLI flags for issue-based creation - agentspaces-1io.7: Issue-specific output formatters Related: agentspaces-1io
Updates TUI to display and use the issue_id field while maintaining backward compatibility with workspaces that only have purpose. Changes: Display issue_id in workspace details, update navigation commands to prefer issue_id field, update tab title to use issue_id field, maintain backward compatibility. Completed: agentspaces-1io.6
Comprehensive integration tests for agentspaces-1io.8: - 12 test cases covering create_from_issue() functionality - Tests for issue_id persistence in metadata v4 - Tests for custom workspace names - Tests for schema v4 round-trip and v3 backward compatibility - Tests for duplicate workspace rejection - Uses realistic beads issue ID format (agentspaces-1a2b) - Adds assertions on git mock calls for verification All tests pass. Coverage: 85.27% (above 80% target).
Fix 5 SIM117 linting violations by combining nested with statements into single with blocks. This improves code readability and follows Python best practices for context manager usage. Changes: - Combine pytest.raises() with patch() context managers - Apply to all error test cases in test_beads.py - All tests still passing (14/14) Quality: ruff check passes with no issues.
Code reviewFound 1 issue that should be addressed: Exit code inconsistency in workspace.pyLocation: Issue: When no ready issues are found with Current code: if not issues:
print_error("No ready issues found. Create with: bd create")
raise typer.Exit(0) # Should be Exit(1)Why this is a bug:
Fix: if not issues:
print_error("No ready issues found. Create with: bd create")
raise typer.Exit(1) # Error condition should use exit code 1Reference: See other error handlers in the same file at lines 100, 107, 139, 142, 162, etc. which all use Otherwise, the code looks good! The implementation follows CLAUDE.md conventions:
|
Fix exit code inconsistency in workspace.py line 115. When no ready issues are found with --next-issue flag, the command now correctly exits with code 1 (error) instead of 0 (success). This ensures consistent error handling across the CLI and prevents scripts/CI from incorrectly interpreting the failure as success. Addresses code review feedback from PR #47.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements beads issue tracker integration with agentspaces workspace creation, enabling users to create workspaces directly from issue IDs.
Changes
issue_idfield to workspace metadata (schema v3→v4)create_from_issue()service method--next-issueand--issue-idCommands
Test Results
Backward Compatibility