Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
docs: explain how to reproduce selected CI test jobs
Garv Rao0e939fc628b0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex ebf39dc7e2..268161a50d 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -33,13 +33,16 @@ pnpm dev:desktop # Electron shell (macOS/Ubuntu; keep server + Vite running)pnpm typecheck # app + serverpnpm test # vitest suite (server unit + driver contract + API smoke)pnpm test:watch # same, in watch mode-pnpm exec vitest run --shard=1/4 # one CI shard, exactly the files CI ran in itpnpm check:electron # syntax-check the plain JS Electron entrypointspnpm package:mac # DMG + ZIP; requires Swift/Xcode toolspnpm package:linux # Ubuntu x64 .deb + AppImage; no Swift required```+To reproduce a failing CI test job, follow [Vitest shards](docs/ci.md#vitest-shards).+Use the job's checkout revision, OS, file filters, shard fraction, and+`OMB_VITEST_E2E` value; the same shard number alone does not select the same files.+`pnpm dev:desktop` downloads and verifies the pinned Cloudflare Tunnel connector for the currentplatform and architecture before Electron starts. Later launches re-verify and reuse the stagedbinary. Packaging continues to use `pnpm build:cloudflared`, which stages every architecture the@@ -259,19 +262,21 @@ out of its commits and screenshots.## CI, in one glance-Every PR runs the same checks, each as its own job so a failure names itself.-The quick static job runs first; only after it passes do the expensive test and-build jobs enter the runner queue. This saves capacity on submissions with type,-lint or build errors, without skipping any checks on mergeable PRs. The required-gates still fail if preflight fails or a required test job is skipped. It adds-the preflight duration to an otherwise idle runner pool; it does not cure a-GitHub-wide scheduling backlog.--- **typecheck + lint** — typecheck, lint, locale catalogs (`pnpm i18n:check`), Electron syntax check, production UI build. Once, on Ubuntu; none of it is platform-specific.-- **vitest (os, shard n/4)** — the suite split into four shards per platform: Ubuntu and Windows on a PR; macOS as well on main, in the merge queue and on manual runs (macOS runners are scarce and only a couple of tests are macOS-only). The suite runs its files serially on purpose (fake CLIs and a real harness server), so the whole suite takes about 70 minutes of Windows runner time and 50 of Ubuntu. The shards split it by each file's recorded CI time rather than by file count ([docs/ci.md](docs/ci.md#vitest-shards)). To reproduce a shard's failure locally, run the same `pnpm exec vitest run --shard=n/4`. Failures also appear as annotations on the PR.-- **packaged server smoke (os)** — the server bundle copied out of the repo and started with no `node_modules` in reach.-- **Windows CUA host smoke**, **macOS smokes (packaged server + Electron)** — real Electron utility processes against disposable homes; never the live app.-- **CI** — the one check the branch rules require. It only aggregates the jobs above; if it is red, the failing job is named in its log.+Every PR runs locale validation (`pnpm i18n:check`), lint, CI-selection tests,+verification-documentation checks, and the required `CI` gate. The changed files+select the remaining checks; see [CI job selection](docs/ci.md). Documentation-only+PRs run the docs tests, while translation-only PRs run the locale subset. Runtime+changes select broader tests and smokes.++- **typecheck + lint** — the static job always runs the checks above, and adds typecheck, Electron syntax checks, and a production UI build when selected. It runs before the dependent jobs.+- **vitest (os, part)** — full platform suites use eight Linux or Windows shards and four macOS shards; subset jobs have their own file lists and shard counts. Windows jobs run on PRs whose changes can affect Windows or carry the `windows` label. macOS Vitest shards run in the nightly/manual full lane. Files run serially within each shard, balanced by recorded platform time. Use the [reproduction steps](docs/ci.md#vitest-shards) for the failing job.+- **packaged server smoke (os)** — when selected, the server bundle is copied out of the repo and started with no `node_modules` in reach.+- **Windows CUA host smoke**, **macOS smokes (packaged server + Electron)** — when selected, real Electron utility processes run against disposable homes; never the live app.+- **CI** — the required aggregate gate checks that selected jobs passed and unselected jobs were skipped. Its log names any failing dependency.++For eligible owner runs on Boat, the static job also runs the selected Linux+test lanes; their logs appear in groups named for each lane. Fork PRs use+GitHub-hosted jobs. See [Linux on Boat](docs/ci.md#linux-on-boat).A `pre-push` hook installed by `pnpm install` runs lint, typecheck and the locale check before a push (about a minute). `git push --no-verify` skips it once; `OMB_SKIP_HOOKS=1` skips it for a session.diff --git a/docs/ci.md b/docs/ci.mdindex 57872bec9a..d25cdd1824 100644--- a/docs/ci.md+++ b/docs/ci.md@@ -126,13 +126,38 @@ three platforms) when shards drift apart:node scripts/testing/update-shard-weights.mjs --run <run id> --run <run id> --run <run id>```-To run one CI shard locally, use the same OS, `--shard` and `OMB_VITEST_E2E`:-`OMB_VITEST_E2E=host pnpm exec vitest run --shard=3/8` is Windows shard 3 on a-Windows machine.-The locale and docs tests are the same command with their files first:-`pnpm exec vitest run src/ scripts/generate-locale.test.mjs --shard=1/2` is-locale tests 1/2 (those jobs set `OMB_VITEST_SUBSET`, so the sequencer does not-warn that most weighted files are missing).+To reproduce a failing Vitest job locally:++1. Use the checkout revision shown in that job's log and install its locked+ dependencies with `pnpm install --frozen-lockfile`. A PR's CI checkout may+ be a merge commit rather than the branch tip.+2. Use the same OS. Shard weights are platform-specific, so Windows shard 3+ and Linux shard 3 do not contain the same files.+3. Copy the expanded command from **Run tests**, including any file filters+ and the complete `--shard=n/count` fraction. Copy its `OMB_VITEST_E2E`+ and `OMB_VITEST_SUBSET` environment values too. On Boat, the static job+ contains each shard's output in a `vitest (ubuntu-latest, ...)` lane's+ log group; the lane uses the same matrix values.++For example, a full Windows shard 3/8 uses PowerShell syntax:++```powershell+$env:OMB_VITEST_E2E = "host"+$env:OMB_VITEST_SUBSET = ""+pnpm exec vitest run --shard=3/8+```++The full Linux shard 3/8 uses a POSIX shell:++```sh+OMB_VITEST_E2E=all OMB_VITEST_SUBSET= pnpm exec vitest run --shard=3/8+```++Docs and locale jobs select smaller file lists and have their own shard+counts. Keep their file filters: removing them changes the set the sequencer+divides, even with the same `--shard`. `OMB_VITEST_SUBSET` suppresses the CI+warning about missing weighted files; the command's file filters select the+tests. Copy the current job's list rather than assuming it is the full suite.Deleting or renaming a test file in the weights fails`scripts/testing/duration-sequencer.test.ts` until its entry is removed or