feat(core): add todos tools and CQRS consolidation (#4, #16)#21
Conversation
FEATURE: Todos Management Tools (Issue #4) - Add list_todos tool: filter by state/action/type with pagination - Add manage_todos tool: mark_done, mark_all_done, restore actions FEATURE: CQRS Consolidation (Issue #16) Reduce 18 core tools to 10 by consolidating related operations: - browse_projects: search/list/get projects (was 3 tools) - browse_namespaces: list/get/verify namespaces (was 3 tools) - browse_commits: list/get/diff commits (was 3 tools) - browse_events: user/project events (was 2 tools) - manage_repository: create/fork repos (was 2 tools) FIX: URL encoding in browse_projects - Fix double-encoding bug where spaces became %2B instead of + - URLSearchParams now handles encoding correctly CI: Add semantic-release job permissions - contents:write, issues:write, pull-requests:write, id-token:write TEST: Comprehensive unit tests (1337 passing) - Full coverage for consolidated tools with edge cases - Todos tools tests: filters, pagination, error handling - URL encoding tests: spaces, special characters like +
📊 Test Coverage ReportOverall Coverage: 84.84% Coverage Details
📈 Coverage Report: View detailed coverage report
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Improve tool descriptions to help agents decide WHEN to use each action: - browse_projects: clarify search vs list vs get use cases - browse_namespaces: explain when to verify vs get vs list - browse_commits: describe list/get/diff scenarios - browse_events: distinguish user vs project activity feeds - manage_repository: explain create vs fork purposes - list_todos: describe todo sources and filter options - manage_todos: clarify mark_done vs mark_all_done vs restore Follows CLAUDE.md "Agentic Tool Description Standards" - focus on WHAT and WHEN, not HOW (no implementation details).
There was a problem hiding this comment.
Pull request overview
This PR implements CQRS consolidation reducing 18 core tools to 10, adds 2 new todos management tools (total 12), fixes URL encoding for spaces in project search, and adds CI permissions for semantic-release.
Changes:
- Consolidates 13 read tools into 5 CQRS-style tools (browse_projects, browse_namespaces, browse_commits, browse_events, manage_repository)
- Adds list_todos and manage_todos for GitLab task management
- Fixes space encoding in search queries (prevents double-encoding)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/entities/core/registry.ts | Implements consolidated tool handlers with action-based routing |
| src/entities/core/schema.ts | Adds ManageRepositorySchema and ManageTodosSchema with action discriminators |
| src/entities/core/schema-readonly.ts | Adds 4 consolidated browse schemas; keeps deprecated schemas for compatibility |
| tests/unit/entities/core/registry.test.ts | Updates tests for consolidated tools and new todos features |
| tests/unit/entities/core/handlers.test.ts | Comprehensive handler tests for all actions and edge cases |
| .github/workflows/ci-cd.yml | Adds required permissions for semantic-release job |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addressed review comments: - Improve error messages with format guidance (project_id examples) - Fix URL encoding comment: spaces become '+' not '%20' - Add .int().positive() validation to ManageTodosSchema id field - Document fork_name/fork_path naming rationale (avoids schema conflict) Deferred to future: - Discriminated unions for action-specific validation (significant refactor) - Deprecated schema simplification (needed for backward compatibility)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… feedback TODOS INTEGRATION TESTING: - Add todos helper methods to registry-helper.ts (listTodos, markTodoDone, etc.) - Add Step 6.5 to data-lifecycle.test.ts for todos infrastructure testing - Tests: list pending todos, filter by type, mark_done/restore, mark_all_done COPILOT REVIEW FIXES: - Document fork_name/fork_path rationale (distinct from create's name for schema) - Clarify manage_todos response types in description (object vs success status) - Clarify q vs search parameter distinction in BrowseProjectsSchema - Improve handler code with explicit destructuring per action OAUTH TEST COVERAGE: - Add callback.test.ts for OAuth callback endpoint - Add gitlab-device-flow.test.ts for device flow operations
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add 24 unit tests covering previously untested handlers: - browse_namespaces: list, get, verify actions with all parameters - browse_commits: list, get, diff actions with filters - browse_events: user and project scoped events - get_users: non-smart search path with filters - list_project_members: basic and query filter operations - list_group_iterations: iterations with state/search filters - download_attachment: success, missing content-type, errors - create_branch: branch creation from refs - create_group: full parameter coverage - manage_repository: fork edge cases, namespace resolution - manage_todos: additional error handling paths Coverage improvement for registry.ts: - Statements: 67.84% -> 91.54% (+23.7%) - Branches: 67.49% -> 82.33% (+14.8%) - Lines: 84.12% -> 94.42% (+10.3%)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…-app-token fix(ci): use GitHub App token for semantic-release
Summary
list_todosandmanage_todostools for GitLab todos managementbrowse_projects(spaces were double-encoded as%2B)CQRS Consolidation (Issue #16)
browse_projectsbrowse_namespacesbrowse_commitsbrowse_eventsmanage_repositoryTodos Tools (Issue #4)
list_todos: Filter by state/action/type with paginationmanage_todos: mark_done, mark_all_done, restore actionsTest Plan
yarn lint- 0 errorsyarn build- successfulyarn test:unit- 1337 tests passing+)Closes #4
Closes #16