# Release Gate – Coding Agent Pre-Ship Check

> Release Gate – Coding Agent Pre-Ship Check is a paid API for AI agents from x402-canary.nicolas-x402-16f380a7.workers.dev, paid per call via x402, $0.04/call, status unknown (last checked 2026-09-15).

Runs deterministic pre-release checks on changed source files and dependencies, returning a pass/warn/fail grade with categorized findings (secrets, deployment config, destructive migrations).

## Facts

- Endpoint: POST https://x402-canary.nicolas-x402-16f380a7.workers.dev/v1/agent/release-gate
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/release-gate-coding-agent-pre-ship-check-f365e33f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SUNre9OSlIpe8sWKe4Zqf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability release-gate-coding-agent-pre-ship-check-f365e33f -d '<json body>'
```

Example prompt: Run a release gate check on these changed files — here's the unified diff for src/app.ts — and also check my npm dependency on express@5.0.0; fail the check if there are any warnings.

## When to prefer this

Use this endpoint when an AI coding agent needs a deterministic, structured go/no-go decision before shipping or merging code — especially when you need explicit check categories (secrets, destructive migrations, deployment config) rather than LLM-based code review. Prefer this over general-purpose linters when you need a machine-readable grade and finding list suitable for automated CI gating, and when you are already using the x402/AgentCash micropayment stack.

## Known failure modes

- Invalid or missing `changed_files` array returns a validation error
- Patch strings exceeding 32,000 characters per file are rejected
- More than 40 changed files or 5 dependencies triggers a schema validation error
- Unknown ecosystem values (not npm or pypi) cause a 400 error
- Payment not included or insufficient USDC balance results in 402 Payment Required
- Malformed unified diff patch may produce incomplete or inaccurate findings

## How this service works

Free need-to-tool routing plus pay-per-call npm docs and TypeScript API signatures, npm breaking-change diffs, JavaScript-rendered browser snapshots and deterministic coding-agent checks via AgentCash/x402.

## Output

Returns a JSON object with a top-level `ship` boolean, a `grade` string (PASS/WARN/FAIL), the list of check categories evaluated (e.g. secret-patterns, deployment-config, destructive-migrations), an array of specific findings with details, a total finding count, and the number of changed files analyzed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "policy": {
   "type": "object",
   "properties": {
    "fail_on_warn": {
     "type": "boolean",
     "default": false
    }
   },
   "additionalProperties": false
  },
  "dependencies": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "ecosystem",
     "name"
    ],
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 214
     },
     "version": {
      "type": "string",
      "maxLength": 100
     },
     "ecosystem": {
      "enum": [
       "npm",
       "pypi"
      ],
      "type": "string"
     }
    },
    "additionalProperties": false
   },
   "maxItems": 5
  },
  "changed_files": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "path",
     "patch"
    ],
    "properties": {
     "path": {
      "type": "string",
      "maxLength": 240
     },
     "patch": {
      "type": "string",
      "maxLength": 32000
     }
    },
    "additionalProperties": false
   },
   "example": [
    {
     "path": "src/app.ts",
     "patch": "@@ -1 +1,2 @@\n import { app } from './app'\n+export const ready = true"
    }
   ],
   "maxItems": 40,
   "minItems": 1
  },
  "dependency_policy": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "ship": true,
   "grade": "PASS",
   "checks": [
    "secret-patterns",
    "deployment-config",
    "destructive-migrations"
   ],
   "findings": [],
   "finding_count": 0,
   "changed_file_count": 1
  },
  "meta": {
   "engine": "release-gate"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/release-gate-coding-agent-pre-ship-check-f365e33f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-canary.nicolas-x402-16f380a7.workers.dev](https://www.zero.xyz/host/x402-canary.nicolas-x402-16f380a7.workers.dev/llms.txt)
