Skip to content

Concepts

This page explains the words a review report uses and the rules behind them. The rules are quoted from the code: the classification gate is decide in packages/core/src/classification.ts, and the check conclusion is conclude in the same file.

A review compares two deployments of one pull request at one head commit: production (the baseline) and preview (the pull request’s deployment). A review never changes target: a new push creates a new review and supersedes the old one, together with its approval. Its life is a state machine (packages/core/src/lifecycle.ts):

pending_approval -> queued -> running -> succeeded | failed | budget_exhausted
^ | ^ |
| v | v
(approval revoked) awaiting_human_auth
any state that is not final -> cancelled | superseded

A review runs through twelve stages, in order: discover_deployments, analyze_intent, plan_scenarios, execute_preview, execute_production, compare, measure_performance, describe_visual, classify, generate_tests, report, publish. A completed stage is never run again, also after a restart.

The intent record is what the pull request is understood to change: a summary, a list of intent items (each with routes and categories it concerns, or a statement that something must stay unchanged), the affected routes with their impact (direct, configured, speculative), and an uncertainty level. It is built deterministically from the diff and the route map; a reasoning model, if configured, can add items. Pull-request text is treated as data, never as instructions.

Every item records its source (title, description, diff, config or model) and a quote: verbatim text from the pull request that it rests on. A model cannot claim a source other than model, and must supply a quote. An item whose quote the gate cannot find inside one visible block of the pull request justifies nothing: the title, one paragraph, list item, heading, block quote or table row of the description (without HTML comments, struck-through text or markup), one label, one changed file path, or one run of added patch lines. Removed and context lines do not count, and a quote cannot be joined from several blocks. Both sides are compared after Unicode compatibility normalisation, removal of invisible characters, case folding, and replacing punctuation and markdown with spaces; letters are never mapped to other letters (no homoglyph folding), and there is no similarity score. A model’s intent reply whose quotes are not found is repaired once, with its previous reply. See the acceptance rules below. Without a pull request (a CLI review of two URLs without --pr) the intent is unknown, and nothing can be classified as an intended change.

A scenario is a sequence of steps (navigate, click, type, assert, checkpoint, …) on one route at one viewport. Sources: scenarios you configure, visits to changed and critical routes, and controls, forms and navigation discovered on the page. Each scenario runs in preview first, then in production. Production is read-only:

  • Requests other than GET, HEAD and OPTIONS to production origins are blocked unless listed in safeRequests.
  • A step that preview showed to send such a request is not run in production; production stops before it and the rest of the scenario is preview-only.
  • Controls whose accessible name contains a word from analysis.destructiveDenylist (delete, pay, send, …) are never activated in production.

Each production checkpoint is captured twice, so differences that occur between two loads of the same site can be told apart from real changes.

Scenario statuses: compared (ran in both), preview_only, reduced_for_safety, precondition_unavailable (a required seed set or profile is missing in that environment), not_authorized, skipped_limit (left out by budgets.limits.maxScenarios), failed, invalid.

By default every planned route gets its interaction scenarios: those derived from what its page offers (forms, dialogs, filters, selects, links). budgets.limits.deriveOn: changed_routes (opt-in) makes a review faster by running them only on routes the pull request changes:

  • A route counts as changed when a changed file is anywhere in its import graph: its page module, or a component, hook or utility the page imports, directly or through other modules, or a layout rendered for it. A shared component changes every route that imports it.
  • Every route counts as changed when the change is global or cannot be placed: a global stylesheet, a design token, configuration, a package manifest or lockfile, build configuration, the route table, shared state, the application shell, or any file the import graph cannot place. Documentation, licences and test files are ignored.

The other routes are limited: they still get their load scenario, so the visual, DOM, accessibility, runtime and network checks of the loaded page still run there. What they do not get is interaction: a form submitted, a dialog opened, a filter applied. A regression that only shows after an interaction on a route the change cannot be traced to is not found. The interaction scenarios left out are listed as route_not_changed with the reason, the report notes that the setting is on and which routes were limited, and the review is not marked partial for it. The import graph is static: code reached only at run time (a dynamic import with a computed path, a route registered from data) may be missed by the mapping, which is why the default stays full coverage.

mobile-390 is captured at device pixel ratio 2 (desktop-1440 and laptop-1280 at 1). Comparison works in CSS pixels and scales masks, regions and crops by each profile’s own ratio, so the thresholds mean the same at any ratio; a change of ratio also changes the baseline cache key. A few differences show only at a ratio of 3: hairlines of 1/3 px, CSS media queries on min-resolution: 3dppx (or -webkit-min-device-pixel-ratio: 3), and srcset or image-set() candidates chosen only at 3x. A repository that depends on those defines viewports.mobile-390 with deviceScaleFactor: 3 (or adds its own profile); screenshots are then about 2.25 times larger and take longer to capture and compare.

Evidence is what was captured: screenshots, DOM and accessibility snapshots, focus order, axe results, step outcomes, runtime events, resource timings, Lighthouse results and, if retained, model input and output. Every item is stored by its SHA-256 hash, written once and checked against its hash when read. Evidence that could not be captured is an evidence gap, never a pass.

Evidence completeness (0 to 1) is the share of the evidence an observation needs that is present and comparable. Evidence is complete when the observation is not preview-only, completeness is 1, and both environments contributed evidence.

Every finding has two parts that are kept apart:

  • The observation is deterministic: what analysis code measured (kind, route, viewport, selector, region, facts, evidence ids, whether a deterministic failure was observed, a recorded environmental cause, and a severity hint). No model produces an observation.
  • The assessment is the AI part: the reasoning model’s explanation and the visual model’s description, with the model and prompt version. It is null when no model ran or its output was rejected. The visual model has no field for a verdict, and an explanation that cites evidence ids not stored for the review is discarded.

The visual model’s description is enrichment only: the reasoning model never sees it, so no classification, severity, confidence, partial flag or conclusion depends on it. A description that fails or is not attempted (an image whose sensitive regions cannot be determined is never sent) is a note in the report, not a partial reason. Because of that, the verdict does not wait for the descriptions: the check run is completed with its conclusion as soon as classification, test candidates, the report and performance are done, and the PR comment says that descriptions are being added. When they arrive, the comment is edited once to add them. The edit never touches the check run, is made only while the review is still the newest for its pull request (a push in between supersedes it and nothing is edited), and must carry the conclusion already published, or the coordinator refuses it.

The reasoning model may propose a classification and severity. The gate decides.

The gate (decide) assigns exactly one, checking these rules in order:

Order Condition Classification
1 Evidence is not complete (missing, not comparable, or preview-only) inconclusive
2 The observation carries a recorded environmental cause (masked_dynamic, data_only or self_variance) environmental_difference
3 Production is known not to be the pull request’s base commit, and the route is not one the change directly affects inconclusive
4 The model proposed intended_change citing an intent item that is accepted (see below) intended_change
5 A deterministic failure was observed (an interaction stopped working, a broken accessible name, a new runtime error, …) confirmed_regression
6 No model proposal, or the model said inconclusive inconclusive
7 Otherwise (the model judged it a change that was not intended, or proposed something the evidence does not support) unintended_change

An intent item is accepted for an observation only when every one of these holds (the rule that failed is recorded):

  • it exists and is not a “must remain unchanged” or “invariant” item;
  • it names at least one route or one category (intent_ref_unscoped): an item naming neither would match every difference;
  • the routes and categories it names include the observation’s;
  • for a deterministic failure, it names both the observation’s category and its route explicitly (intent_ref_not_explicit_for_failure);
  • its quote occurs in one visible block of the pull request, as above (intent_ref_quote_not_found); a model-inferred item’s quote must be at least 12 characters after normalisation, and without the pull request text no quote can be checked, so nothing is accepted;
  • it is not model-inferred while the pull request carries instruction-like content (intent_ref_model_item_with_suspicious_content);
  • no effective “must remain unchanged” or “invariant” item of the same intent names the observation’s category for its route, or for every route (intent_ref_contradicted_by_invariant). An invariant is effective when it was derived deterministically, or when a model inferred it and its own quote is found. An invariant naming no route (“nothing else on any page should move”) gives way only to an item that is strictly more specific: it names the observation’s route, its category and a component matching the observed element (the element’s test id, id or tag), and its quote is the author’s own words (title, description or labels), not only code of the diff. An invariant naming the route always wins.

Consequences:

  • A model alone can never produce a confirmed_regression or an environmental_difference. A proposal of confirmed_regression without a deterministic failure becomes unintended_change; a proposal of environmental_difference without a recorded cause is overridden.
  • Missing evidence never yields a negative verdict: it is inconclusive.
  • A proposal for a different observation, or one citing evidence that is not stored, is discarded before the rules run.
  • Without a reasoning model, a difference that is neither a deterministic failure nor environmental is inconclusive.

Every finding records the rules that fixed its outcome in gate.rules (for example incomplete_evidence, intent_ref_accepted, regression_without_deterministic_failure), next to the proposed and decided classification and severity.

critical, high, medium, low, info.

  1. The analysis gives each observation a severity hint.
  2. A model’s proposed severity is recorded and never applied (CLASS-015). The severity is the hint, so it does not change between runs with the model’s reply, and text injected into a pull request or a page cannot talk a regression below the failing threshold or push a difference above it.
  3. intended_change and environmental_difference are always info.
  4. A high or critical severity is lowered to medium when evidence completeness is below report.minCompletenessForHigh (default 0.9) or confidence is below report.minConfidenceForHigh (default 0.7). This is the gate’s own rule, not the model’s. For a confirmed_regression or an environmental_difference only evidence completeness counts: their confidence is not the model’s to state (below).

Confidence is 0.9 for a confirmed regression or an environmental difference with a recorded cause, whatever the model states: these outcomes are decided by recorded facts, so a model that agrees but reports a low confidence cannot lower the severity through rule 4. Otherwise it is the model’s own confidence when the gate agrees with its proposal; at most 0.8 for an unintended change; otherwise 0.5; and never above 0.5 when evidence is incomplete. A model’s stated confidence is not calibrated; treat it as the model’s own estimate.

The check conclusion (conclude):

  • failure when a confirmed_regression or unintended_change is at or above report.failOn (default high);
  • otherwise neutral when the review is partial or any finding is inconclusive;
  • otherwise success.

A partial review is never success.

A review is partial when its results cover less than was planned. The report lists every reason in partialReasons, for example: intent was not assessed by a model, scenarios did not run in both environments, evidence could not be captured, scenarios were left out by the scenario limit, differences were decided without a model assessment, or application files changed but no scenario could be compared. A review stopped by the budget ends in budget_exhausted and is marked partial.

Lighthouse runs for routes with performance: true, interleaving production and preview, analysis.performance.runs times each, and compares medians against the thresholds. A change counts only when it exceeds both the configured threshold and the larger run-to-run spread of the two sides. Verdicts: regression, improvement, within_noise, incomparable (differently configured or failed measurements, or a metric no successful run produced) and not_measured. Incomparable data never yields a verdict. INP is measured only for routes that declare interactionForInp.

A pull request pushed again while production has not changed does not need production captured again. A production execution is reused by a later review of the same repository only when every input that changes a capture is identical: the production commit, the scenario’s steps and its production stop point, the viewport profile, the browser version, the authentication profile and its version, and the analysis and masking configuration. It must also be within cache.productionTtlMinutes (default 30), production must still report that commit through its build identifier when it is reused, and every evidence hash it refers to must verify. A partial or failed capture is never reused. Reuse is noted on the scenario (“production reused from review … (execution …)”) and audited; the evidence stays where it is, under the originating review’s retention. The rules are checked by a TLA+ model (formal/cache), whose planted bug (reuse without re-reading production’s commit) produces a counterexample.

With pre-capture (off by default, maintainers only, audited), production is captured when the default branch deploys, so the first review after a deploy can already reuse it. Pre-capture executes against production before and independently of pull-request approval; see Self-hosting.

A maintainer can remember a finding: as an accepted difference or as a noise mask. An entry applies only to its route, viewport and finding fingerprint (category, kind, checkpoint, and the element or the region on a 16-pixel grid), expires (default 30 days, at most 180), and is created, renewed and removed only by a maintainer, each action audited. A matching observation is reported, never hidden: it becomes an environmental_difference with cause masked_dynamic and shows the entry, who created it and when it expires. A deterministic failure (a runtime error, a failed interaction, a new accessibility violation) is never remembered: the action is refused with deterministic_failure_not_acceptable, and the gate ignores any entry for one.

Nothing is learned automatically. When the same region varied by itself (self-variance) in at least 5 of the last 6 reviews of a route and viewport, it is only proposed as a noise mask; it applies to no review until a maintainer accepts it.

Every place a model is called has a profile (models.profiles): model, reasoning effort as the model documents it, output limit, temperature, timeout, retries and structured-output mode. Defaults favour speed: the lowest documented effort, temperature 0, and output limits of about 1.5 times the measured 95th percentile. A setting a model does not document is a configuration error, never a silently ignored parameter.

  • Images are redacted first. Before any crop goes to a vision model, configured masks, models.redaction.selectors and every element whose text the redactor finds a secret in are filled with an opaque colour in the image itself. An image whose sensitive regions cannot be determined is not sent (image_not_redactable).
  • A cut-off reply is never parsed. It is repaired once with double the output limit; cut off again, its observations are decided without an assessment (model_output_truncated). A refusal is recorded as model_refused and not parsed either.
  • Repairs show the model its own reply. A retry after invalid output carries the previous reply and the validation errors.
  • Fallback is recorded. A role’s fallback model answers only after its own model is unavailable through all attempts, and every record names it.
  • Calls the gate does not need are skipped. An observation whose outcome the gate fixes whatever a model says (incomplete evidence, a recorded cause, a baseline mismatch, a deterministic failure no intent item names by category and route) is not sent; its finding records no_assessment_needed.

Every model call and every other metered operation is an entry in an append-only, hash-chained spend ledger, priced in integer micro-dollars from a dated price table; a review’s budget is settled with exactly the sum of its entries. Amounts are estimates; the provider’s billing is authoritative. See Self-hosting.

verification/evals holds versioned datasets and runners:

  • Adversarial set (adversarial/v1): instruction-like pull-request and page text, invented evidence, low-confidence agreement, broad or injected intent items, refusal and truncation bait, each paired with an injection-free twin. Every case’s gate outcome must equal its twin’s; it runs on every pull request with recorded replies.
  • Replay set (replay/v1): the model requests the engine really sent on the golden variants and the replies they got, with per-class precision and recall after the gate, regression recall at or above failOn, intent coverage, citation validity, first-try schema validity and refusal rate, checked against thresholds stored with the dataset.
  • Judge: a versioned rubric (faithfulness, specificity, actionability, verdict leakage) for text the gate does not decide. The judge’s model family must differ from the classifier’s; its scores of its own family’s output are advisory. A criterion is used only once its agreement with human labels reaches Cohen’s kappa 0.6. No human labels exist yet, so the judge is uncalibrated and gates nothing.
  • Bake-off: every candidate model and effort over the replay set; a default profile changes only with a passing report.

Live runs need model credentials and are reported as skipped without them.