Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

test: run all desktop checks but only tagged phone flows

leepokai6869d2a9d20d
diff --git a/.agents/skills/after-change/SKILL.md b/.agents/skills/after-change/SKILL.md
index 1c624829..fa1106a7 100644
--- a/.agents/skills/after-change/SKILL.md
+++ b/.agents/skills/after-change/SKILL.md
@@ -52,7 +52,7 @@ Give one tester (or yourself) the final change, exact flows and E2E mode. Read t
- Stop only this task's old app/host processes before rebuilding or installing. Never stop the shared Codync Dev, production app, or another session's sandbox. Track what you start.
- Prefer `npm run dev` in `apps/desktop` in the change's isolated worktree. When testing from the shared checkout, use its documented sandbox mode. Restart for main-process/preload changes. Package only when the flow needs capabilities unavailable unpackaged.
- When `host/` is unchanged, reuse a compatible built host through `CODYNC_HOST_BIN` as the development guide describes. When it changed, build the correct host for this worktree. Apple build output stays in this checkout's `build/dd`.
-- Walk the changed flows on the actual apps as the [test stack](../../../docs/guides/test-stack.md) says: the desktop with Playwright (`npm run e2e` against `npm run dev -- --cdp`), the phones with one Maestro run under the Maestro lock (`apps/maestro`, `--shard-all`), adding or updating the spec or flow each changed flow needs, and Computer Use only for the native steps that guide lists. iPhone checks use the worktree's own iOS Simulator (`Codync <sandbox name>`: `npm run dev` prints its udid, or the command that creates it when there is none yet; `npm run dev -- --prune` deletes it); Android checks use the shared `codync_worktree` emulator (never `codync_api36`, the maintainer's), one test at a time under its lock, with `pm clear` and the notification grant first ([test devices](../../../docs/guides/dev-app.md#worktree-sandboxes)). Builds and unit tests do not substitute for UI checks. No changed client UI here means no UI parity work.
+- Walk the changed flows on the actual apps as the [test stack](../../../docs/guides/test-stack.md) says: the desktop with the whole Playwright suite (`npm run e2e` against `npm run dev -- --cdp`); the phones with one Maestro run under the Maestro lock, only the `smoke` flows plus the tags of the areas the change touches (`--include-tags`, `--shard-all`), never the whole Maestro suite for now; Computer Use only for the native steps that guide lists. Add or update only the spec or flow each changed flow needs and touch no other test. Edit an existing test only for a reason that matches the behavior the change says it changes, and list each such edit with its reason; without such a reason the failing test found a regression, so report it as a fail instead of changing the test. iPhone checks use the worktree's own iOS Simulator (`Codync <sandbox name>`: `npm run dev` prints its udid, or the command that creates it when there is none yet; `npm run dev -- --prune` deletes it); Android checks use the shared `codync_worktree` emulator (never `codync_api36`, the maintainer's), one test at a time under its lock, with `pm clear` and the notification grant first ([test devices](../../../docs/guides/dev-app.md#worktree-sandboxes)). Builds and unit tests do not substitute for UI checks. No changed client UI here means no UI parity work.
- Minimal E2E covers this computer's platform. Full E2E also covers installed Lima Linux and UTM Windows VMs; report absent VMs rather than creating them. Validate affected clients as required by repository instructions, and report unavailable tools/devices explicitly.
- Walk each flow once, using short bot messages. Record `platform`, `flow`, `result` (`pass`, `fail`, `preexisting`, `not_run`), and observed evidence or reason. Use `preexisting` only with evidence it fails without this change; otherwise retain the uncertainty as a failure. Never disturb another worktree to prove a baseline.
diff --git a/.claude/workflows/after-change.js b/.claude/workflows/after-change.js
index fe024bdf..1d6708e9 100644
--- a/.claude/workflows/after-change.js
+++ b/.claude/workflows/after-change.js
@@ -116,7 +116,7 @@ ${JSON.stringify(refactors, null, 2)}
const walk = (flows, round) => agent(`End-to-end test a code change on the real apps, ${e2e} e2e as CLAUDE.md "End-to-end test every change" defines it (minimal: only this computer's platform; full: also Lima Linux and the UTM Windows VM, skipping and reporting a VM that isn't installed).
${scope}
${flows}
-Walk each flow once, as a person would, until it clearly passes or fails, and note what you saw; don't explore beyond the listed flows. Drive them as docs/guides/test-stack.md says: the desktop with Playwright (\`npm run e2e\` in apps/desktop against \`npm run dev -- --cdp\`), the phones with one Maestro run under the Maestro lock (\`apps/maestro\`, \`--shard-all\`), adding or updating the spec or flow each changed flow needs; Computer Use (cluadex) only for the native steps that guide lists. Keep it quick: short messages to bots, no sleeps or long-running tasks to stretch a turn, and when \`host/\` is unchanged start \`npm run dev\` with \`CODYNC_HOST_BIN\` pointing at an already built host instead of building one (docs/guides/dev-app.md). A failure the change didn't cause (the same without it) is \`preexisting\`, not \`fail\`. Stop the old build before installing the new one. In this worktree \`npm run dev\` in apps/desktop runs an isolated sandbox (docs/guides/dev-app.md#worktree-sandboxes); never stop or replace the shared Codync Dev, the production Codync app or another session's sandbox. In a worktree every client signs into the sandbox's Clerk test account, never the maintainer's: the sandbox runs with \`--cloud\`, and the iPhone and Android apps are seeded with \`npm run phone-account -- --ios <udid>\` / \`-- --android <serial>\` on the worktree's test devices: the iPhone on its own simulator \`Codync <sandbox name>\`, never one signed into the maintainer's account (\`npm run dev\` prints its udid, or the command that creates it when there is none yet; \`--prune\` deletes it later), Android on the shared \`codync_worktree\` emulator (never \`codync_api36\`, the maintainer's), one test at a time under its lock, with \`pm clear\` and the notification grant first (docs/guides/dev-app.md#worktree-sandboxes). When done, leave this worktree's \`npm run dev\` running (it is stopped after the merge) but stop anything else you started. A change with nothing to walk (CI, tools, docs) reports one not_run check saying so.`,
+Walk each flow once, as a person would, until it clearly passes or fails, and note what you saw; don't explore beyond the listed flows. Drive them as docs/guides/test-stack.md says: the desktop with the whole Playwright suite (\`npm run e2e\` in apps/desktop against \`npm run dev -- --cdp\`); the phones with one Maestro run under the Maestro lock, only the flows tagged \`smoke\` plus the tags of the areas the change touches (\`--include-tags\`, \`--shard-all\`), never the whole Maestro suite for now; Computer Use (cluadex) only for the native steps that guide lists. Add or update only the spec or flow each changed flow needs and touch no other test. Edit an existing test only for a reason that matches the behavior the change says it changes, and list each such edit with its reason in the check's evidence; without such a reason the failing test found a regression, so report it as a fail instead of changing the test. Keep it quick: short messages to bots, no sleeps or long-running tasks to stretch a turn, and when \`host/\` is unchanged start \`npm run dev\` with \`CODYNC_HOST_BIN\` pointing at an already built host instead of building one (docs/guides/dev-app.md). A failure the change didn't cause (the same without it) is \`preexisting\`, not \`fail\`. Stop the old build before installing the new one. In this worktree \`npm run dev\` in apps/desktop runs an isolated sandbox (docs/guides/dev-app.md#worktree-sandboxes); never stop or replace the shared Codync Dev, the production Codync app or another session's sandbox. In a worktree every client signs into the sandbox's Clerk test account, never the maintainer's: the sandbox runs with \`--cloud\`, and the iPhone and Android apps are seeded with \`npm run phone-account -- --ios <udid>\` / \`-- --android <serial>\` on the worktree's test devices: the iPhone on its own simulator \`Codync <sandbox name>\`, never one signed into the maintainer's account (\`npm run dev\` prints its udid, or the command that creates it when there is none yet; \`--prune\` deletes it later), Android on the shared \`codync_worktree\` emulator (never \`codync_api36\`, the maintainer's), one test at a time under its lock, with \`pm clear\` and the notification grant first (docs/guides/dev-app.md#worktree-sandboxes). When done, leave this worktree's \`npm run dev\` running (it is stopped after the merge) but stop anything else you started. A change with nothing to walk (CI, tools, docs) reports one not_run check saying so.`,
{ label: `e2e:${round}`, phase: 'E2E', schema: CHECKS })
phase('E2E')
diff --git a/apps/maestro/welcome.yaml b/apps/maestro/welcome.yaml
index fa3bfac8..854a08ca 100644
--- a/apps/maestro/welcome.yaml
+++ b/apps/maestro/welcome.yaml
@@ -1,7 +1,10 @@
# A fresh install opens on the welcome screen with every sign-in choice.
# One flow for iPhone and Android; run it on both at once (docs/guides/test-stack.md):
-# maestro --device "<simulator udid>,<adb serial>" test --shard-all 2 apps/maestro
+# maestro --device "<simulator udid>,<adb serial>" test --shard-all 2 --include-tags smoke apps/maestro
appId: com.pokai.Codync.ios.dev
+tags:
+ - smoke
+ - onboarding
---
- runFlow:
when:
diff --git a/docs/guides/test-stack.md b/docs/guides/test-stack.md
index 742b7426..5c4bb9fc 100644
--- a/docs/guides/test-stack.md
+++ b/docs/guides/test-stack.md
@@ -16,14 +16,19 @@ npm run e2e # in a second shell: e2e/*.spec.ts against that sandbox
## Phones: Maestro
-One flow in `apps/maestro/` serves both phones: it launches the iPhone or Android Dev app by platform (`runFlow` with `when: platform`) and asserts the same copy, since the apps match screen for screen. Run every phone in one Maestro process:
+One flow in `apps/maestro/` serves both phones: it launches the iPhone or Android Dev app by platform (`runFlow` with `when: platform`) and asserts the same copy, since the apps match screen for screen. Run every phone in one Maestro process, with the tags [the check needs](#what-each-e2e-check-runs):
```sh
-maestro --device "<simulator udid>,<adb serial>" test --shard-all 2 apps/maestro
+maestro --device "<simulator udid>,<adb serial>" test --shard-all 2 --include-tags smoke,<area> apps/maestro
```
The devices are the worktree's own simulator `Codync <sandbox name>` and the shared `codync_worktree` emulator, under its lock ([worktree sandboxes](dev-app.md#worktree-sandboxes)). Install the worktree's builds first: `xcodebuild … -scheme "iOS Dev" -configuration DevDebug -derivedDataPath build/dd` for the simulator, `./gradlew :app:assembleDebug` for the emulator.
+Two things that look like failures but aren't the app's:
+
+- A tag no flow carries yet makes Maestro stop with "Include / Exclude tags did not match any Flows" and exit 1. Leave out area tags that have no flows.
+- Right after a cold boot the emulator can cover the app with "Pixel Launcher isn't responding", and the flow fails on its first assertion. Each run keeps a screenshot of the failure in `~/.maestro/tests/<run>/`: when a system dialog covers the app, clear it with `adb -s <serial> shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS` and run again. It happened twice in a row on 2026-11-03 until the dialog was cleared.
+
**One Maestro process per Mac.** Two at once break each other: with Maestro 2.1.0, an iPhone run beside an Android run made the Android driver refuse connections on port 7001 in three of three tries, and two runs starting in the same second removed each other's log folder in `~/Library/Logs/maestro`. Shard inside one run instead. Across worktrees, take the lock folder `/private/tmp/claude-$(id -u)/maestro.lock` the way the emulator lock works: `mkdir` it (it fails while another run holds it), write your worktree's path into `owner`, `rm -r` it when done; one older than an hour, or whose worktree is gone, is stale.
## What Computer Use covers
@@ -35,12 +40,29 @@ Computer Use (cluadex, in the background) checks only these steps. Tag them `@na
**Covered by none of them**, so check on a physical device and say so in the report: microphone and voice-call audio, and real APNs delivery (a simulator only simulates it with `xcrun simctl push`).
-## Rules
+## What each e2e check runs
+
+| Tool | In every `after-change` e2e | Why |
+| --- | --- | --- |
+| Playwright | The whole suite: `npm run e2e` | Each spec takes under a second, and each worktree has its own sandbox, so worktrees run it in parallel without waiting on each other. It is the regression net for host and shared-component changes, which reach every client. |
+| Maestro | Only the flows tagged `smoke` plus the tags of the areas the change touches: `--include-tags smoke,<area>,…` | A flow takes 6–12 s and the Maestro lock lets one run at a time on the Mac, so a long run holds up every other worktree. |
+| Maestro, whole suite | Not run anywhere for now | Decided on 2026-11-03 (see [Decisions](#decisions)). |
+| Computer Use | Only the changed flows' native steps | The slowest, and it holds the one screen and cursor. |
+
+Every Maestro flow carries `tags` in its header: one tag per area, named after the feature (`onboarding`, `pairing`, `composer`, …), and `smoke` on the few flows that guard the core path. The agent picks the area tags from the diff; a change it can't map to an area runs `smoke` only and says so in its report.
-- Each changed flow names the tool that covers it, and a changed flow that Playwright or Maestro can express gets a spec or flow in the same change.
+## Writing and changing tests
+
+- A changed flow that Playwright or Maestro can express gets its spec or flow in the same change. Each changed flow names the tool that covers it.
+- Add or update only the tests for the flows this change touches. Leave every other test alone.
+- Editing an existing test needs a reason that matches the behavior the change says it changes. List each such edit and its reason in the e2e report. When no such reason exists, the failing test found a regression: fix the code, not the test.
- Computer Use never runs two tasks at once. Playwright and the one Maestro run go beside it.
- Report every check that didn't run and why.
+## Decisions
+
+- **2026-11-03: no full Maestro suite for now.** Every `after-change` runs the whole Playwright suite but only the `smoke` and changed-area Maestro flows; no other step (release, nightly) runs every Maestro flow yet. The cost is that a phone regression outside the tagged areas can go unnoticed until someone walks that flow. Decide again with the maintainer before adding a full run, for example at the `dev` → `main` release once the suite has grown.
+
## Why these tools
- Playwright's Electron launch (`_electron`) is documented as experimental, and launching the app directly bypasses the sandbox. Attaching over the DevTools protocol uses the sandbox as `npm run dev` starts it, and matches where Playwright's Electron support is heading.