← LimrunCONTENT HISTORY

Update to Limrun

Snapshot Sep 30, 2026 · 23:08 UTC · version 1.1.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "limrun-detox-testing",
  "description": "Configure, run, or debug Detox on Limrun iOS simulators. Use when attaching the Limrun Detox runtime to an app, wiring Detox mediator connectivity, or validating app/tester connections over destination tunnels.",
  "included_files": [],
  "skill_md_contents": "---\nname: limrun-detox-testing\ndescription: Configure, run, or debug Detox on Limrun iOS simulators. Use when attaching the Limrun Detox runtime to an app, wiring Detox mediator connectivity, or validating app/tester connections over destination tunnels.\nuser-invocable: true\n---\n\n# Limrun Detox\n\nUse this for Detox runtime work on Limrun iOS. Keep build concerns separate\nunless the user explicitly asks for a native build.\n\n## Components\n\n- Tester: local Node/Jest/Detox process.\n- Mediator: `detox run-server`, usually local to the agent machine.\n- App client: injected by limulator through `lim ios launch-app --runtime detox`.\n\n## CLI Flow\n\nCheck current help before running commands you have not used in this session:\n\n```bash\nlim ios tunnel --help\nlim ios launch-app --help\n```\n\nRun the long-lived mediator, tester, and tunnel from separate terminals.\nBefore using this quick path, ensure the project's `.detoxrc` reads the session\nenvironment. Detox does not consume these variables automatically:\n\n```js\nsession: {\n  server: process.env.DETOX_SERVER || 'ws://localhost:8099',\n  sessionId: process.env.DETOX_SESSION_ID || 'limrun-detox',\n}\n```\n\nThe complete configuration appears under **Detox Test Setup** below.\n\nTerminal 1:\n\n```bash\nnpx detox run-server -p 8099 -l verbose\n```\n\nTerminal 2:\n\n```bash\nlim ios tunnel \\\n  --selector localhost:8099 \\\n  --detach \\\n  --id <ios-id>\nDETOX_SERVER_URL=\"ws://localhost:8099\"\n```\n\nTerminal 3 starts the tester before the app connects:\n\n```bash\nDETOX_SERVER=\"ws://localhost:8099\" \\\nDETOX_SESSION_ID=<session-id> \\\n  npx detox test --no-start\n```\n\nThen relaunch the app from Terminal 2. `--detox-version` is optional when\nrunning from the project with `node_modules/detox`.\n\n```bash\nlim ios launch-app <bundle-id> \\\n  --id <ios-id> \\\n  --runtime detox \\\n  --detox-server-url \"$DETOX_SERVER_URL\" \\\n  --detox-session-id <session-id> \\\n  --detox-version <detox-version>\n```\n\nPrefer starting the tester before the app connects, or use the maintained orchestration in [limrun-inc/typescript-sdk `examples/detox-ios`](https://github.com/limrun-inc/typescript-sdk/tree/main/examples/detox-ios), to avoid benign mediator \"cannot forward\" noise.\nIf you manually launch the app before `npx detox test --no-start`, that mediator message is expected until the tester connects.\n\nIf tunnel start reports an active session, inspect it with `lim ios tunnel status --id <ios-id> --json`. Stop an obsolete session with `lim ios tunnel stop --id <ios-id>`, then start the declared mediator selector again.\nAn open idle tunnel does not count as instance activity, so it does not prevent\nthe simulator's inactivity timeout between test runs.\n\n## Detox Test Setup\n\n`npx detox test --no-start` still needs the normal Detox project configuration:\n\n- Pass the Detox config file and configuration name from your project (see [`examples/detox-ios/.detoxrc.cjs` in limrun-inc/typescript-sdk](https://github.com/limrun-inc/typescript-sdk/blob/main/examples/detox-ios/.detoxrc.cjs) for a reference layout).\n- Use the Limrun third-party driver: `type: '@limrun/detox/driver'`.\n- Keep `DETOX_SERVER` and `DETOX_SESSION_ID` aligned with the mediator and launch command.\n- Provide Limrun driver env such as `LIMRUN_IOS_ID`, `LIMRUN_IOS_API_URL`, and `LIMRUN_IOS_TOKEN` when screenshots or driver calls need the instance API.\n\nUse [limrun-inc/typescript-sdk `examples/detox-ios`](https://github.com/limrun-inc/typescript-sdk/tree/main/examples/detox-ios) as the maintained happy path for exact config/env wiring. Use `-l trace` on `detox run-server` only when verbose logs are not enough.\n\nFor native SwiftUI apps, a minimal Detox configuration usually looks like:\n\n```js\nconst server = process.env.DETOX_SERVER || 'ws://localhost:8099';\nconst sessionId = process.env.DETOX_SESSION_ID || 'limrun-detox';\n\nmodule.exports = {\n  testRunner: { args: { $0: 'jest' }, jest: { setupTimeout: 120000 } },\n  session: {\n    server,\n    sessionId,\n    debugSynchronization: 0,\n  },\n  apps: { ios: { type: 'ios.app', binaryPath: 'unused-by-limrun' } },\n  devices: {\n    limrun: {\n      type: '@limrun/detox/driver',\n      device: { id: process.env.LIMRUN_IOS_ID },\n    },\n  },\n  configurations: {\n    'ios.limrun': {\n      device: 'limrun',\n      app: 'ios',\n      behavior: { init: { reinstallApp: false }, cleanup: { shutdownDevice: false } },\n    },\n  },\n};\n```\n\nThen launch with `lim ios launch-app <bundle-id> --runtime detox ...` and run `npx detox test --no-start`.\n\n## Validation Signals\n\n- App connected: `detox run-server` logs `role:\"app\"` and `appConnected:true`.\n- Tester connected: the same session reaches `testerConnected:true, appConnected:true`.\n- Runtime loaded: the app connects to the mediator after the `--runtime detox` launch.\n- UI visible: `lim ios element-tree --id <ios-id>` shows the expected app screen.\n\n## Gotchas\n\n- Do not pass arbitrary env vars, app args, or injectable paths. Use `--runtime detox`.\n- `--detox-version` should match the local `detox` package version used by the tester. If omitted, `lim ios launch-app` resolves it from the current working directory; pass it explicitly when running outside the Detox project.\n- Unsupported bundled Detox versions should fail with a clear supported-version list.\n- `Cannot forward the message to the Detox client` can simply mean the app connected before the tester did.\n- For SwiftUI, prefer stable accessibility identifiers, e.g. `.accessibilityIdentifier(\"greetingText\")` with `by.id('greetingText')`; `by.text(...)` can miss labels that appear in `lim ios element-tree`.\n- Debug failures by checking `lim ios element-tree --id <ios-id>` first, then mediator logs for app/tester connection state.\n- Cleanup manual runs by stopping `detox run-server`, running `lim ios tunnel stop --id <ios-id>`, and deleting the instance with `lim ios delete <ios-id>` (`--id` is not valid for delete).\n- This does not make Detox own the iOS lifecycle; prepare or reuse the Limrun instance separately.\n"
}

SHA-256: db1740b405b73ddb77f9ace167535e5580e0be8b576f57852c255a8ff65ff6af