Skip to content

Commit 63ddde6

Browse files
committed
Make a fresh clone work without submodules or a build step
A fresh `git clone && bun install` previously could not run `bun dev` or `bun run test:e2e`: - @executor-js/vite-plugin and @executor-js/react/console-routes only ship built `dist/` entrypoints, which used to require knowing to run `turbo run build` after installing. The root `prepare` hook now bundles both on every install (tsup, well under a second), so vite configs resolve on a fresh clone. (Pointing `exports.default` at the TS source instead would only work on Node >= 23.6 type-stripping — vite externalizes these imports from vite.config.ts, so Node itself has to load them.) - testkit still imported `vendor/mcporter/dist`, which requires initializing the submodule AND building it with pnpm. Consume the fork from npm as @executor-js/mcporter instead, like e2e/ already does; the submodule stays for developing the fork itself (see vendor/README.md). (An earlier version of this branch also injected an in-memory WorkOS Vault client under EXECUTOR_E2E_STUB; the wire-level WorkOS emulator (#931) deleted the stub layer and serves the real /vault/v1/kv routes, so that workaround is no longer needed.) Verified by cloning the repo fresh into /tmp: install, format, lint, typecheck, and the full e2e suite (cloud + selfhost) all pass with no submodules initialized and no manual build step.
1 parent 3530d42 commit 63ddde6

12 files changed

Lines changed: 1903 additions & 38 deletions

File tree

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ apps/desktop/resources/
6060
apps/cloud/.dev-db/
6161
apps/cloud/.e2e-db/
6262

63-
# e2e suite: generated run artifacts + throwaway target state
63+
# e2e suite: generated run artifacts + throwaway target state (the * also
64+
# covers ad-hoc variants like .e2e-stub-db-manual from debugging boots)
6465
e2e/runs/
65-
apps/cloud/.e2e-stub-db/
66-
apps/host-selfhost/.e2e-data/
66+
apps/cloud/.e2e-stub-db*/
67+
apps/host-selfhost/.e2e-data*/
6768

6869
# playwright e2e artifacts
6970
test-results/

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,17 @@ bun dev
126126

127127
The dev server starts at `http://127.0.0.1:4788`.
128128

129+
### Tests
130+
131+
```bash
132+
bun run test # unit + integration suites
133+
bun run test:e2e # full-stack e2e: boots the cloud and self-host apps and drives them
134+
```
135+
136+
The browser e2e scenarios need Playwright's Chromium once per machine:
137+
`bunx playwright install chromium`. The git submodules under `vendor/` are
138+
optional — see [vendor/README.md](vendor/README.md).
139+
129140
## Community
130141

131142
Join the Discord: [https://discord.gg/eF29HBHwM6](https://discord.gg/eF29HBHwM6)

e2e/src/surfaces/mcp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// MCP surface: the vendored mcporter fork as a programmatic MCP client, with
2-
// headless OAuth via the target's consent strategy. Session methods are
3-
// Effects; mcporter itself is promise-native underneath. Assertions are
4-
// vitest's job.
1+
// MCP surface: our mcporter fork (@executor-js/mcporter on npm; develop it in
2+
// the vendor/mcporter submodule) as a programmatic MCP client, with headless
3+
// OAuth via the target's consent strategy. Session methods are Effects;
4+
// mcporter itself is promise-native underneath. Assertions are vitest's job.
55
import { createHash, randomBytes, randomUUID } from "node:crypto";
66
import { mkdtempSync, writeFileSync } from "node:fs";
77
import { tmpdir } from "node:os";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"release:publish:packages:prepare": "bun run scripts/publish-packages.ts --prepare-only",
6464
"release:smoke:packages": "bun run scripts/smoke-test-packed.ts",
6565
"clean": "bun run scripts/clean.ts",
66-
"prepare": "effect-language-service patch && effect-tsgo patch"
66+
"prepare": "effect-language-service patch && effect-tsgo patch && bun run --cwd packages/core/vite-plugin build:bundle && bun run --cwd packages/react build"
6767
},
6868
"dependencies": {},
6969
"devDependencies": {

packages/core/vite-plugin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
},
3636
"scripts": {
3737
"build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)",
38+
"build:bundle": "tsup",
3839
"typecheck": "tsgo --noEmit",
3940
"test": "vitest run",
4041
"typecheck:slow": "tsc --noEmit"

testkit/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# testkit (MCP surface) — MVP
22

3-
Black-box tests through the **MCP surface**, on the vendored mcporter fork
4-
(`vendor/mcporter`, with its headless `cookieConsentStrategy`). Every run emits a
3+
Black-box tests through the **MCP surface**, on our mcporter fork
4+
(`@executor-js/mcporter` on npm, with its headless `cookieConsentStrategy`;
5+
develop the fork itself in the `vendor/mcporter` submodule). Every run emits a
56
**chat-transcript recording** (`run.json`) — the MCP surface *is* an agent-in-a-chat,
67
so that's the natural shape.
78

0 commit comments

Comments
 (0)