# Checking a rule before you ship it

URL: https://kywi-docs-production.up.railway.app/targeting/checking-a-rule-before-you-ship-it
Type: docPage

The tester proves the rule logic against signals you supply; a preview link forces an audience for whoever opens it, in two stages that behave differently.

There are two ways to check an audience before you rely on it, and they check different things: the rule tester proves the logic, a preview link shows you the page.

## The tester proves the logic, not real traffic

The rule tester runs the exact same resolver real visitors go through, but against signal values you type in — no cookies are read, nothing is written, and it checks exactly one audience per call. It answers "given these values, does this audience match" and nothing about whether a real visitor will ever actually produce those values.

## A preview link runs in two stages

Minting a preview link issues a signed link scoped to one audience and redeemable for 48 hours. That 48 hours is the life of the *link*, not of the preview: opening it sets a cookie that lives thirty seconds and drops you on the homepage. For those thirty seconds the server forces that audience's arm on every page you load, overriding whatever your own signals would have resolved.

What happens next depends on whether the site runs Kywi's browser runtime. If it does, the runtime lifts the audience id out of that cookie on the first page, keeps it for the rest of the browser tab, and takes the preview over from there — you'll see a "Previewing as:" banner naming the audience, with an Exit Preview button. If the site doesn't run the runtime, the preview simply ends when the cookie does, and nothing on screen says so.

## The browser stage only reaches module-level variant containers

Once the preview is running in the browser it can only swap arms in variant containers placed as modules, because those are the ones that ship every arm to the page. A variant band placed at section level is resolved on the server and renders only its winning arm, so past the first thirty seconds those bands show the arm *your own* signals resolve to, not the audience you're previewing. A preview that looks half-applied is usually this seam, not a broken rule.

## The browser stage keeps previewing an audience that no longer exists

The server's thirty-second override is looked up against the site's currently active audiences, so archiving or deleting the audience makes that part stop — no error, just the page you'd normally see. The browser stage doesn't do that check: it goes on forcing the same audience id for the rest of the tab's session, and the banner falls back to showing the raw id where the audience's name used to be. If a banner starts naming an id instead of an audience, that's what happened. Exit Preview — or closing the tab — is what actually ends it.

## Anyone holding the link gets the override

A preview link can be revoked before it expires, and it's scoped to the audience's own site — but it isn't scoped to a person. Anyone who has the URL gets the same forced arm you do, so treat it the way you'd treat any other link that shows unreleased work.

## What neither one checks

Neither the tester nor a preview link exercises consent, an A/B split, or a locked experiment winner sitting on the same section. The tester evaluates one audience in isolation; a preview link forces only the audience arm of a variant container — audience arms always win over experiment splits, preview or not. What you're checking with either tool is narrower than the full precedence a page resolves for a real visitor at runtime, which is set out in [Which version of a page a visitor gets](/targeting/which-version-of-a-page-a-visitor-gets/).
