Home / Skills / reflex-dev/reflex

prerelease-test

Run the independent pre-release QA campaign for a Reflex release train. Discovers what shipped by reading every CHANGELOG.md on the pre-release branch, checks each package actually published to PyPI, then exercises the new features end-to-end in real apps driven by a real browser using ONLY published packages, upgrade-tests reflex-examples apps from the previous stable, regression-tests reflex-ent

skillLicense: Apache-2.0 Source: reflex-dev/reflex

Install

Copy this folder into your Claude Code project (needs Node.js):

npx degit reflex-dev/reflex/.claude/skills/prerelease-test .claude/skills/prerelease-test

Or install it for every project:

npx degit reflex-dev/reflex/.claude/skills/prerelease-test ~/.claude/skills/prerelease-test

File content

Made by its original authors and shared under Apache-2.0. We show it unchanged, with credit and a link to the source. Source β†—

---
name: prerelease-test
description: Run the independent pre-release QA campaign for a Reflex release train. Discovers what shipped by reading every CHANGELOG.md on the pre-release branch, checks each package actually published to PyPI, then exercises the new features end-to-end in real apps driven by a real browser using ONLY published packages, upgrade-tests reflex-examples apps from the previous stable, regression-tests reflex-enterprise demos, audits wheel/sdist packaging, and produces a triaged FINDINGS.md plus a fix-before-release plan. Use this whenever a Reflex release is being prepared or checked β€” the user mentions a pre-release, an alpha/beta/rc, an `r/pre-*` branch, "about to release", release QA, validating a release candidate, or re-verifying that release-blocking fixes landed in a newer alpha. Also use it for the narrower slices on their own: smoke-testing published packages, upgrade/regression testing example apps against a new version, or auditing that packages ship their `.pyi` stubs in both wheel and sdist.
---

# Reflex pre-release testing

This skill runs the QA campaign that stands between a pre-release and a release: independent,
adversarial, end-to-end exercise of what actually got published, from the perspective of a user
who runs `pip install reflex` and opens a browser.

Its value comes from three habits, not from breadth of assertions:

1. **Only published packages.** Everything installs from PyPI into throwaway venvs. The checkout
   has unreleased code, different metadata, and a different dependency graph β€” testing it tells
   you nothing about what users will get, and a package that failed to publish is itself a
   release blocker you would otherwise miss.
2. **Baseline against the previous stable.** A defect that also reproduces on the last release is
   a bug; one that only reproduces on the new version is a regression and usually a blocker.
   Without the baseline run you cannot tell them apart, and the triage that follows is guesswork.
3. **Adversarially verify before reporting.** Have a second agent reproduce each claimed issue
   from the written repro alone and actively try to refute it. In practice this refutes or
   reclassifies a meaningful share of findings β€” and it is what makes the report trustworthy
   enough for maintainers to act on directly.

## Where the work lives

Campaigns run on the long-lived branch **`testing/prerelease`** (`main` + a `prerelease-testing/`
directory, never merged back). It is this skill's working memory between releases:

- `prerelease-testing/REGISTRY.md` β€” every finding of every past pass with its current status and a
  "re-verify on every pass" shortlist. Read it before scoping; re-verified items are half the pass.
- `prerelease-testing/fixtures/<area>/` β€” reusable apps, drivers and probes with their expected
  results on the latest release. Copy a fixture to scratch and run it there; extend it rather than
  rebuilding from scratch.
- `prerelease-testing/runs/<date>-v<version>/` β€” the current pass (below). At close-out, move its
  top-level docs into `history/`, fold improved fixtures into `fixtures/`, update `REGISTRY.md`, and
  delete the rest.

At the start of a pass: `git fetch origin && git rebase origin/main` on the branch, then
`git push --force-with-lease`. Nothing outside `prerelease-testing/` changes there, so it never
conflicts. If the branch does not exist yet, create it from `main` with the same layout.

## Deliverables

Produce these under `prerelease-testing/runs/<date>-v<version>/` and commit them to
`testing/prerelease` as you go (never to `main`):

- `CAMPAIGN_STATE.md` β€” what is under test, the change table with risks, the re-verify list, items
  and port ranges, environment. Agents read it first.
- `AGENT_BRIEF.md` β€” `references/agent-brief.md` with every placeholder filled.
- `FINDINGS.md` β€” executive summary, re-verification table, numbered findings with repro + evidence
  + regression status, refuted claims, and per-cluster summaries. Templates: `references/reporting.md`.
- `RELEASE_PLAN.md` β€” triage into fix-before-release vs file-as-issue. Rubric below.
- One directory per test cluster (and per verifier) containing the sample app sources (no `.web/`,
  `node_modules/`, venvs), the driver scripts, `NOTES.md` with exact rerun commands, and only the
  trimmed logs and screenshots that are evidence for a finding.

Keep bulk out of git: about 2 MB per cluster and 10 MB per pass. Full logs, frame dumps and
screenshots stay in the scratch dir. (A past archive reached 320 MB in six weeks by committing every
run output, which made it useless as a reference.)

Findings must be reproducible by a stranger from `NOTES.md` alone. That is the bar: a fix agent
gets handed the finding and nothing else.

## Phases

Work these in order. Phases 2–5 can overlap; 0 and 1 gate everything.

### Phase 0 β€” Scope discovery

Find the pre-release branch (`git ls-remote --heads origin 'r/pre-*'`, or the user names it), then
read **every** `CHANGELOG.md` on it: the root one plus `packages/*/CHANGELOG.md`. The top entry of
each is what this train ships. A release run can leave several `r/pre-*` branches with the same
date, one per materialization step; the one to test is the branch whose head carries the release
tag (`git tag --points-at origin/<branch>`). Use the tag as `<git-ref>` from here on, and list
`git log --oneline v<prev>..v<new>` for the change table β€” the changelog links issue numbers, which
do not always match the PR that shipped.

Run the discovery script to extract every package's version and confirm each is published:

    uv run --script .claude/skills/prerelease-test/scripts/check_release_versions.py --ref <git-ref>

(Script paths in this skill are repo-root-relative β€” the repo has its own unrelated `scripts/`
directory, so the prefix matters.) It exits 1 when a package is confirmed missing and 2 when a
check could not complete, so a proxy hiccup never reads as a missing package. An unpublished
version is a finding in its own right β€” report it immediately rather than working around it.

Read the linked PRs for anything whose intent is not obvious from the changelog line; the GitHub
MCP tools (`mcp__github__pull_request_read`) do this well. Understanding what a change was *for*
is what lets you test it as a user rather than as a checklist.

### Phase 1 β€” De-risk with a smoke test

Build the campaign's venvs first, from a neutral directory (never from the checkout). This
example installs reflex-enterprise from PyPI; to use a user-supplied offline wheel instead, replace
the `ENT_SPEC=...` line with `ENT_WHEEL=<path to the wheel> \`:

    export SB=<scratch dir>
    cd "$SB" && NEW_VERSION=<new> PREV_VERSION=<prev> CTRL_VERSIONS="<positive-control versions>" \
      ENT_SPEC='reflex-enterprise[mcp]==<ent>' \
      <checkout>/.claude/skills/prerelease-test/scripts/bootstrap_envs.sh "$SB" --enterprise

It builds `new`, `prev`, `ctrl-<X>`, `driver`, `new-ent`, `prev-ent` under `$SB/envs/`, and prints
every reflex package each one resolved. A final `prev` resolves without pre-releases, and with
every reflex package it requires held to that release's upload time. Otherwise the previous
release's `>=` sibling floors resolve to the new train's alphas or finals, and the "baseline"
quietly runs half the code under test. Check the printed versions before trusting a baseline.

Before any fan-out: `$SB/envs/new/bin/reflex init --template blank`, `$SB/envs/new/bin/reflex run`,
then drive it in Chromium with the driver venv
(`$SB/envs/driver/bin/python <checkout>/.claude/skills/prerelease-test/scripts/drive_app.py`), in
dev and in prod. This shakes out environment problems (proxy, bun installs, browser path) once,
in a context where you can debug them, instead of inside ten parallel agents. A dev server's first
page load can take longer than the driver's settle time; pass an `expect_text` action on text the
page must show.

The scripts carry PEP 723 metadata, so `uv run --script <path>` runs each one in its own isolated
environment (the driver pulls in playwright that way); running them with an existing driver venv's
interpreter works too.

Then check that what PyPI serves is what the tag contains, and how it resolves:

    cd "$SB" && uv --no-config run --script <checkout>/.claude/skills/prerelease-test/scripts/check_wheel_sources.py \
      --repo <checkout> --base v<prev> --ref v<new> --site-packages $SB/envs/new/lib/python3.*/site-packages

It compares every source file changed between the two tags with the installed copy, and reports
files missing from the install, which is expected only for unpublished workspace packages. Also
read the published `reflex` wheel's `Requires-Dist`, and do a stock `pip install reflex==<new>`
(no `--pre`). A sibling floor below the train's version (`reflex-components-core>=<prev>`) means
a user who upgrades only `reflex` keeps the old sibling and none of its fixes. That is a
maintainer decision for the final, so report it.

### Phase 2 β€” Feature exploration fan-out

Decompose the changelog into clusters of related changes and give each to its own agent, with an
adversarial verification stage behind it. See `references/clusters.md` for how to cut the clusters
and a standing coverage list; `references/orchestration.md` for the Workflow script, schemas and
port map.

The instruction that makes this productive: **real-world exploration, not coverage filling.**
Combine each new feature with the things users actually combine it with β€” State vars,
`rx._x.client_state`, `rx.ComponentState`, `@rx.memo` wrapping, `rx.foreach`/`rx.cond`, event
chains, background tasks, multiple pages and navigation, dev *and* prod mode. Bugs live in the
interactions, and the original PR's tests already cover the happy path.

Every run inspects all four channels: server log, browser console (errors *and* warnings), network
tab (failed requests, 4xx/5xx), and the rendered page. Findings frequently show up in a channel
nobody asserted on.

### Phase 3 β€” Upgrade regression

Users upgrade in place; that path has its own failure modes (lockfile migration, pruned packages,
stale `.web/`). Clone `reflex-dev/reflex-examples`, pick apps that span the feature surface β€”
including ones using third-party packages (`reflex-local-auth`, `reflex-global-hotkey`) and
`reflex[db]`/API apps β€” then for each:

1. Install the **previous stable** (no `--prerelease` flag, so requirements resolve as a user's
   would), run it, and drive its real user flows in the browser. This is your baseline.
2. Upgrade the *same* venv and *same* app directory in place to the new version, preserving
   `.web/` and `reflex.lock/`. Watch the first run's log closely β€” that is where migration
   happens. Re-drive the identical flows and compare.
3. Do one cold run (`rm -rf .web`) to check the fresh-install path converges to the same state.

Diff `.web/package.json` before and after; unexpected dependency changes are findings.

### Phase 4 β€” Enterprise regression

Downstream breakage is the most common release blocker, because removing a public name is
invisible until something imports it. Install the **published** `reflex-enterprise` (never the
checkout) against the new reflex and run its demos β€” ag-grid, map, dnd, mantine, flow, the MCP
plugin, OIDC. Baseline against the previous stable whenever something fails, so you can say
whether the new release broke it.

Before running anything, grep the published enterprise wheel for names the changelog says moved,
were removed, or were deprecated (a deprecated API rxe still calls prints a warning its users cannot
fix). Grep it too for its own copies of logic the train changed. A security change in core,
such as client-IP resolution, header handling or credential redaction, is only as good as every
parallel surface: rxe's REST event API, MCP and rate limiters each resolve the same values their own
way. Drive the same handler over the websocket and over the REST API and compare what it sees.

If the user supplies an enterprise build with fixes (an offline wheel), re-run the original repro
against it, with the previous rxe on the same reflex as the positive control.

### Phase 5 β€” Packaging audit

Audit every package in the train; the discovery script feeds it the whole list. Chain the two with
`&&`, never a pipe β€” a pipe reports only the audit's exit status, so a package whose PyPI check
never completed would be dropped from the list and the audit would still print PASS over what was
left. The `&&` is what makes that impossible: the audit runs only when discovery exits 0.

    uv run --script .claude/skills/prerelease-test/scripts/check_release_versions.py \
      --ref <ref> --specs > specs.txt \
      && xargs uv run --script .claude/skills/prerelease-test/scripts/audit_pyi.py \
        --manifest-ref <ref> < specs.txt

It verifies each package ships its own generated `.pyi` stubs in **both** wheel and sdist, that
they are byte-identical between the two, that no package leaks another package's stubs, and that
counts line up with `pyi_hashes.json` (a package absent from the manifest must ship none).

Stub content hashes legitimately differ from the committed manifest because the build hook
regenerates them at release time β€” compare *presence and counts*, and wheel against sdist.

The audit reads the published files; it does not build. A wheel built *from* an sdist runs the
stub hook again in an isolated build env. For an alpha train, that env resolves the hook's unpinned
`reflex-base` to the newest final, and modules that need the alpha's new symbols silently lose
their stubs. Build each changed component sdist once and count the `.pyi` files against the
published wheel. Use a throwaway uv cache, because uv reuses a cached sdist build for later
ordinary installs of the same version and would taint every venv built after it:

    UV_CACHE_DIR=$SB/uv-sdist-cache uv --no-config pip install --python <throwaway venv> \
      --prerelease=allow --no-binary <pkg> <pkg>==<version>
    find <throwaway venv>/lib/python3.*/site-packages/<module> -name '*.pyi' | wc -l

### Phase 6 β€” Triage and report

Write `FINDINGS.md` first (everything confirmed), then `RELEASE_PLAN.md` splitting findings into:

**Fix before release** β€” anything meeting one of:
- a confirmed regression against the previous stable,
- security-relevant (path traversal, unauthenticated input handling, injection),
- significant user impact, or trivially small to fix (a one-line guard, a missing default).

**File as issues, fix after** β€” everything else, including pre-existing defects the campaign
happened to surface. Downstream (enterprise) issues go to that project's tracker, not this repo's.

Also flag decisions only a maintainer can make β€” an undocumented behavior change is either a bug
or a missing changelog entry, and which one it is is their call. Ask rather than assume.

### Phase 7 β€” Re-verify the next build

When a new alpha ships with the fixes, re-run the *original failing repro* for each finding
(not just the unit tests) against the new published packages, plus a general smoke. Append the
pass/fail table to `FINDINGS.md`. When the final ships, do one last stock-install smoke:
`pip install reflex==<final>` with no prerelease flag, init, run, browser, and confirm the
resolved graph is all-final.

## Working rules

- **Isolation.** Every agent gets its own venv and its own reserved port range; never install into
  a shared venv. See the port map in `references/orchestration.md`.
- **The traps are real.** `references/agent-brief.md` is the brief to hand every agent β€” it carries
  the environment gotchas (checkout shadowing, proxy variables breaking installs) and the list of
  known-benign console noise. Agents that skip it rediscover the same problems and report noise as
  findings.
- **Concurrency.** Dev servers are heavy (bun + vite + granian). On a 4-CPU box run about two
  agents at a time and one dev server per agent; more just makes everything slow and flaky.
- **Commit as you go.** Each cluster's artifacts land on `testing/prerelease` when that cluster
  finishes, and a periodic commit of the run directory covers the agents still writing. A long
  campaign outlives usage limits and container restarts, so it must never be one unrecoverable
  batch. See "Surviving interruptions" in `references/orchestration.md`.
- **Never fix framework code during the campaign.** Testing and fixing are separate engagements
  with separate review standards; mixing them costs you the independence that makes the findings
  credible. Record the repro and move on. (If the user then asks for fixes, that is a new task β€”
  one PR per finding, regression test first, `references/reporting.md` has the PR conventions.)

## Scaling the campaign

Full campaign is roughly 30 agents over several hours. Scale down by dropping whole phases rather
than by testing each phase more shallowly β€” a shallow pass produces false confidence:

- **Quick check** (~30 min): phases 0, 1, 5, plus grep-based downstream checks from phase 4.
- **Standard** (~2 h): add phase 2 over the three or four highest-risk clusters.
- **Full**: everything, with adversarial verification on every claimed issue.

Ask the user which they want if the request is ambiguous and the difference matters.