Features

Deployment Verification

Automatically diagnose deployment failures by analyzing logs, code changes, and generating actionable fix suggestions.

Deployment Verification is a powerful feature of Castrel that automatically detects deployment failures and provides instant root cause analysis, eliminating the need to manually investigate logs and code changes across multiple tools.

What is Deployment Verification?

Deployment Verification is an AI-powered deployment failure diagnosis system that automatically monitors your CI/CD pipeline through GitHub Webhooks. When a deployment fails, Castrel automatically:

  • Identifies the deployment tool (Vercel, etc.)
  • Retrieves and analyzes deployment logs
  • Correlates errors with code changes
  • Generates a structured diagnosis report with actionable fix suggestions

This transforms what typically takes 15-30 minutes of manual investigation into a 2-5 minute automated process.

How to Use Deployment Verification

Step 1: Connect GitHub Repository

Set up the GitHub Webhook integration to enable automatic deployment event detection:

  1. Navigate to Integrations > GitHub in Castrel
  2. Authorize Castrel to access your repositories
  3. Enable deployment event webhooks for the repositories you want to monitor

See GitHub Integration for detailed setup instructions.

Step 2: Connect Deployment Tool

Authorize the MCP tool for your deployment platform:

  1. Go to Integrations in Castrel
  2. Connect your deployment tool (Vercel, etc.)
  3. Grant necessary permissions for log access

If authorization is missing when a deployment fails, Castrel will prompt you to complete the setup before continuing diagnosis.

Step 3: Receive Diagnosis Report

When a deployment fails, Castrel automatically analyzes and delivers a diagnosis report containing:

  1. Error Summary: Error type, location, and message with severity classification
  2. Problem Code: The specific code causing the failure with syntax highlighting
  3. Root Cause Analysis: Detailed explanation of why the error occurred, correlating error information with code changes
  4. Fix Suggestions: Concrete code examples you can copy and apply directly
  5. Related Files: List of files involved in the change that may need attention

Step 4: Apply Fix and Redeploy

Based on the diagnosis report:

  1. Review the root cause analysis to understand the issue
  2. Copy the suggested fix code or implement your own solution
  3. Commit and push the fix
  4. Castrel can optionally track the subsequent deployment to verify the fix

You can also provide feedback (Helpful / Not Helpful) to help Castrel improve its diagnosis accuracy.

How Castrel Verifies Deployments

Castrel follows a systematic approach to diagnose each deployment failure:

1. Deployment Event Detection

When GitHub sends a deployment failure webhook, Castrel automatically:

  • Validates the webhook signature for security
  • Extracts key metadata (repository, deployment ID, commit SHA, branch)
  • Creates an async diagnosis task

2. Deployment Tool Identification

Castrel intelligently identifies your deployment tool using multiple signals:

  • Bot login name: e.g., vercel[bot]
  • Repository homepage URL: e.g., contains vercel.app
  • Deployment status URL: Target URL patterns
  • Repository configuration: Presence of .vercel/project.json, etc.

3. Log Retrieval & Error Analysis

Using MCP tools, Castrel:

  • Retrieves complete deployment build logs
  • Uses AI to parse and identify error patterns
  • Classifies errors (compilation, dependency, configuration, runtime, etc.)
  • Determines error severity and whether it's ignorable

4. Code Change Correlation

Castrel fetches the commit diff via GitHub MCP and:

  • Matches error locations (file names, line numbers) with changed files
  • Analyzes causal relationships between code changes and errors
  • Identifies the specific code lines that introduced the issue

5. Report Generation

Finally, Castrel generates a structured diagnosis report with:

  • Clear error identification and classification
  • Root cause analysis linking errors to specific code changes
  • Actionable fix suggestions with code examples

Tips for Better Results

TipDescription
Connect All ToolsAuthorize both GitHub and your deployment platform (Vercel, etc.) for complete diagnosis coverage
Enable All RepositoriesSet up webhooks for all repositories you want monitored to ensure no deployment failures are missed
Provide FeedbackRate diagnosis reports to help Castrel improve accuracy over time

Common Questions