Aperture Bot

Aperture Agent Check

Catches AI agents' mistakes in pull requests, before they merge.

Copilot, Codex, Claude Code, Grok Bot and other agents open pull requests on their own now. Agent Check gives every pull request, theirs and yours, the checks the Aperture editor runs on every staged change. It runs on your runner, and is free.

With the bot

Comment /aperture check on a pull request, or turn on Check every pull request in a bot's standing jobs. The report is one comment on the pull request, updated on each push. Tests run in the bot's container with no network. No model key needed.

On its own

One workflow step, no bot and no token. A red check marks the line in the pull request and fails the step: make it a required check, and red blocks the merge.

Get the action

Add the action

.github/workflows/aperture-agent-check.yml

# .github/workflows/aperture-agent-check.yml
name: Aperture Agent Check
on: pull_request

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0 # it compares against the pull request's base
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci # for the tests, and your packages' real types
      - uses: hankaws/[email protected]

What it checks

  • Parses. Every changed file parses.
  • Imports resolve. import, export … from and require() point at files that exist and packages in package.json, including in files that imported something the change deleted.
  • Types. The real TypeScript compiler with your installed packages' types, before and after the change: only errors the change brings in are red, in the files it changed and in the files that use them.
  • Tests. Your own test script, on the runner. A failure the base already had is reported as one, not blamed on the change. Skipping, deleting, narrowing or cutting short the tests is red even when what is left passes.

A run

A pull request gives formatPrice a currency argument. The file it changed is fine on its own; src/cart.ts, which it never opened, still calls it the old way, and a test fails. This is the run, word for word; a test keeps this page equal to what the action prints.

The change: src/price.ts

/** Cents as a price, in any currency. */
export function formatPrice(cents: number, currency: string): string {
  return new Intl.NumberFormat("en-US", { style: "currency", currency }).format(cents / 100);
}

The run

Aperture Agent Check: 2 checks red on 1 changed file. Do not merge this as it is.

  • ✓ Parses: 1 file parses.
  • ✓ Imports resolve: Every import in 1 script resolves.
  • ✗ Types: src/cart.ts: TS2554 at line 11: Expected 2 arguments, but got 1.
  • ✗ Tests pass: npm run test fails on this runner: not ok 2 - the label says how many items and what they cost

In the pull request's Files changed tab, src/cart.ts line 11 is marked: TS2554 at line 11: Expected 2 arguments, but got 1.

The action's settings

InputDefaultWhat it does
run-teststrueRun npm run <test-script>. Install dependencies in an earlier step.
test-scripttestThe package.json script that runs the tests.
timeout-minutes10How long one test run may take.
fail-onredred fails the step when a check is red; never only reports.
basethe pull request's baseBranch, tag or commit to compare against.
working-directorythe repository rootThe project's folder in a monorepo.

Output: verdict, red or clear. The bot sets the same output after a check.

What leaves the runner

Nothing. The checks run in the step, with no network. With tests on, it runs the pull request's code, as any test step does, so use it on pull_request, never pull_request_target, where that code would run with your repository's secrets. The bot checks only pull requests from branches of the repository itself, never a fork's.

How good is it

These are the checks the benchmark measures on 48 edits an agent might make. With the tests run, they stop 27 of the 27 mistakes a check can see. Without running anything, 20 of the 33 bad edits. 1 of the 15 correct edits is flagged.

Badge

README.md

[![Checked by Aperture Agent Check](https://img.shields.io/badge/checked%20by-Aperture%20Agent%20Check-7c3aed)](https://aperturesais.grok.me/bot?tab=check)

Want an agent to check its work before it even opens the pull request? Connect it to Aperture. The source is in Hankaws/aperture, MIT.