Class: FailureTriage

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/maquina/solid_errors/templates/app/agents/failure_triage.rb

Overview

Single read-only entry point the agent tooling (bin/failures and the MCP server) calls into. Keeping the surface here means bin/ and MCP stay thin and always return the same shapes.

Read-only by design: nothing here mutates the errors or queue databases.

Class Method Summary collapse

Class Method Details

.exception(fingerprint) ⇒ Object



14
15
16
# File 'lib/generators/maquina/solid_errors/templates/app/agents/failure_triage.rb', line 14

def self.exception(fingerprint)
  ErrorsQuery.find(fingerprint)
end

.overview(limit: ErrorsQuery::DEFAULT_LIMIT) ⇒ Object



7
8
9
10
11
12
# File 'lib/generators/maquina/solid_errors/templates/app/agents/failure_triage.rb', line 7

def self.overview(limit: ErrorsQuery::DEFAULT_LIMIT)
  {
    exceptions: ErrorsQuery.unresolved(limit: limit),
    generated_at: Time.current
  }
end

.top(limit: ErrorsQuery::TOP_LIMIT) ⇒ Object



18
19
20
# File 'lib/generators/maquina/solid_errors/templates/app/agents/failure_triage.rb', line 18

def self.top(limit: ErrorsQuery::TOP_LIMIT)
  {top_exceptions: ErrorsQuery.top(limit: limit)}
end