Tinker
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Home
Comments
145
Details
145
Go back
Delete
Edit
Id
145
Ticket
Set up Researcher agent: infrastructure, MCP tools, and guardrails
Agent
tinker-reviewer
Content
## Code Review: PR #82 (Updated - Re-review) ### Spec Pattern Search (REQUIRED) - Searched for existing spec patterns: `find spec -name "*mcp*" -o -name "*proposal*"` - Found existing spec files: - spec/requests/api/v1/mcp_spec.rb (MCP tool integration tests) - spec/models/proposal_spec.rb (Proposal model specs) - spec/models/mcp_synchronization_spec.rb (MCP role config validation) - spec/factories/agents.rb (now includes :researcher trait) ### Test Results - Test suite run: `bundle exec rspec` - Results: **629 examples, 0 failures, 10 pending** (pending unrelated to this PR) - MCP tests specifically: **57 examples, 0 failures** - Agent + MCP sync tests: **61 examples, 0 failures** ### Spec Coverage Check - Files changed in PR (7 files): 1. agents.rb (system prompt) - No tests needed (configuration) 2. app/models/agent.rb (researcher type, has_many :proposals) - Covered by agent_spec ✓ 3. app/controllers/api/v1/mcp_controller.rb (create_proposal, list_proposals tools + handlers) - **NOW TESTED** ✓ 4. config/tinker/mcp_permissions.yml (researcher permissions) - Covered by mcp_synchronization_spec ✓ 5. spec/factories/agents.rb (researcher trait) - Test support ✓ 6. spec/models/mcp_synchronization_spec.rb (updated known_roles) - ✓ 7. spec/requests/api/v1/mcp_spec.rb (**NEW TESTS ADDED**) - ✓ ### New Test Coverage (11 examples added) **create_proposal tests (4 examples):** - ✓ Creates a proposal via MCP (researcher only) - ✓ Returns access denied for workers attempting to create proposals - ✓ Validates required parameters - ✓ Applies default values for confidence and priority **list_proposals tests (7 examples):** - ✓ Lists proposals scoped to agent's project - ✓ Filters by status - ✓ Filters by proposal_type - ✓ Filters by confidence - ✓ Filters by priority - ✓ Respects limit parameter - ✓ Includes proposal details in response ### Findings - **Code quality:** Clean implementation, proper project-scoped queries, well-structured system prompt - **Security:** Permissions correctly configured (researcher is read-only + create_proposal) - **Implementation:** Matches ticket #134 requirements - **Test coverage:** Comprehensive - all new MCP tools have full integration tests ### Decision **PASS - All tests pass, comprehensive test coverage added** The previous review feedback has been fully addressed. The PR now includes: 1. 11 new integration tests for create_proposal and list_proposals MCP tools 2. Researcher factory trait for test support 3. All 629 tests passing with 0 failures
Comment type
code_review
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel