Skip to Content
Platform
ShipTest before production

Test before production

Production follows every merge unless you hold it. Use staging to try a change first.

Pick the option that matches when you want to test:

You want to testUse
A pull request, before mergingStaging follows the pull request
A merge, before production gets itHold production, then release
One exact version, for longerHold staging on a version
Uncommitted changes, through your own appintrospection dev

You need: a deployed runtime (Deploy your agent) and a version ID from introspection runtimes list --runtime <slug>. Any version of the runtime identifies it. runtimes pin and unpin ask before they move staging; pass -y in scripts and CI.

Test a pull request

  1. Point staging at the pull request’s preview build:

    introspection runtimes pin <version-id> --branch pr/42

    --branch takes main or pr/<N>.

  2. Send it work:

    introspection tasks create --runtime support-agent -e staging --prompt "Refund order 1842?"

Staging moves to each new push on the pull request. When the pull request merges or closes, staging returns to the default branch on its own. To return earlier:

introspection runtimes unpin <version-id>

Hold production while staging takes a merge

  1. Pin production to the version it runs now (Roll back a release).
  2. Merge. Staging moves to the new version; production stays.
  3. Test staging as above.
  4. Unpin production. It moves to the newest good build.

Hold staging on a version

introspection runtimes pin <version-id> (or --sha <commit>) moves staging to one version until the next merge or pull request preview. To hold it, pin a commit: Pin staging → Pin to commit in the dashboard, or the API call for production with staging in its place.

Test local changes through your app

introspection dev

Tasks your app creates in development now run your local files. It needs a runtime, and offers to create one when run interactively. See Develop locally.

Verify

introspection runtimes get <version-id> -o json

environments lists where this version serves. environment_ref shows what each environment follows:

environment_ref entryStagingProduction
NoneThe newest default-branch build; the next pull request preview takes itThe newest default-branch build
main (set by pin --branch main)The newest main build; previews don’t take it—
pr/42That pull request’s newest preview, until it merges or closes—
A commit SHAHeld on one versionHeld on one version

Then confirm a staging task ran the commit you expect:

introspection conversations list --lookback 1h --filter environment=staging \ --filter recipe_git_commit_sha=<full-commit-sha>

Limits

Not supportedDo this instead
runtimes pin on productionThe CLI steers staging only. Pin production in the dashboard or the API (Roll back a release).
Real user traffic on stagingStaging gets only the tasks you send. Run an experiment in production.
A staging task on an exact versiontasks create --runtime-id <version-id> pins a version only with -e development; staging runs whatever staging serves.
Moving running tasksPins affect new tasks only.

Or ask your agent: “Point staging at pull request 42 and run three test tasks against it.”

Last updated on