release-bundle-testing

A guide for checking that Rozenite development code is left out of a released app bundle. A bundle is the compiled JavaScript shipped to users.

In plain words
What is it for?
Use it to add plugin tests for both DevTools panels and bundler integrations, confirming that the relevant Rozenite modules are absent from release builds.
Why use it?
It prevents debugging panels and related development code from increasing the production app or reaching end users.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/callstackincubator/rozenite/release-bundle-testing
Clone the repo
git clone --depth 1 https://github.com/callstackincubator/rozenite
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,599 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01599
Opus 5 $0.00000 $0.00800
Sonnet 5 $0.00000 $0.00320
Haiku 4.5 $0.00000 $0.00160

Measured yesterday against content hash b51900927bbb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

release-bundle-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/release-bundle-testing.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Release bundle testing

Rozenite is a development tool. Whatever a project wires into its bundler config, a release build must ship none of our code. @rozenite/test-utils provides the bench that proves it, and every plugin owns a Vitest suite in src/__tests__/release-bundle.test.ts that uses it.

These guards belong to plugins. A plugin is what an app installs and what carries a DevTools panel, so it is where a leak would reach a shipped app. Bundler packages (@rozenite/metro, @rozenite/web) are not guarded this way -- they ship no panel, and the behaviour that matters about them is already covered by the plugin guards that wire through withRozenite.

There are two guard shapes; a plugin may need both.

  1. Panel guard -- for every plugin an app can import. Bundle an app that requires the plugin's React Native entry and assert panelModules is empty. The plugin's own React Native code is expected in the bundle: an app asked for it. Its DevTools panel never is.
  2. Bundler integration guard -- for plugins exporting ./metro. Bundle with the integration applied and assert rozeniteModules is empty.

The bench

bundleForRelease() creates a throwaway app in a temp directory, bundles it through Metro's JavaScript API with dev: false, and reports what ended up inside:

import { bundleForRelease, RELEASE_BUNDLE_TIMEOUT } from '@rozenite/test-utils';
import { withRozenite } from '@rozenite/metro';

it(
  'leaves no Rozenite code in a release bundle when disabled',
  async () => {
    const result = await bundleForRelease({
      projectType: 'expo', // or 'react-native' (default)
      resolveFrom: packageRoot,
      configureMetro: (config) =>
        withRozenite(config, { enabled: false, enhanceMetroConfig: withMyPlugin }),
    });

    expect(result.rozeniteModules).toEqual([]);
  },
  RELEASE_BUNDLE_TIMEOUT,
);
  • projectType picks the default config: @react-native/metro-config (React Native CLI) or expo/metro-config.
  • configureMetro applies the integration under test. It accepts anything a Metro config transformer returns, including the function withRozenite produces.
  • resolveFrom should be the root of the package under test, so its own @rozenite/* dependencies resolve from the fixture.
  • files replaces the fixture's sources when a case needs the app to import something.

Read the full file on GitHub · 155 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 155 lines · 0 tokens per session scan A b51900927bbb

Subscribe to this mod's changes

release-bundle-testing is an agent published in the GitHub repository callstackincubator/rozenite (653 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,599 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.