Getting Started

Connect Resolue to your stack in under 5 minutes. By the end of this guide, Resolue will be watching your production and ready to auto-resolve incidents.

Prerequisites

  • A GitHub repository with your application code
  • A deploy platform with preview deployments (Vercel, Cloudflare Pages, Netlify, etc.)
  • An error tracking tool (Sentry, Datadog, CloudWatch, etc.)
  • Node.js 18+ for the auth middleware

Setup

Install the Resolue GitHub App

Go to github.com/apps/resolue-ai and install the app on your organization. Select the repositories you want Resolue to monitor and fix.

# Resolue gets:
# ✓ Read access to code (for diagnosis)
# ✓ Write access to PRs (to open fix PRs)
# ✓ Read access to deployments (to detect previews)
Connect your deploy platform

In the Resolue dashboard, connect your deploy platform. Resolue detects preview deployments automatically to verify fixes on live URLs.

Supported: Vercel (Log Drain + preview deploys), Cloudflare Pages (coming soon), Netlify (coming soon).

Connect your error tracking

Connect your error tracking tool. Resolue configures webhooks to receive production errors in real-time.

Supported: Sentry (issue.created + regression.detected), Datadog (coming soon), CloudWatch (coming soon).

Set up Preview Auth

Install the @resolue/auth middleware so Resolue can test authenticated routes on preview deployments. See the Preview Auth guide.

npm install @resolue/auth
Add resolue.yaml (optional)

Create a resolue.yaml in your repo root to configure confidence thresholds, ignored paths, and auto-merge rules. See the Configuration guide.

That's it. Resolue is now watching your production. When a real user hits an error, Resolue will diagnose root cause, generate a fix, verify it on a live preview, and open a PR with video proof.

What happens next

When a production incident is detected, Resolue follows this pipeline:

  1. Signal ingestion — Error signals arrive from your monitoring stack (Sentry, Vercel, Datadog, etc.). Resolue deduplicates and triages.
  2. Signal correlation — Multiple signals (backend error + frontend fetch failure + log spike) are correlated to a single root cause.
  3. Diagnosis — AI analyzes stack traces, breadcrumbs, recent commits, and code context to identify the exact file, function, and introducing commit.
  4. Fix generation — A minimal patch is generated. Pushed to a branch. Your platform builds a preview deployment.
  5. Verification — Automated tests run against the live preview. Tests pass. Video recorded. Before/after screenshots captured. BDD regression tests generated.
  6. PR with proof — A full evidence PR is opened: root cause analysis, code diff, video, screenshots, regression tests, and confidence score.

You review. You merge. Resolue never auto-merges.

Verification infrastructure

Resolue verifies every fix on a live preview deployment before opening a PR. It runs automated browser tests in isolated cloud environments — you don't need to install or configure anything.

Three tiers of verification:

  1. Tier 1 — Zero-config smoke checks (always runs): Preview loads without errors, no console errors matching the original bug, key page elements are present.
  2. Tier 2 — Your existing tests (auto-detected): If your repo has end-to-end tests, Resolue discovers and runs your full suite against the preview automatically.
  3. Tier 3 — Generated regression tests (auto-generated): For every fix, Resolue generates tests covering the error case, a dependency failure, and the happy path. Committed alongside the fix.
Already have e2e tests? Resolue will find and run them automatically. Don't have tests? Resolue's smoke checks and generated regression tests still provide full verification coverage.

AI Configuration

Choose which AI model powers Resolue's diagnosis and fix generation. Bring your own API key, or use a self-hosted model for full data sovereignty.

Supported Models

ProviderModelMethodBest for
Anthropicclaude-sonnet-4API keyDefault — best fix accuracy
Anthropicclaude-opus-4API keyComplex multi-file fixes
OpenAIgpt-4oAPI keyFast, good for simple fixes
OpenAIo3API keyDeep reasoning for hard bugs
AWS BedrockClaude via BedrockIAM roleEnterprise / AWS-native
Azure OpenAIGPT-4o via AzureAzure ADEnterprise / Azure-native
Self-hostedLlama 3, Mistral, etc.OTLP endpointAir-gapped / full sovereignty

Configuration

Set the AI provider in your resolue.yaml:

# resolue.yaml — this file is committed to your repo!
ai:
  provider: anthropic       # anthropic | openai | bedrock | azure | custom
  model: claude-sonnet-4    # Model identifier
  api_key_env: RESOLUE_AI_KEY # ← name of the env var, NOT the key itself
resolue.yaml is committed to your repo. Never put secrets in it.

api_key_env stores the name of the environment variable (e.g. RESOLUE_AI_KEY), not the actual key. The real key lives in your platform's secret storage (Vercel Env Vars, Cloudflare Secrets, GitHub Secrets, AWS SSM).

✕ Wrong: api_key: sk-ant-api03-abc123...
✓ Right: api_key_env: RESOLUE_AI_KEY

Bring Your Own Key (BYOK)

For SaaS users, you can use Resolue's default model allocation or bring your own API key for any supported provider:

Get your API key

From Anthropic Console, OpenAI Dashboard, or your provider's portal.

Add to your environment
# Vercel
vercel env add RESOLUE_AI_KEY preview production
# Cloudflare Pages
wrangler pages secret put RESOLUE_AI_KEY
# Or add directly in your platform's dashboard
Reference in resolue.yaml
ai:
  api_key_env: RESOLUE_AI_KEY

Self-Hosted LLM

For organizations that cannot send code to external APIs, Resolue supports connecting to a self-hosted model via an OpenAI-compatible endpoint:

# resolue.yaml
ai:
  provider: custom
  endpoint: https://llm.internal.company.com/v1
  model: llama-3.1-70b
  api_key_env: INTERNAL_LLM_KEY
  timeout: 120  # seconds — larger models may need more time
OpenAI-compatible API required. Your endpoint must support the /v1/chat/completions format. Most self-hosted solutions (vLLM, Ollama, text-generation-inference) support this out of the box.

Model Selection Strategy

Resolue can use different models for different stages of the pipeline:

ai:
  diagnosis:
    model: claude-opus-4      # Deep reasoning for root cause
  fix_generation:
    model: claude-sonnet-4    # Fast, accurate patches
  confidence_scoring:
    model: claude-sonnet-4    # Evaluate fix quality

Preview Auth

Set up @resolue/auth to let Resolue test authenticated routes on preview deployments — securely, without real user credentials.

Why this is needed

When Resolue deploys a fix to a preview URL and runs Playwright tests, it needs to reach the authenticated pages where the bug lives — checkout flows, dashboards, admin panels. Without auth bypass, Playwright hits the login screen and can't verify the fix.

Resolue never sees your real credentials. The middleware validates a cryptographically signed token and injects a synthetic test user. Your passwords, JWTs, and OAuth tokens are never accessed.

Installation

npm install @resolue/auth

Setup

Add your Resolue secret to preview only
# Vercel
vercel env add RESOLUE_SECRET preview
# Cloudflare Pages
wrangler pages secret put RESOLUE_SECRET
# Netlify
netlify env:set RESOLUE_SECRET --context deploy-preview
# Paste the secret from your Resolue dashboard
Never set RESOLUE_SECRET in production. The middleware is a hardcoded no-op in production regardless, but defense-in-depth means not having the secret there at all.
Add the middleware
Next.js
Express
Node.js
// middleware.ts
import { resolueAuth } from '@resolue/auth/next';

// Standalone:
export default resolueAuth();

// Or wrap your existing auth (Clerk, NextAuth, etc):
import { authMiddleware } from '@clerk/nextjs';
export default resolueAuth(authMiddleware());
import { resolueAuth } from '@resolue/auth/express';

// Add BEFORE your auth middleware
app.use(resolueAuth());
app.use(passport.authenticate('session'));
import { checkResolue } from '@resolue/auth/node';

const resolue = checkResolue(req);
if (resolue.isVerification) {
  req.user = resolue.testUser;
}
(Optional) Customize the test user
resolueAuth({
  testUser: {
    id: 'resolue-verify',
    email: 'verify@yourcompany.com',
    role: 'user',          // Use minimum required role
    orgId: 'test-org-123',
  }
});

Security Layers

Five independent safety layers protect against unauthorized access:

LayerProtectionWhat it blocks
1. Environment gateHardcoded production checkMiddleware is no-op in production
2. HMAC-SHA256Signed token validationForged headers without the secret
3. Token expiry5-minute TTLReplay attacks with intercepted tokens
4. No real credentialsSynthetic test user onlyCredential theft (nothing to steal)
5. Secret rotationInstant invalidationCompromised secrets

Secret Rotation

If you need to rotate the shared secret:

  1. Generate a new secret in the Resolue dashboard
  2. Update the RESOLUE_SECRET env var on your preview deployment
  3. All old tokens fail validation immediately — no downtime, no redeployment

Error Replay

How Resolue reproduces the exact failure conditions from production — even when the preview environment's APIs work fine.

The Problem

A user hits a checkout error because Stripe returns a 500. Resolue generates a fix and deploys it to a preview. But on the preview, Stripe works fine — so the Playwright test passes without actually proving the fix handles the failure. The video shows a happy path, not a verified fix.

This happens with: external API failures (Stripe, geocoding, payment), database state issues (out of stock, duplicate records), race conditions, third-party timeouts, and edge cases triggered by specific user data.

Resolue solves this with Error Context Replay. Instead of hoping the preview reproduces the same conditions, Resolue captures the exact failure context from production and replays it during verification — mocking the failing APIs and injecting the edge case data.

How It Works

Resolue captures the error context

From Sentry breadcrumbs and OTel traces, Resolue extracts: the failing request payload, the API response that triggered the error, the sequence of HTTP calls leading to the failure, and the user's state at the time.

Context is sent to the preview via signed headers

During verification, Resolue sends two additional signed headers alongside the auth token:

  • X-Resolue-Context — the full error context (failing request, breadcrumbs, stack trace)
  • X-Resolue-Fixtures — API mocks and test data to replay the failure

Both headers are HMAC-SHA256 signed with the same shared secret. The middleware validates them before using the data.

Failing APIs are mocked at two levels

Browser-level: For client-side API calls, Resolue intercepts outbound requests and returns the mocked failure response automatically. Zero app-side code needed.

Server-level: For server-side API calls (API routes, SSR), the @resolue/auth middleware intercepts outbound requests during the verification lifecycle. Your API route calls fetch('https://api.stripe.com/charge') and gets back the same 500 that production saw.

The fix is verified against real failure conditions

The verification exercises the exact code path that broke: the same request body, the same failing API response, the same edge case. The video shows the fix actually handling the error — not a happy path.

Setup: Browser-Level Mocking

This works automatically — no app-side code needed. Resolue sets up request interceptors before navigating to your preview.

Zero setup for browser-side errors. If the failing API call happens from the browser (fetch in a React component, client-side API call), Resolue handles mocking automatically. You don't need to change anything in your app.

Setup: Server-Level Mocking

For errors in API routes, server components, or SSR — where the failing fetch() runs on the server — you need to enable the fetch interceptor:

Enable fetch patching in your app
// instrumentation.ts (Next.js) or app initialization
import { patchFetch } from '@resolue/auth/replay';

// Only patch on preview environments
if (process.env.RESOLUE_SECRET) {
  patchFetch();
}

This patches globalThis.fetch once. It's a no-op when there are no active Resolue mocks — zero performance impact on normal requests.

The middleware handles the rest

When @resolue/auth detects a verification request with fixtures, it automatically activates the mocks. When the request completes, mocks are cleared. Your API routes don't need any changes.

What Gets Mocked

Resolue builds fixtures automatically from the error context:

Error sourceWhat Resolue mocksExample
External API failureReturns the same error responseStripe returns 500 → mock returns 500
API timeoutAdds artificial delayPayment API took 30s → mock delays 30s
Connection refusedReturns network errorInventory service down → mock returns 503
Edge case dataSeeds the test user stateCart with 0-quantity item → test user gets same cart
Specific request bodyReplays the original requestPOST /checkout with exact payload that failed

Fixtures Format

// What Resolue sends in X-Resolue-Fixtures
{
  "apiMocks": [
    {
      "pattern": "https://api.stripe.com/v1/charges**",
      "method": "POST",
      "response": {
        "status": 500,
        "body": { "error": { "type": "api_error", "message": "Internal server error" } },
        "delay_ms": 0
      }
    }
  ],
  "replayRequest": {
    "method": "POST",
    "path": "/api/checkout",
    "body": { "cartId": "cart_abc", "userId": "usr_123" }
  },
  "userStateSeed": {
    "cartItems": 3,
    "accountAge": "returning"
  }
}

resolue.yaml Configuration

# resolue.yaml
verify:
  replay:
    enabled: true
    mock_external_apis: true      # Mock failing external APIs
    replay_request_body: true    # Use the original failing request
    seed_user_state: true        # Inject user state from error context
    mock_timeout_ms: 30000       # Max delay for timeout mocks

Security

The context and fixtures headers use the same security model as the auth token:

  • HMAC-SHA256 signed with the same shared secret — cannot be forged
  • Only parsed on preview environments — production ignores them
  • Fixtures never contain real credentials — only request shapes and mock responses
  • Mocks are scoped to the verification request — cleared immediately after
The fetch patch is global. On preview environments, patchFetch() wraps globalThis.fetch. It only intercepts requests when Resolue mocks are active (during verification). For all other requests, it passes through to the original fetch with zero overhead. If you're uncomfortable with a global patch, use browser-level mocking only (no app-side code needed).

Supported Errors

Resolue is best at single-file bugs in TypeScript and JavaScript applications. Here's what it can fix today and what's coming next.

What Resolue Fixes Today

These error types have the highest fix rate and confidence scores:

Error TypeExamplesTypical Confidence
Null/undefined accessCannot read property 'id' of null, missing optional chaining90–98%
Unhandled exceptionsMissing try/catch, unhandled promise rejections, uncaught async errors85–95%
API error handlingNo error response for 500s, missing timeout handling, unhandled fetch failures80–92%
Type mismatchesWrong argument types, missing required fields, runtime schema failures85–95%
Missing env varsUndefined environment variables in serverless, edge function crashes90–98%
Import/export errorsBroken imports, missing default exports, circular dependencies88–96%

What makes these fixable?

  • Single file — the root cause and the fix are in one file
  • Clear stack trace — Sentry points to the exact line
  • Pattern-based — these are well-known error patterns with well-known fixes
  • Small diff — typically 1–10 lines changed

Coming Soon

These error types are on the roadmap. Resolue can currently diagnose them but may not generate a verified fix:

Error TypeChallengeCurrent Behavior
Multi-file logic bugsFix spans 2+ files with cross-module dependenciesDiagnostic report + root cause
Database/state bugsCaused by data state, not code — requires environment seedingDiagnostic report + suggested query
Race conditionsTiming-dependent, hard to reproduce deterministicallyDiagnostic report + concurrency analysis
Infrastructure errorsDNS, networking, memory — outside code scopeClassified as infra, routed to ops
Third-party SDK bugsBug is in a dependency, not your codeIdentifies the dependency + suggests workaround
Even when Resolue can't fix it, you get value. Every error gets at minimum: root cause analysis, affected files, related commits, user impact data, and a suggested approach. Your team starts from diagnosis, not triage.

Language & Framework Support

StackSupport Level
Next.js + TypeScriptFull — primary target
React + ViteFull
Node.js + ExpressFull
Remix / SvelteKitPartial — verification works, fix generation improving
Python / Go / JavaRoadmap — diagnosis works, fix generation coming

When Resolue Can't Fix It

Not every production error gets a fix PR. Here's what happens at each confidence level — and why even "failures" deliver value.

Confidence Tiers

Resolue assigns a confidence score to every incident based on: stack trace clarity, code complexity, number of files involved, and test pass rate on the preview.

High Confidence (80–99%): Verified Fix PR

The ideal path. Resolue understands the root cause, generates a minimal patch, deploys it to a preview, runs tests, and records video. A full evidence PR is opened on your repo.

What you get: code diff, root cause analysis, video proof, before/after screenshots, confidence breakdown, and BDD regression tests.

This is the ~60% case for supported error types. Single-file null checks, missing error handling, and type mismatches almost always land here.

Medium Confidence (50–79%): Draft PR with Caveats

Resolue identified the root cause and generated a fix, but something prevented full verification — tests partially failed, the fix touches multiple files, or the preview didn't fully reproduce the error.

What you get: a draft PR (not ready to merge) with the patch, a clear list of what was verified vs. what wasn't, and flags for areas that need human review. Think of it as "here's 80% of the work done."

Low Confidence (<50%): Diagnostic Report

The bug is too complex for an automated fix — multi-service, infrastructure-related, or lacking code context. Resolue does NOT open a PR. Instead, it delivers a diagnostic report.

What you get:

  • Root cause analysis with the AI's best theory
  • Affected files and functions identified
  • Related recent commits that may have introduced the bug
  • User impact data (how many users, frequency, severity)
  • Suggested approach for your team to fix it manually
Your team starts from diagnosis, not triage. Even the "failure" mode saves 30–60 minutes of manual investigation. The root cause analysis, commit correlation, and impact data are immediately actionable.

Configuration

You control the thresholds in resolue.yaml:

# resolue.yaml
confidence:
  min_to_open_pr: 70      # Below this → diagnostic report only
  min_to_auto_merge: 101   # 101 = never auto-merge (default)
  draft_pr_threshold: 50   # 50–69 → draft PR, 70+ → ready PR

Why This Matters

Most AI coding tools only show you the success case. They demo a clean fix on a simple bug and imply everything works that way. We think that's dishonest.

Production bugs are messy. Context is missing. State is inconsistent. Services fail in weird ways. Resolue is designed to handle that reality — which means being transparent about when it can help and when it can't.

The confidence scoring, draft PRs, and diagnostic reports aren't failure modes — they're the product working as intended. A tool that says "I don't know" when it doesn't know is more valuable than one that silently pushes a wrong fix.

Test Generation

Every Resolue fix PR includes AI-generated BDD tests — so the bug is fixed AND permanently covered by a regression test that didn't exist before.

What Gets Generated

When Resolue opens a fix PR, it commits four test files alongside the code patch:

FilePurposeFormat
*.featureHuman-readable BDD specGherkin (Given/When/Then)
*.spec.tsExecutable Playwright testPlaywright + TypeScript
*.api.spec.tsAPI-level regression testPlaywright API testing
*.fixtures.tsTest data from error contextTypeScript const export

All files are committed to tests/resolue/ on the fix branch. When you merge the PR, the tests become part of your codebase permanently.

Example: Checkout Null Check

For a TypeError: Cannot read property 'id' of null in checkout.tsx:

Generated Feature File

# Auto-generated by Resolue — incident inc_4821

Feature: Checkout handles type error correctly
  Regression test for incident inc_4821.
  Error originated in checkout.tsx:18.
  Triggered by POST /api/checkout.

  Scenario: TypeError in checkout.tsx is handled
    Given a user is on the application
    And the id may not be present
    When they submit a request to /api/checkout
    Then no TypeError should be thrown
    And the page should respond without a 500 error
    And the user should be redirected or see a graceful fallback

  Scenario: Application handles Stripe API failure gracefully
    Given a user is performing the action
    And the Stripe API returns a 500 error
    When they submit /api/checkout
    Then the user should see a meaningful error message
    And the application should not crash with a 500
    And the error should be recoverable

  Scenario: Normal flow still works after the fix
    Given a user is authenticated
    And all external services are responding normally
    When they use /api/checkout
    Then the page should load successfully
    And no errors should appear in the console

Generated Playwright Spec

// Auto-generated by Resolue — incident inc_4821
import { test, expect } from '@playwright/test';
import { fixtures } from './resolue-checkout-inc4821.fixtures';

test.describe('Checkout handles TypeError correctly', () => {

  // Scenario: TypeError in checkout.tsx is handled
  // Given: a user is on the application, the id may not be present
  // When: they submit a request to /api/checkout
  // Then: no TypeError, no 500, graceful fallback
  test('TypeError in checkout.tsx is handled', async ({ page }) => {
    await page.goto('/checkout');

    await expect(page).not.toHaveTitle(/error|500/i);
    const errors: string[] = [];
    page.on('pageerror', e => errors.push(e.message));
    expect(errors.filter(
      e => e.includes("Cannot read property 'id'")
    )).toHaveLength(0);
  });

  // Scenario: Stripe failure handled gracefully
  test('handles Stripe http error gracefully', async ({ page }) => {
    // Mock Stripe to return 500
    await page.route('https://api.stripe.com/v1/charges**', async route => {
      await route.fulfill({
        status: 500,
        contentType: 'application/json',
        body: JSON.stringify(fixtures.mocks['stripe']),
      });
    });

    await page.goto('/checkout');
    await expect(page.locator('body'))
      .not.toContainText('Internal Server Error');
  });

  // Scenario: Happy path regression
  test('normal flow still works after the fix', async ({ page }) => {
    await page.goto('/checkout');
    await expect(page).not.toHaveTitle(/error|500/i);
    await expect(page.locator('body'))
      .not.toContainText('Something went wrong');
  });
});

Generated Fixtures

// Auto-generated by Resolue — incident inc_4821
export const fixtures = {
  "incidentId": "inc_4821",
  "error": {
    "type": "TypeError",
    "message": "Cannot read property 'id' of null",
    "file": "checkout.tsx",
    "line": 18
  },
  "failingRequest": {
    "method": "POST",
    "path": "/api/checkout",
    "body": { "cartId": "cart_abc" },
    "headers": { "authorization": "[REDACTED]" }
  },
  "mocks": {
    "stripe": { "error": { "type": "api_error" } }
  }
} as const;

Three Scenarios Per Bug

Resolue always generates at least three BDD scenarios for every fix:

ScenarioWhat it testsWhy
1. Error caseThe exact code path that brokeProves the fix works
2. Dependency failureExternal API fails gracefullyProves resilience (if applicable)
3. Happy pathNormal flow still worksCatches regressions from the fix

Configuration

# resolue.yaml
testgen:
  enabled: true
  output_dir: tests/resolue        # Where to put generated tests
  runner: playwright              # playwright | vitest | jest
  generate_feature: true         # Include .feature Gherkin files
  generate_api_test: true        # Include API-level tests
  generate_fixtures: true        # Include fixture data files
  sanitize_headers: true         # Redact auth headers in fixtures

How AI Writes the Tests

The test generator uses three inputs:

  1. Error context — what broke, what the user was doing, which APIs failed, the breadcrumb trail from Sentry/OTel
  2. Code diff — what the fix changed. The AI reads the diff to understand what edge case was unhandled and writes tests that target that specific code path
  3. Fixtures — the API mocks needed to reproduce the failure. These become the test's mock data

The AI doesn't write generic "page loads" tests. It writes targeted tests that exercise the exact failure mode — with the exact request payload, the exact API error, and the exact edge case data that triggered the bug in production.

Tests are yours to keep. When you merge the PR, the tests become part of your codebase. Edit them, extend them, or integrate them into your CI pipeline. They're standard Playwright tests — no Resolue dependency at runtime.

Security

Generated test fixtures are automatically sanitized:

  • Auth headers are replaced with [REDACTED]
  • Real user data is never included — only the data shape (e.g., "3 cart items" not the actual cart contents)
  • API keys in request bodies are stripped
  • Fixture files are committed to your repo — review them in the PR diff before merging

CLI — resolue dev

Run Resolue locally during development. Auto-generate e2e tests for your code changes before you push — so you never write a Playwright test by hand again.

Install

npm install -D @resolue/auth
# or globally:
npm install -g @resolue/auth

Quick Start

Initialize in your project
resolue init

Creates resolue.yaml and the tests/resolue/ directory.

Write your code normally

Add a feature, fix a bug, refactor — whatever you're working on. No test writing needed.

Generate tests for your diff
resolue test:gen

Resolue reads your git diff against main, analyzes every changed file, and generates BDD tests with Playwright implementations. Tests appear in tests/resolue/.

Run and review
resolue test:run
# or directly:
npx playwright test tests/resolue/

Tests run against your local dev server. Review the generated tests, tweak if needed, commit with your PR.

Commands

CommandDescription
resolue initInitialize Resolue — creates resolue.yaml and test directory
resolue devWatch mode — monitors file changes, press 'g' to generate tests
resolue test:genGenerate tests for current diff against base branch
resolue test:runRun all generated Resolue tests
resolue test:ciCI mode — generate tests + run + report (for GitHub Actions)

Options

FlagDefaultDescription
--base <branch>mainBase branch for the diff
--output <dir>tests/resolueOutput directory for generated tests
--dryfalsePreview generated files without writing them

Watch Mode

Run resolue dev and it watches your source files. When you save a change, it tells you what changed and waits for your command:

$ resolue dev
─────────────────────────────────────────
  ❯❯ Resolue — Production Incident Autopilot
─────────────────────────────────────────

Watching: src, app
Save a file to see test suggestions.

Commands:
  Press 'g' + Enter → generate tests for current diff
  Press 'r' + Enter → run generated tests
  Press 'q' + Enter → quit

Changed: api/checkout/route.ts
  → Run 'g' + Enter to generate tests for these changes

> g
Generating tests...

Generated 4 files (3 scenarios)
  ✓ tests/resolue/api-checkout-route.feature
  ✓ tests/resolue/api-checkout-route.spec.ts
  ✓ tests/resolue/api-checkout-route.api.spec.ts
  ✓ tests/resolue/api-checkout-route.fixtures.ts

What Gets Generated

Resolue analyzes each changed file and generates different test types based on what it is:

File typeWhat Resolue generates
API route app/api/*/route.tsPer-method tests (GET/POST/PUT/DELETE), auth checks, validation tests, error handling
React component *.tsxRender test, interaction tests, null/error state handling, happy path
Utility/lib lib/*.tsFunction-level tests for exported functions

CI Integration

Add Resolue test generation to your GitHub Actions workflow so every PR gets auto-generated tests:

# .github/workflows/resolue-tests.yml
name: Resolue Tests
on: [pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # Full history for diff

      - uses: actions/setup-node@v4
        with:
          node-version: 20

      - run: npm ci

      - name: Generate & run Resolue tests
        run: npx resolue test:ci
        env:
          RESOLUE_AI_KEY: ${{ secrets.RESOLUE_AI_KEY }}
Tests are yours to keep. Generated tests are standard Playwright — no Resolue dependency at runtime. Commit them, edit them, extend them. Resolue writes the first draft; you own the final version.

How It Differs from Production Fix Tests

Production fix testsCLI dev tests
TriggerProduction error detectedDeveloper runs resolue test:gen
InputError context + Sentry breadcrumbsGit diff against base branch
FocusThe specific bug that brokeAll changed code paths
API mocksReplays actual failing responsesGenerates common failure patterns
Committed byResolue bot on fix PRDeveloper on feature PR

resolue.yaml

Configuration file reference. Place resolue.yaml in your repository root to control how Resolue operates on your project.

Full Example

# resolue.yaml — committed to your repo (no secrets here!)
version: 1

# AI model — api_key_env is the NAME of the env var, not the key
ai:
  provider: anthropic
  model: claude-sonnet-4
  api_key_env: RESOLUE_AI_KEY  # ← reads from $RESOLUE_AI_KEY at runtime

# Repository settings
repo:
  base_branch: main
  ignore_paths:
    - node_modules/**
    - dist/**
    - .next/**
    - *.test.ts
    - *.spec.ts

# Branch strategy for production auto-fixes
branches:
  prefix: fix/resolue-        # Branch name: fix/resolue-{incident_id}
  target: main                # PR targets this branch
  auto_delete: true           # Delete branch after merge

# Confidence thresholds
confidence:
  min_to_open_pr: 70         # Below this → diagnostic report only
  draft_pr_threshold: 50     # 50–69 → draft PR, 70+ → ready PR
  min_to_auto_merge: 101     # 101 = never auto-merge (safest default)
  require_video: true

# Verification
verify:
  playwright: true
  smoke_checks: true         # Auto-generate if no Playwright config
  timeout: 180

# Test generation
testgen:
  enabled: true
  output_dir: tests/resolue
  runner: playwright
  generate_feature: true    # BDD .feature files
  generate_api_test: true
  generate_fixtures: true

# Notifications
notify:
  slack_channel: #incidents
  on_pr_opened: true
  on_fix_failed: true
This file is committed to your repo. Never put API keys, tokens, or secrets in resolue.yaml. Use api_key_env to reference environment variable names. The actual keys go in Vercel Env Vars, GitHub Secrets, or your secrets manager.

Field Reference

ai

FieldTypeDefaultDescription
providerstringanthropicAI provider: anthropic, openai, bedrock, azure, custom
modelstringclaude-sonnet-4Model identifier
api_key_envstringName of the env var holding the API key (NOT the key itself)
endpointstringCustom endpoint URL (for self-hosted)
timeoutnumber60AI request timeout in seconds

repo

FieldTypeDefaultDescription
base_branchstringmainDefault branch for diffing and PR targets
ignore_pathsstring[][]Glob patterns to exclude from analysis and test generation

branches

Controls how Resolue creates branches for production auto-fix PRs. Does not apply to CLI test generation (which works on your current branch).

FieldTypeDefaultDescription
prefixstringfix/resolue-Branch name prefix. Full name: {prefix}{incident_id}
targetstringmainBranch the fix PR targets
auto_deletebooleantrueDelete fix branch after PR is merged
Branch prefix only applies to production fixes. When using resolue test:gen locally or in CI, tests are generated on your current branch — Resolue never creates a new branch for developer-triggered test generation.

confidence

FieldTypeDefaultDescription
min_to_open_prnumber70Minimum confidence score to open a PR
min_to_auto_mergenumber101Auto-merge threshold (101 = disabled)
require_videobooleantrueRequire video proof in every PR

Integrations

Per-integration setup guides for each tool in the Resolue pipeline.

Vercel

What Resolue uses: Log Drain for runtime error streaming, preview deployments for fix verification.

Connect via OAuth

In the Resolue dashboard, click Connect Vercel. Select your team and project.

Log Drain auto-installed

Resolue configures a Log Drain on your project. All runtime errors stream in real-time.

Preview deploys active

Every fix branch triggers a Vercel preview deployment. Resolue runs verification against this URL.

Sentry

What Resolue uses: Exception webhooks, stack traces, breadcrumbs, user impact data.

Connect via OAuth

Click Connect Sentry in the dashboard. Select your Sentry project.

Webhooks auto-configured

Resolue installs webhooks for issue.created, event.alert, and regression.detected.

GitHub

What Resolue uses: Code read access for diagnosis, PR write access for fix delivery.

Install the GitHub App

Go to github.com/apps/resolue and install on your organization.

Select repositories

Choose specific repos or grant access to all.

Playwright

What Resolue uses: Test suite execution against preview, video recording.

Zero setup required. Resolue auto-detects playwright.config.ts in your repo. If found, your full test suite runs against the preview. If not, Resolue generates smart smoke checks.

OpenTelemetry

What Resolue uses: Distributed traces, metrics, and logs from any OTel-compatible source.

# In your OTel Collector config, add Resolue as an exporter:
exporters:
  otlphttp:
    endpoint: https://ingest.resolue.ai/v1
    headers:
      Authorization: Bearer ${RESOLUE_INGEST_KEY}

service:
  pipelines:
    traces:
      exporters: [otlphttp, your-existing-exporter]

Works with HyperDX, Grafana, Jaeger, SigNoz, Honeycomb, and any OTLP exporter.

Security

How Resolue protects your code, credentials, and production environment.

Threat Model

Attacker sends forged X-Resolue-Verify header

Blocked by: HMAC-SHA256 signature validation. Without the shared secret (256-bit keyspace), the attacker cannot produce a valid signature.

Attacker intercepts a valid token and replays it

Mitigated by: 5-minute token expiry. Each token also contains a unique run ID that can be monitored for duplicates.

Attacker gains access to RESOLUE_SECRET

Impact: The attacker could forge tokens to access preview deployments (never production) as the test user (never admin, unless misconfigured). Mitigation: Rotate the secret immediately in the Resolue dashboard.

Middleware accidentally deployed to production

Blocked by: Hardcoded environment check. The middleware is a complete no-op when NODE_ENV=production or VERCEL_ENV=production. This cannot be overridden by configuration.

Token Format

base64({ ts, rid, iid, v }).hmac_sha256_hex(secret)
FieldDescription
tsUnix timestamp (seconds) — checked against 5-min TTL
ridVerification run ID — for audit trailing
iidIncident ID being verified
vToken version (currently 1)

What Resolue Never Accesses

  • Your real user passwords or credentials
  • Your session tokens or JWTs
  • Your OAuth tokens
  • Your database credentials or connection strings
  • Your .env files (only RESOLUE_SECRET is shared)

Audit Logging

resolueAuth({
  onVerify: (info) => {
    logger.info('Resolue verification', {
      runId: info.runId,
      incidentId: info.incidentId,
      timestamp: info.timestamp,
    });
  }
});

Self-Hosted

Deploy Resolue on your own infrastructure for full data sovereignty. Your code never leaves your network.

Overview

Self-hosted Resolue runs inside your infrastructure — VPC, Kubernetes, or on-premise. It connects to your internal GitHub Enterprise, error tracking, and deploy pipeline. Same functionality as the cloud version, fully air-gapped.

What's included

  • Full Resolue engine — diagnosis, fix generation, verification, PR creation
  • Browser verification — runs in isolated containers within your network
  • Pluggable AI backend — use any OpenAI-compatible endpoint (vLLM, Ollama, AWS Bedrock, Azure OpenAI, or your own model server)
  • Dashboard — same dashboard, hosted on your domain

Deployment options

MethodBest for
Docker ComposeSmall teams, dev environments
Helm ChartKubernetes clusters
On-premiseEnterprise with strict compliance requirements
Self-hosted is available on the Enterprise plan. Contact us at hello@resolue.dev for deployment guides, architecture documentation, and onboarding support.

API Reference

Webhooks, REST endpoints, and event types for integrating Resolue into your workflow programmatically.

Webhook Events

Configure a webhook URL in the Resolue dashboard to receive events:

EventTriggerPayload includes
incident.detectedNew production error detectederror, affected_users, source, signals
incident.diagnosedRoot cause identifiedroot_cause, file, function, commit
fix.generatedPatch created and pushedbranch, diff, files_changed
fix.verifiedPlaywright verification completetests_passed, video_url, confidence
pr.openedFix PR opened on GitHubpr_url, pr_number, evidence
pr.mergedFix PR merged by userpr_url, merged_by, time_to_merge
fix.failedFix attempt failed at any stagestage, error, incident_id

Webhook Payload Example

{
  "event": "pr.opened",
  "timestamp": "2026-03-29T14:22:00Z",
  "incident_id": "inc_4821",
  "data": {
    "pr_url": "https://github.com/acme/web-app/pull/248",
    "pr_number": 248,
    "confidence": 94,
    "video_url": "https://resolue.ai/v/run_abc123",
    "files_changed": ["src/checkout.tsx"],
    "lines_changed": 3,
    "tests_passed": 47,
    "tests_total": 47,
    "regressions": 0
  }
}

REST API

List incidents

GET /api/v1/incidents
Authorization: Bearer {api_key}

Get incident detail

GET /api/v1/incidents/{incident_id}

Retry a failed fix

POST /api/v1/incidents/{incident_id}/retry

Trigger manual scan

POST /api/v1/scan
{
  "repo": "acme/web-app",
  "error_url": "https://sentry.io/issues/4821"
}

Authentication

All API requests require a Bearer token. Generate one in the Resolue dashboard under Settings → API Keys.

curl -H "Authorization: Bearer rsl_live_abc123..." \
  https://api.resolue.ai/v1/incidents