Chapter 05 · 4 min
Approving, reviewing the PR, and what Trevo never touches
The branch policy, the experiment gate, the temporary clone.
Approve is the only irreversible-looking button in Trevo, and it is not irreversible: it opens a pull request. Trevo Bot clones the repository into a temporary workspace, writes the variant, runs your typecheck and lint, and opens the PR on a trevo/experiment/<key> branch. In production this takes two to three minutes.
What the diff looks like
// client
const variant = useExperiment('catalog-inline-add-to-cart');
{variant === 'inline-add' && <QuickAdd slug={product.slug} priceCents={product.price} />}
// server
const variant = trevo.getVariant('free-shipping-threshold-40', { anonymousId });
const quote = quoteShipping(subtotal, variant);The control path is byte-for-byte the code that was there. The variant is additive and gated. Nothing outside the files the proposal cited is modified, and the PR description lists the checks the bot ran. Review it the way you review any contributor’s PR; request changes and the bot revises.
The boundary
Trevo owns everything reversible; you own everything irreversible. It writes to branches, opens pull requests, runs experiments, measures, and explains. It never merges, never deploys, never sends a variant to 100%, and never keeps the clone. If the GitHub App is uninstalled, every open trevo/* PR stays exactly where it is, for you to close or merge.