exoDocs
Decisions (ADRs)

Decisions and roadmap

ADR 0023: The Simulator gate is Exo Deploy's release gate

Renamed (Samir, 2026-11-03 13:42 EST): the gate, its runs and its bots are the Simulator gate, Simulator runs and Simulator bots. Preflight already displayed as Simulator (Fleet v3), so both are one squad, Simulator (repo-checks), in Exo Deploy. Commands: exo-simulator simulator, simulator-required, simulator-approve, EXO_SIMULATOR_ENFORCE, EXO_SIMULATOR_<ROLE>_KEY; files simulator.config.json, exo.simulator.json, simulator-report.json/.md and simulator-gate/. The old names are retired with no alias (2026-11-08). The bot tenant slugs and keys are held for a production change. The text below is the decision as accepted, with the gate's name updated.

  • Status: accepted (Samir, 2026-11-01). The gate ships advisory-only: it reports and does not block until the findings from the first staging run are fixed (see Rollout).
  • Date: 2026-11-01
  • Decided by: Samir (owner)
  • Builds on: ADR 0005 (Simulator, live checks against staging), ADR 0009 (Exo Key headless tokens), ADR 0014 (secrets from Bitwarden), ADR 0016 and ADR 0017
  • Contract for apps: docs/simulator-contract.md (the Simulator contract)

Context

exo-simulator simulator (Level 1; exo-simulator simulator when this was decided) already drives Playwright over an app's routes on phone and desktop: 2xx responses, console and page errors, failed same-origin requests, axe, horizontal overflow, broken images and screenshot baselines. Construct's npm run simulator uses it. It runs against a local server before a commit lands, which is Preflight's job.

What it does not do is judge a deployed environment the way a release needs: it never signs in, never probes another role's or tenant's data, never looks at headers, redirects or what the JavaScript bundle leaks, and never asks whether a public page can be found. ADR 0005 promised "post-deploy live checks against staging" and "a staging-only sign-in path for bots". Nothing built that yet.

Decision

  1. The Simulator gate moves to Exo Deploy as its release gate. exo-simulator simulator --target <url> --persona journey,design,security,growth --gate runs against a deployed URL and writes simulator-report.json (schemas/exo-simulator-report.schema.json) plus a markdown summary. It is report-only by default. Enforcement is an explicit switch: --gate, or EXO_SIMULATOR_ENFORCE=1 (legacy EXO_SIMULATOR_ENFORCE=1) in the runner's environment, makes it exit 1 on any blocking finding.

  2. Preflight stays the per-commit checks: contract, static, security scanners, the local exo-simulator simulator and review. Nothing in Preflight changes. (Since 2026-11-03 these checks and the gate are one squad, Simulator.)

  3. Four personas, one policy (the Explorer LLM persona is deferred; see below):

    PersonaChecksBlocks on
    Journeythe crawl's reachability (2xx, console/page errors, failed requests) and scripted journeys per role, with a Playwright trace eachany failure (high)
    DesignStructured Liquidity at runtime (foundation tokens, square geometry), axe serious/critical, overflow, visual diffs over the thresholdthose checks at high or worse; diffs can be approved as new baselines (exo-simulator simulator-approve)
    Securityheaders/CSP and cookies, cross-role and cross-tenant authz probes, open redirects, reflected injection on query strings and GET forms, secret/PII exposure in HTML, JS and responses; optional OWASP ZAP baselinehigh and critical
    Growthtitle, noindex, description, canonical, Open Graph, h1, lang, robots/sitemap, optional Lighthouseadvisory, except a hard fail on noindex or a missing title on a public page (noindex is expected on preview, staging and release candidate by default)
  4. When the gate is required (exo-simulator simulator-required --stage <stage> --files <list>, which takes the changed-files list as input and never calls git):

    • every promotion to Release Candidate and Production;
    • big staging deploys: a diff that touches auth, routing, the Convex schema, dependencies or infra/env, or more than 40 files;
    • not on ordinary staging deploys or previews (run it by hand when useful).
  5. Bot identities on staging. Each persona role is an Exo Imprint bot identity on staging that owns one personal Exo Key (ADR 0009), bound to the app with the least scope it needs. The gate exchanges the key for a 15-minute access token (RFC 8693 token exchange, already served at /exo-key/v1/token) and sends it as a Bearer header on same-origin requests only. The keys live in the Bitwarden Exo Staging project and reach the gate as EXO_SIMULATOR_<ROLE>_KEY (the staging pre-deploy mints per-run keys instead); the runner's only bootstrap credential is a read-only BWS_ACCESS_TOKEN for that project. Tokens and keys never reach a report. (2026-11-13: secrets provider changed to Bitwarden.)

  6. Plain CLI, any runner. The gate is a command with files in and files out. A GitHub Actions workflow is at most a thin wrapper (packages/exo-simulator/examples/simulator-gate.yml), so the same command moves to Entire runners or Exo Deploy's own worker unchanged.

  7. Libraries first. Playwright (browser, traces), @axe-core/playwright, pixelmatch/pngjs (visual diffs), Lighthouse CLI (optional) and OWASP ZAP baseline in Docker (optional). The hand-rolled parts are the persona policy, the probes that need Exo's roles and tenants (authz), and small header/SEO/secret rules where a dependency would be heavier than the rule.

Deferred: the Explorer persona

An LLM agent that explores the app freely is deferred. It adds model cost per run and non-deterministic verdicts, which a release gate should not have until the deterministic personas are trusted. --persona explorer fails with a clear message.

Unit economics (feature proposal)

Assumptions are marked; prices are list prices read 2026-11-01.

  • Cost per gated run. A full four-persona run against Exo staging took about 80 s of wall time (measured 2026-11-01, four routes on two viewports, three journeys). On a GitHub-hosted Linux 2-core runner at $0.006/min, billed per started minute (GitHub docs), plus about a minute of setup (install, Chromium), that is ~3 billed minutes ≈ $0.018 per run. With the optional ZAP baseline (assumed +3-5 min) it is ~$0.04-0.05. No model calls (Explorer deferred), so no token cost. Artifacts (screenshots, traces) are a few MB per run. Entire's runner pricing is not published yet; Interspace has Entire credit, which would cover this first.
  • Volume (assumption). ~10 apps x ~6 gated runs a month (RC + production promotions + big staging deploys) = ~60 runs, about $1.10/month (about $3/month with ZAP on every run).
  • Break-even. One escaped production regression costs at least an hour of owner time to find, fix and re-release. Valuing that hour at $150 (assumption), the gate pays for itself if it catches one regression in roughly 8,000 runs ($150 / $0.018), i.e. once in about 11 years at 60 runs/month. The first sample run on staging already found three blocking classes of issue (console errors from the report-only CSP, two axe violations, a journey gap on phone).
  • Price (accepted, Samir 2026-11-01). Exo bills the gate as a usage line in Exo Pay at $0.10 per gated run, a margin of (0.10 - 0.018) / 0.10 ≈ 82%. Tiers do not gate it; it rolls into the usage fee like every other component. A ZAP surcharge ($0.25 per run with ZAP, ≈ 80-84% margin) is still only a proposal.

Consequences

  • Every app adds a simulator.config.json (schemas/exo-simulator-config.schema.json): routes, public pages, roles, tenants, journeys and authz probes. Exo's own is in the repo root.
  • Once enforcement is on, promotion to Release Candidate or Production must attach a passing simulator-report.json (verdict pass from an enforcing run). Wiring that into the promotion command is follow-up work; until then the report is attached for information only.
  • Until the bot identities exist, role journeys and authz probes for signed-in roles are reported as not provisioned; anonymous probes still run. In --gate mode a role journey that cannot sign in blocks, so a missing bot never passes silently.
  • Visual baselines for the gate are kept per environment (__screenshots__/gate-<environment>), never compared with local renders. None are committed with the gate: the first clean run writes them, and they are reviewed before they are committed.

Rollout

  1. Advisory now. Runners call the gate without --gate; a run with blocking findings reads advisory-fail and exits 0. The example workflow passes EXO_SIMULATOR_ENFORCE from a repository variable that is unset.
  2. Fix the first run's findings on staging: the report-only CSP's upgrade-insecure-requests console error, the phone journey to /changelog, aria-prohibited-attr on the landing page and scrollable-region-focusable on /docs.
  3. Enforce once an advisory run on staging comes back pass: set EXO_SIMULATOR_ENFORCE=1 (or add --gate) for Release Candidate and Production promotions first, then big staging deploys.

Source: docs/adr/0023-exo-deploy-simulator-gate.md

On this page