Pattern Engine

How BugOracle's Pattern Engine provides instant fixes for common errors.


Pattern Engine

BugOracle's Pattern Engine is a high-performance, rule-based system that identifies common error patterns instantly—before we even call an LLM.

How It Works

  1. Normalization: Incoming errors are standardized (stack trace parsing, message extraction).
  2. Matching: The normalized error is compared against 100+ seed patterns.
  3. Scoring: Each pattern match receives a confidence score (0-100%).
  4. Fast Path: If score > 90%, we return the fix immediately. No AI needed.

Supported Patterns

| Category | Examples | | ----------------- | --------------------------------------------------- | | Network | ECONNREFUSED, 504 Gateway Timeout, CORS Error | | React/Next.js | Hydration Mismatch, Objects not valid as child | | Database | Unique constraint violation, Connection timeout | | Auth | JWT malformed, 401 Unauthorized | | Build | Module not found, Cannot find module |

Adding Custom Patterns

Enterprise users can define custom patterns specific to their stack:

{
  "code": "CUSTOM_001",
  "name": "My Custom Error",
  "regex": "MyAppError: .+",
  "language": "typescript",
  "baseRunbook": ["Check the MyApp config file", "Restart the service"]
}

Contact support to enable custom patterns for your workspace.

API Integration

Pattern matching is automatically applied to:

  • /api/analyze (manual analysis)
  • /api/v1/ingest (SDK errors)

The response includes patternCode and patternScore if a match is found.