07

GitHub App

Install the ChangeBox GitHub App on the repositories agents work in. ChangeBox hears about merges, CI and deployments, can merge a pull request the moment the Ship gate is approved, and can hold a GitHub deployment until the gate is decided. Nothing ships without a decision recorded in ChangeBox.

  • pull_request

    Head SHA on open and push; merge recorded, and live when the environment's signal is merge

  • check_suite · workflow_run · status

    CI state on the current head; green re-evaluates autonomous shipping

  • deployment_status

    Release recorded; live when the environment's signal is deploy

  • deployment_protection_rule

    GitHub asks before deploying; ChangeBox answers from the Ship gate

Connecting

The app's Code screen → GitHub → Connect GitHub sends an owner or admin to GitHub to install the app on the account and pick repositories. GitHub brings them back and the installation is bound to the workspace. Add repositories later from GitHub's installation settings; ChangeBox follows along. The app's primary repository must be in the installation for merges and deployment holds to work on it.

Self-hosting? The deployment needs GITHUB_APP_ID, GITHUB_APP_SLUG, GITHUB_APP_PRIVATE_KEY and GITHUB_WEBHOOK_SECRET, a webhook at /api/github/webhook and a setup URL at /api/github/setup. Permissions: pull requests read and write, checks read, deployments read and write, contents read and write, metadata read. Until they are set, Setup says the app is not configured and people mark changes live by hand.

Where fixes are verified

A bug is seen in one place and fixed in another, with a ladder between them. ChangeBox verifies twice. Check, before it ships: the first non-production environment the fix reaches — a per-PR preview, the dev rung of a branch ladder, or staging — is where the Verifier exercises the acceptance criteria with a test account, writes allowed. Pass is Ship-gate evidence; fail sends the PR back to the builder with the notes before anyone else sees it. Confirm, where it was reported: when the fix reaches the environment the change was seen in (production for a user's report), the change is live there and the reporter ticks it off, or the Verifier walks the same criteria read-only. Agents never write to production.

Every environment has a kind (production, staging, development, preview), a base branch, and what the Verifier may do there. A PR merging into an environment's base branch, a push to that branch that carries the merge (a promotion PR, a merge queue, a release train), or a successful GitHub deployment to the environment all count as the fix landing there. Trunk-based teams get a preview rung from their deploy provider's “Preview” deployments; ladder teams map development, staging and main. One environment only? ChangeBox confirms there and skips the check; add a second URL and the check turns on.

Live signals

Each environment says what makes a change live there. Deployment: GitHub reports a successful deployment to that environment — the default, and the honest one when a pipeline deploys. Give the environment its GitHub name if it differs. Merge: the pull request merging counts, for repos that deploy on merge with no deployment record. Manual: someone marks it live. Whatever the signal, the Ship gate must already be approved; a deployment that lands first is recorded as waiting, and the reporter is not asked to check until the gate is decided.

Merge on ship approval

Turn it on per app in Setup → App. When the Ship gate is approved — in the console, the widget, Slack, email or by policy — ChangeBox squash-merges the pull request through the app, with the approver and channel in the commit message. The merge is only attempted on the head ChangeBox last saw; a push after approval refuses the merge and says so on the timeline.

Deployment protection

In a GitHub environment's protection rules, add the ChangeBox app as a required reviewer. Deployments to that environment then wait for ChangeBox. If the commit belongs to a change whose Ship gate is approved, the deployment is released at once; if the gate is open, it is held and released the moment someone approves; if rejected, the deployment is rejected with the note. Commits with no ChangeBox change are approved as not gated so your pipeline is never stuck on us.

Releases and versions

A fix landing on dev is a deploy: it threads under the change's card and the Verifier checks it there. Changes that reach staging together form a release candidate; changes that reach production together form a release. Both appear on the app's Releases page with notes grouped by what was fixed, clarified and polished, one line per change with its PR, and post one line to the Releases channel. Multi-repository apps get one release across every repository; each repository's commit is recorded.

Versioning is a layer on top and is off until you choose. Your versions: keep tagging as you do; ChangeBox reads the tag or GitHub Release through the app, names the release it carries and attaches the version to those changes. Nothing is written to the repository. ChangeBox versions: the next version is computed from the latest tag with your prefix (semantic or calendar), a candidate is tagged -rc.N on staging and the final on production, and a GitHub Release is published with the notes. Major bumps are never automatic; a hotfix straight to production takes a patch while a candidate series is open. The Releases page also opens promotion pull requests (development → staging → production) with the pending changes as the body; your CI and merge rules apply as for any PR.

Autonomous shipping

On an app whose execution policy is autonomous, policy may approve the Ship gate itself, but only when every piece of evidence is green: low risk in the spec, no security flags, CI passed on the current head, the independent review of the current PR came back clean, no blocker findings are open, and — when the app has a non-production environment to check on — the Verifier's pre-ship check passed. Anything missing holds the gate for a person. Every evaluation is stored with its reasons, and a policy-approved ship is flagged in the evidence packet for retrospective review. With merge on ship approval and a deployment signal, a low-risk report can go from widget to live with no one clicking anything — and a complete record of why that was allowed.

Autopilot

For teams shipping fast. Under the Autopilot execution policy nothing waits for a person unless it is dangerous. Every request that can be read builds; an unclear one builds from the words as written. Every pull request ships when CI is green and the independent review found no blocker or major — medium risk, minor findings, a reviewer that could not run or a PR with no CI do not hold it. If the review finds a blocker or a major, Autopilot sends it back to the builder once before asking anyone. A ship approval is for that commit: a new head withdraws it until the review of the new head is clean. PRs opened outside ChangeBox and linked to a change get the same review and the same gate.

What still waits for a person: security flags, high risk, and protected areas — files in the PR that match infrastructure and deploy (Terraform, Kubernetes, workflows, Dockerfiles, wrangler), data and schema (migrations, SQL, Prisma, Drizzle), billing and payments, auth and secrets, or your own patterns from Setup → Policy. ChangeBox reads the PR's files through the GitHub App and names the files in the gate note. Every decision is stored with its reasons; an autopilot approval is marked as such on the timeline and in Slack. Switching an app to Autopilot re-evaluates every open Ship gate at once.

Checks on the pull request

ChangeBox publishes ChangeBox on every pull request it works on. Its conclusion is ChangeBox's final say for that head: would this merge? The title says where the loop is and what it found — Reviewing, Review clean · verified 3/3 on Dev · waiting on evidence, Review: 1 blocker, Approved by Policy, Sent back by Dana — and the body carries the evidence for the whole head: the review's findings, the Verifier's line per acceptance criterion, the Ship gate's reasons. Success when the review is clean; neutral when findings do not hold the Ship gate, with those findings in the summary; failure when a blocker is actually holding the gate, a verify failed, or the change was sent back; in progress while the review runs. Red CI is that workflow's check. Require ChangeBox in branch protection and nothing merges without its say. Its own check never counts as CI evidence for the gate.

changebox is the same answer for that exact head, including a merge queue's temporary commit. In progress while ChangeBox is reviewing, success when the review is clean, neutral when findings do not hold the Ship gate (the summary lists them), and failure only when a blocker is holding the gate. A head ChangeBox does not review is neutral, with the reason. The legacy commit status of this name is not posted beside the check run. To require it, edit the repository ruleset and under Require status checks to pass add changebox. A workflow that posted its own verdict by reading ChangeBox's review comments can be deleted once the ruleset requires this check.

Required checks go the other way. Name the checks you already run — a PR reviewer such as Cursor Bugbot or CodeRabbit, a scanner, a test workflow — in Setup → Policy and policy waits for them to finish green before it ships. A running check is waited for; a red one holds the gate for a person; one that never reports within ten minutes holds too, because you asked for it. The App needs the checks: write permission for its own checks; an installation created before that permission existed is asked to accept it once, on GitHub.

Tests: the Regression Ledger

When a repository is connected ChangeBox reads it for the tests it already has — a Playwright config and spec folders, a unit runner and whether it reports coverage, workflows that run Playwright on a schedule — and keeps that inventory under Setup → Tests. Nothing is installed in your repository and nothing is rewritten.

Fixes grow the suite. When the repo has Playwright, every builder is asked to add a spec tagged @cb with the change id for each acceptance criterion a browser can observe, using your existing fixtures. The spec files a PR touched are kept on the change, so you can see which fixes left a test behind.

Sweeps run all of it. A fresh agent clones the repository, points the suite at an environment (the lowest rung with a URL, never production unless you choose it), skips specs tagged @quarantine, retries once so a flake is counted rather than failed, and sorts what is left into defect, drift or infra. Defects and drift are filed as changes by the Regression sweep member — deduplicated on spec and title, at most five per run — and go through the same loop as anything a person reports. Run a sweep from Setup → Tests, every night at an hour you pick, or make it the promotion gate: a rung cannot move up until it has a passing sweep newer than its last landing. One line lands in your releases channel when a sweep fails, and when it passes again after failing.

Numbers you cannot click into being. If a workflow on the PR uploads a coverage artifact with an lcov.info in it, ChangeBox reads it and records coverage on the files the PR changed — not the whole repo — and says which changed files the report never mentioned. If the repository has a Stryker config, sweeps can also run mutation testing on the money and access folders and record the score. The Tests tab shows the last 30 days: changes confirmed, the ones that came back after confirming (the escape rate), who found what, how many fixes added a spec, and the mean coverage on changed files.

ChangeBox reviews every pull request

ChangeBox does not assume you run another reviewer. Turn on Review every pull request in Policy and every PR opened in a connected repository — by a person, by another tool, not only by ChangeBox — gets the ChangeBox check and a pull request review with the findings on the lines they are about. A human's PR has no change spec, so the reviewer judges it against what the PR says it does and the codebase's Conventions: the rubric the Baseline writes from how this codebase already does things (how errors are handled, how data is accessed, how tests are organised, where things live). Run the Baseline and the reviewer learns your house style; re-run it and the rubric updates.

What the review submits is your call. A clean PR gets a comment, or an approval when Approve when clean is on — then branch protection's required review can be ChangeBox. A blocker gets Request changes, which holds the merge until it is resolved, or a comment with a failing check if you would rather people decide. Drafts, bots and forks are skipped; a burst of pushes to one PR costs one run; when the repository has Playwright, a PR that changes browser-visible behaviour with no spec is told so. Reviews per day is its own lane and never spends the change budget.

Baseline: what should change?

When the first repository is connected, ChangeBox asks one question of the whole product and answers it with evidence. A first agent reads the repository top to bottom and writes a stack map: languages, frameworks, packages, data stores, infrastructure, CI, environments, every route a browser can reach, how sign-in and authorization work, and what the system has — a frontend, a database, background jobs, billing, a model in the product. The map decides which domains apply; there is no billing report for an app without payments.

Then the domains. Architecture, frontend, backend, data architecture, data operations, jobs, integrations, auth, billing, files, caching, messaging; testing, correctness, code quality, dependencies, accessibility, performance, internationalization; CI/CD, infrastructure, reliability, security, cost, continuity; product surface, analytics, privacy, documentation, engineering process; and AI — how well the team uses AI to build (agent-readiness of the repository, agent-authored work, independent review, verification, guardrails) and, where the product calls a model, how safely it does. Related domains share an agent at standard depth; thorough depth gives each its own. Each auditor gets the stack map plus what ChangeBox already knows — telemetry, escape rate, the test inventory — and, when allowed, may open the lowest non-production environment to find bugs nobody knew about.

Every finding is a change with proof. A bug with a repro, a change worth making, or a removal — dead code, an unused dependency, an unused index — each with a file and line, a command and what it printed, a URL or a query you can check, why it matters, what ChangeBox would do, effort, risk and confidence. A domain may honestly answer that nothing should change. Scores are derived from the open findings weighted by severity and confidence, never graded separately: ship the changes and the score moves. Findings are fingerprinted so a later run inherits what you decided instead of duplicating the item, and a fixed one that comes back is flagged. One line lands in your releases channel when the answer is ready.

Approve and it happens. Approve all, a domain, or one item at a time; the cost in agent runs against today's launches is shown before you click. Each approved finding becomes a change filed by the Baseline member — the finding's why, what to do and evidence are the description, bugs go first — and rides the same loop as any report: build, independent review, verification, ship, with policy, protected areas and launch caps applying as always. Builders are told the Baseline rule: if the code they touch has no tests, write characterization tests first in the same PR. Confirming the change closes the finding; declining it on the change declines the finding; the score follows. Later keeps an item counting; Not here stops it and is remembered on the next run. When the app has a browser UI and no Playwright suite, the first proposal is always to start one — config wired to your lowest non-production environment, a sign-in fixture from env, smoke specs for the core routes — so that everything after it is safer.

GitHub App · ChangeBox