Class: Coatepec::MCP::FlakyCheckTool
- Inherits:
-
MCP::Tool
- Object
- MCP::Tool
- Coatepec::MCP::FlakyCheckTool
- Defined in:
- lib/coatepec/mcp/tools.rb
Overview
The rails_spec_flaky_check MCP tool: runs targeted RSpec examples
multiple times with independently random seeds and reports which
examples' pass/fail status was inconsistent across rounds. Separate
tool from rails_spec_run for the same reason rails_spec_profile is --
see docs/superpowers/specs/2026-08-13-flaky-spec-detection-design.md.
Class Method Summary collapse
Class Method Details
.call(paths:, server_context:, example: nil, timeout_seconds: 120, runs: 5) ⇒ Object
119 120 121 122 123 124 125 126 127 |
# File 'lib/coatepec/mcp/tools.rb', line 119 def call(paths:, server_context:, example: nil, timeout_seconds: 120, runs: 5) started_at = Process.clock_gettime(Process::CLOCK_MONOTONIC) data = server_context[:worker_manager].check_flaky( paths: paths, example: example, timeout_seconds: timeout_seconds, runs: runs ) Response.ok(data: data, meta: (server_context, started_at)) rescue Coatepec::Error => e Response.error(e) end |