Skip to content

QA mode vs production mode

Quameleon has one signal stream and two sinks. The envelope, signal kinds, props and on-device redaction are identical in both modes; only where the signals go, and which capabilities are on by default, differs.

QA mode is the default. The SDK is dormant: it starts no socket, thread, buffer or hook until the app process is launched with a run token.

  • The token is random, at least 16 characters, generated per run by the host, and never persisted. It can carry an expiry (quameleon_token_expires, default one hour from launch).
  • The SDK serves NDJSON on 127.0.0.1 only, by default on port 47321. The host reaches it through adb forward on Android or directly on the iOS simulator.
  • Every capability is on, including replay frames, screenshots on errors, the live view hierarchy and layout snapshots, because a host is there to ask for them.
  • Every signal carries the host’s current action_id, so an assertion is about what this step caused.
  • The host can drive the app (act): taps, typing, swipes and back, on Android and on iOS Simulators (see platform parity). The live hierarchy covers every visible window of the app, top-most first, and __idle waits for all of them. Both are QA-only: production mode never accepts host input.

Production mode is opt-in: the app calls startProduction(...).

  • Signals go to an on-device spool, then over HTTPS to Quameleon Cloud or a self-hosted backend.
  • An API key identifies the project and environment.
  • The privacy-heavy capabilities are off by default: console capture, network bodies, screenshots, layout snapshots, shake-to-report and push content. Only your app’s own configure() can turn them on; remote config can only turn them off (a remote “off” wins over your setting for the rest of the launch).
  • Session replay is off unless your app opts in (replay: { sampleRate } in the start config) and remote config enables it, and then only for a sampled share of sessions, with every input masked. The live view hierarchy is never available in production because it is host-driven.
  • session_id is one app launch; user_session_id spans launches (see Sessions).

Whichever mode starts first wins, and the other call returns false. The usual pattern is:

if (!Quameleon.isActive()) Quameleon.startProduction({ ... });

A QA run can only start in a QA build (debuggable, or QA_ACTIVATION=true) and, on Android, only when the test host provisioned it over adb. In such a build a QA run is already active at launch, so it stays in QA mode. Store builds never activate QA mode, so production always wins there.

Build What to do
QA-only SDK (no production mode) The Expo plugin refuses store profiles, and the Gradle plugin’s quameleonVerify<Variant> task fails a release build that contains SDK classes.
Store build with production mode Opt in with production: true (Expo plugin) or production.set(true) (Gradle plugin). QA activation is then baked off in every non-QA build: dev.qualgent.quameleon.QA_ACTIVATION=false on Android, QuameleonQAActivation = NO on iOS. The QA activate() refuses.
Any Android build Fail closed: QA activation needs a debuggable build or QA_ACTIVATION=true, plus the host’s adb shell settings put global quameleon_qa_token commitment. Launch extras alone never activate.
Capability QA mode Production mode
taps, gestures, screens, lifecycle on on
network (method, URL without query, status, timings) on on
errors, crashes, hangs, exits on on
launch, vitals, device state, action latency on on
spans, context, feature flags on on
console (warn, error) on off; your configure() can enable, remote config only disable
network bodies and headers off; allowlist URL patterns off; your configure() allowlists, remote only disables
replay frames on when the host asks off; needs your replay opt-in, then remote config enables and samples
screenshots on error, hang, bug report on off; your configure() can enable, remote only disable
layout snapshots (wireframes) on off; your configure() can enable, remote only disable
live view hierarchy on never
shake to report a bug off off