diff --git a/docs/releases/1.20.0.md b/docs/releases/1.20.0.md index 0b86bfb42d..396c4b1206 100644 --- a/docs/releases/1.20.0.md +++ b/docs/releases/1.20.0.md @@ -16,6 +16,7 @@ Stim Desktop and the Stim phone app ship through their own workflows; this relea - **`stim.build()` in the public API builds an app without launching it.** It builds Android APKs, iOS simulator apps and macOS apps with the same provider recipes, cache validation and build ownership as `run()`. The result is an owned workspace copy kept until `stim worktree remove`. A build-only result is recorded only in build history and in its own `build-artifact-.ndjson`, so a running app keeps its last-build record, device record and build log, and cache maintenance protects the newest succeeded build key per platform so a later `run` can reuse it. See `stim guide api`. [7d92c3395](https://github.com/appandflow/stim/commit/7d92c33955c75ab393a76672ada9e5a1d5c18fbb) - **`stim-ci build` and `buildCI` produce an app artifact without starting a runtime.** (`@stim-cli/ci`) `stim-ci build --platform ios|android|macos` calls the public build API and exports an Android APK (`app.apk`) or an Apple app archive (`app.tar.gz`, with executable modes and symlinks preserved) into `--artifacts`, with `build.json`, `result.json` and `diagnostics.json`. A later `run` in the same job can reuse the build from the same Stim cache and reports `cacheKey` and `cacheHit`. Cancellation waits for the owned build to finish cleanup and never calls workspace `stop()`. New error codes: `STIM_CI_BUILD_FAILED` and `STIM_CI_ARTIFACT_FAILED`. Importing a downloaded artifact across jobs is not supported. [90d4d10d1](https://github.com/appandflow/stim/commit/90d4d10d1197ebf389bcabf209353412303e3198) - **Memory pressure names the process that holds the memory.** When macOS reports warning or critical pressure, Stim reads `top -l 1 -o mem -n 20` and flags a process at or above the larger of 8 GiB and 25% of RAM, or 2 GiB for `fseventsd` and Watchman. The flagged process is named in the iOS boot warning and failure advice, the Android memory phase line and boot-timeout remedy, `stim doctor` (finding `memory-culprit`, skipped when `STIM_HOME` is set), and the maintenance pressure check, which stores it in `maintenance.pressure.memory.culprits` in `stim status --json` (fields `pid`, `name`, `bytes`, `command`, `note`) and shows it on the plain `status` maintenance line. A command is attached only for processes known to be safe to restart: `sudo killall fseventsd` for `fseventsd`, `stim gc --delete --cache watchman` for Watchman, and `stim gc --delete --cache gradle-daemons` for Gradle and Kotlin daemons. Stim never runs these commands itself. [8549b4ff1](https://github.com/appandflow/stim/commit/8549b4ff1ad94e90c173f602cf4c01c97a5322b4) +- **`stim status` shows what the device and launch phases wait on.** `stim status --json` `build` gains an optional `activity: { name, startedAt, percent? }`, where `name` is `booting` (the simulator or emulator boot this run started), `bundling` (from the app's bundle request on this workspace's Metro until Metro delivers it; `percent` is Metro's own progress for that request) or `waiting-ready` (the app reports its readiness pending). Plain `stim status` prints, for example, `build: ios launch (bundling JS 45%, 12s), 58s elapsed`. `launched` values are unchanged. A boot on an EAS-hosted simulator is not reported as `booting`. Stim Desktop and the phone app show the same label. [ca5b5017b](https://github.com/appandflow/stim/commit/ca5b5017b597391c70fc9b86fffc1e0143ffd9f2) - **`stim status --json` reports `doctorRuns`** on an environment: `{ ios?: { at }, android?: { at } }`, the time `stim doctor` last ran for each platform in that workspace; the field is absent until doctor has run. [465eb1c5b](https://github.com/appandflow/stim/commit/465eb1c5bf4b2a32080db83dd2cb7099d0e4e322) - **`stim guide tutorial`: the "Build on Another Mac" step is removed, the begin prompt is shorter, and a new optional last step deletes the test app.** The new `stim guide tutorial delete` section checks the `stimTutorial` marker in `{base}/app.json`, removes each linked worktree and then `{base}` with `stim worktree remove` (never `--force`), and only then runs `rm -rf "{base}"`. The tutorial version is unchanged. [b92e8bc1c](https://github.com/appandflow/stim/commit/b92e8bc1cdc2afb2253a2b6b7ad92d1da4e94757) @@ -32,6 +33,7 @@ No command, flag or setting is removed. These behaviour changes need attention. - **`stim status --watch --json` prints fewer lines.** A usage figure keeps its previously printed value until it moves by a step: an owner's `cpuPercent` by 5 points, an owner's or environment's `memoryMb` and `capacity.committedMb` by 16 MB. A line is still a complete payload. In a watch line `capacity.committedMb` is held separately from the environments' sum. [88ff46f06](https://github.com/appandflow/stim/commit/88ff46f0603110ec477007684fa9105f933a9397) - **`stim-server service install --env` values no longer appear in the server's process arguments.** (`@stim-cli/server`) Each `--env KEY=VALUE` is written to the LaunchAgent plist's `EnvironmentVariables`, and `ProgramArguments` carries only `--env KEY`, so a value such as `EXPO_TOKEN` is no longer readable with `ps`. The values stay in plain text in the plist, and launchd now also passes them to the server's own Node process, so a variable such as `NODE_OPTIONS` given with `--env` affects the server too. `service install` and `setup` refuse `--env` for `SHELL` as well as `STIM_HOME`. A plist written by an earlier release keeps its values in the arguments until the next `service install`; `service update` and `rollback` only replace the script path. [9e9f6dc4a](https://github.com/appandflow/stim/commit/9e9f6dc4a9758ccd8552c8e80b937bb683cd0abe) - **A committed `android.keystore` must resolve inside the repository.** A value in the committed `.stim.json` that is an absolute path outside the repository, or a relative path or symlink that escapes it, is no longer used: the release APK swap is skipped with a `swap` note and the run builds fresh. Set the path at workspace or repo scope to keep a key outside the repository. The Android package id read from the Expo config or `build.gradle` must now look like `com.example.app`; one that does not, such as `applicationId "${appId}"`, counts as not detected, and `stim android` refuses before any `adb` call when neither the APK nor the project names a valid package. A `__proto__` key in a committed `.stim.json` or in `config.json` project entries is ignored. [a6546a431](https://github.com/appandflow/stim/commit/a6546a431e88f7bfe6d6bedc5107730abbc5f15c) +- **On Windows, Stim refuses to run a `.bat` or `.cmd` tool whose arguments contain a double quote, carriage return or line feed**, so an argument cannot break out of the batch file's argument re-expansion. `android.deviceProfile` must now be an avdmanager id matching `^[A-Za-z0-9 ._()-]*$` (an empty value still counts as unset; real ids such as `pixel_6`, `Nexus 5X` or `10.1in WXGA (Tablet)` pass); `stim settings set` and settings validation refuse anything else. The remaining `df`, simctl, avdmanager, adb, emulator and lsof calls pass their arguments as argv instead of a shell string. [8d2ab2f91](https://github.com/appandflow/stim/commit/8d2ab2f915127fe3594b4b906a5646c4a0953847) ## Fixes @@ -48,10 +50,14 @@ No command, flag or setting is removed. These behaviour changes need attention. - `stim status` runs at most six git reads at once (the 3 s timeout starts when a read starts), and `tailscale status --json` for a hosted session is read asynchronously instead of with `spawnSync` on the main thread. Before, a one-shot `status --json` with 147 worktrees and environments spawned 147 child processes at once. [08857a71d](https://github.com/appandflow/stim/commit/08857a71d2870cbd70755ec68208964c82b8d4f1) - `stim doctor` starts its Watchman, device-host, watched-checkout and build-machine probes together, and the remote Mac toolchain comparison (Xcode, simulator SDK, login-shell Ruby, `pod --version`, simulator runtimes) no longer blocks the event loop. Findings, JSON fields and their order are unchanged. [69044fb11](https://github.com/appandflow/stim/commit/69044fb1118a66928397908d93590e26ce46f781) - `@stim-cli/server` usage history keeps the 15-second slots filled between status lines, so the phone's 10-minute usage chart has no gaps while `status --watch` prints nothing for a steady workspace. [88ff46f06](https://github.com/appandflow/stim/commit/88ff46f0603110ec477007684fa9105f933a9397) +- Two kill sites now check the recorded process identity before signalling: `stim start`'s Windows supervisor handoff signals the recorded supervisor only while it is still the same process, and otherwise reports the remedy with `stim stop` and the `taskkill` or `kill` command to run; Chrome cleanup for `stim web` treats a leftover process group as lingering only when a member still runs the workspace profile, so an unrelated process that reused the group id is not signalled. [09bc84d51](https://github.com/appandflow/stim/commit/09bc84d518fd86ea237cf0d5d78b38f32c8edb21), [4d285909e](https://github.com/appandflow/stim/commit/4d285909e1e3e0bca6560f2d56679674cb714f64) +- Windows: the "ccache off" note now prints the module build script path with consistent separators. [c2e077139](https://github.com/appandflow/stim/commit/c2e07713931a93dcd74d246c7243ef28ba00e2d8) +- `server.update.status` (`@stim-cli/server`) reports how an update this server started ended, including one the update lock refused, with the last line of its log, when that is newer than the recorded last update. [fcaddb553](https://github.com/appandflow/stim/commit/fcaddb55305a4c026bded7df8319d8e488329344) ## Docs - The website, `stim guide` and the package READMEs cover `ios.scheme`, `ios.projectPath`, `android.gradleRoot`, `android.module`, `android.offloadInputs`, `metro.command`, native Xcode and Gradle apps (`stim guide lifecycle native-ios` and `native-android`), hosted native apps and native build offload, `stim.build()`, `stim-ci build`, memory-culprit reporting, the `status` git and watch behaviour, named ports on reclaim, what `stim doctor` does not run, and the CocoaPods environment used for placement. [82e649b4c](https://github.com/appandflow/stim/commit/82e649b4c29d89f7021c93124b06482e84cfc5fb), [90d4d10d1](https://github.com/appandflow/stim/commit/90d4d10d1197ebf389bcabf209353412303e3198), [e18fbec7c](https://github.com/appandflow/stim/commit/e18fbec7c52c8f091c338e31420d4b2d4c1b94fe), [8c6b3816c](https://github.com/appandflow/stim/commit/8c6b3816c135b82b1fc1c59b1ab9711d4433e666), [55f102ca9](https://github.com/appandflow/stim/commit/55f102ca9f62dc5ff721da4f106aa512e6fbbf73) +- `stim guide tutorial run` has the agent take before and after screenshots of each change into `.expo/screenshots/`, and `stim guide tutorial share` builds the pull request body from the tutorial repository's template with those screenshots attached. [14427a8a4](https://github.com/appandflow/stim/commit/14427a8a487c36320582a346f46a76873a17522d) ## QA