Repository navigation
refactor: move e2e's core into @e2e-dev/core, and engines peer on it - #1737
Conversation
🟢 e2e web: 93 passedAll 93 tests in 42 files
Tested by e2e 0.23.1 · 1m 0s · web · run artifacts |
🟢 e2e web agent: 34 passed35 agent steps · 26 replayed from cache · 25 model calls · 117.2k tokens (95% cached) · $0.0044 All 34 tests in 5 files
Tested by e2e 0.23.1 · 1m 33s · web · run artifacts |
7024414 to
e7136e8
Compare
🟢 e2e ios agent: 21 passed, 1 skipped25 agent steps · 12 replayed from cache · 60 model calls · 385.6k tokens (80% cached) · $0.0277 All 22 tests in 1 file
Tested by e2e 0.23.1 · 8m 55s · ios-simulator · run artifacts |
There was a problem hiding this comment.
2 issues found and verified against the latest diff
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="CONTRIBUTING.md">
<violation number="1" location="CONTRIBUTING.md:292">
P2: The new public-surface list still omits `e2e/agent`, although the package exports it as `dist/agent/public.d.ts`. Add `e2e/agent` and its declaration path so agent API changes are not incorrectly treated as outside the breaking-change policy.</violation>
</file>
<file name=".changeset/config.json">
<violation number="1" location=".changeset/config.json:16">
P1: Adding `e2e-core` to this fixed group makes the release workflow publish it, but the new package must exist on npm and have the `release.yml` trusted publisher configured first. Complete that bootstrap before merging; otherwise the first release can fail or publish `e2e` with its exact `e2e-core` dependency unavailable.</violation>
</file>
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
View guided diff | Turn on auto-fix | Re-trigger cubic
| "fixed": [ | ||
| [ | ||
| "e2e", | ||
| "e2e-core" |
There was a problem hiding this comment.
P1: Adding e2e-core to this fixed group makes the release workflow publish it, but the new package must exist on npm and have the release.yml trusted publisher configured first. Complete that bootstrap before merging; otherwise the first release can fail or publish e2e with its exact e2e-core dependency unavailable.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .changeset/config.json, line 16:
<comment>Adding `e2e-core` to this fixed group makes the release workflow publish it, but the new package must exist on npm and have the `release.yml` trusted publisher configured first. Complete that bootstrap before merging; otherwise the first release can fail or publish `e2e` with its exact `e2e-core` dependency unavailable.</comment>
<file context>
@@ -1,11 +1,21 @@
+ "fixed": [
+ [
+ "e2e",
+ "e2e-core"
+ ]
+ ],
</file context>
There was a problem hiding this comment.
[claude-opus-5-5] responding on behalf of kdy1
Agreed, and it is the maintainer's to do: the first publish of e2e-core and its trusted publisher need npm org access. The PR body lists it under "Before merging". Leaving this open for the maintainer.
| - Public types exported from `e2e`, `e2e/engine`, and `e2e-core/engine`, | ||
| as emitted in `dist/index.d.ts` and `dist/engine/index.d.ts` of `e2e`, | ||
| and `dist/engine/index.d.ts` of `e2e-core`. Removing an |
There was a problem hiding this comment.
P2: The new public-surface list still omits e2e/agent, although the package exports it as dist/agent/public.d.ts. Add e2e/agent and its declaration path so agent API changes are not incorrectly treated as outside the breaking-change policy.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At CONTRIBUTING.md, line 292:
<comment>The new public-surface list still omits `e2e/agent`, although the package exports it as `dist/agent/public.d.ts`. Add `e2e/agent` and its declaration path so agent API changes are not incorrectly treated as outside the breaking-change policy.</comment>
<file context>
@@ -289,8 +289,9 @@ committed.
-- Public types exported from `e2e` and `e2e/engine`, as
- emitted in `dist/index.d.ts` and `dist/engine/index.d.ts`. Removing an
+- Public types exported from `e2e`, `e2e/engine`, and `e2e-core/engine`,
+ as emitted in `dist/index.d.ts` and `dist/engine/index.d.ts` of `e2e`,
+ and `dist/engine/index.d.ts` of `e2e-core`. Removing an
</file context>
| - Public types exported from `e2e`, `e2e/engine`, and `e2e-core/engine`, | |
| as emitted in `dist/index.d.ts` and `dist/engine/index.d.ts` of `e2e`, | |
| and `dist/engine/index.d.ts` of `e2e-core`. Removing an | |
| - Public types exported from `e2e`, `e2e/agent`, `e2e/engine`, and | |
| `e2e-core/engine`, as emitted in `dist/index.d.ts`, | |
| `dist/agent/public.d.ts`, and `dist/engine/index.d.ts` of `e2e`, and | |
| `dist/engine/index.d.ts` of `e2e-core`. Removing an |
There was a problem hiding this comment.
[claude-opus-5-5] responding on behalf of kdy1
e2e/agent is missing from this list on main too; this PR only adds e2e-core/engine to it. Whether the stability policy covers e2e/agent is a contract decision, so I am leaving it for the maintainer.
🟢 e2e android agent: 1 flaky, 19 passed24 agent steps · 15 replayed from cache · 51 model calls · 383.9k tokens (86% cached) · $0.0231
|
| Test | Agent | Time | |
|---|---|---|---|
| tests-agent/scenarios.e2e.ts · 1 flaky, 19 passed | 24 steps · 51 calls | 5m 56s | |
| 🟢 | act completes Login Form | 1 step | 21.2s |
| 🟢 | act completes Infinite Scroll List | 1 step | 16.5s |
| 🟢 | act completes Modal Flow | 1 step | 9.9s |
| 🟢 | act completes Bottom Tabs | 1 step | 6.5s |
| 🟢 | act completes Text Input Variations | 1 step | 5.9s |
| 🟢 | act completes Broken Accessibility | 2 steps · 5 calls | 14.6s |
| 🟢 | act completes Vision Only | 2 steps · 1 call | 5.8s |
| act completes Gestures (1 failed attempt first) | 1 step · 13 calls | 32.2s | |
| 🟢 | act completes Async States | 1 step · 20 calls | 44.1s |
| 🟢 | act completes Debounced Search | 1 step | 6.6s |
| 🟢 | act completes Huge Virtualized List | 1 step | 1m 48s |
| 🟢 | act completes Flattened Registration Form | 2 steps · 1 call | 7.1s |
| 🟢 | act completes Flattened Login | 2 steps · 6 calls | 14.0s |
| 🟢 | act completes Sticky Chrome Target | 1 step | 8.7s |
| 🟢 | act completes WebView Accessibility | 1 step · 5 calls | 14.4s |
| 🟢 | act completes Permission Prompt | 1 step | 6.1s |
| 🟢 | act completes Product Catalog | 1 step | 8.1s |
| 🟢 | act completes Error Recovery | 1 step | 8.7s |
| 🟢 | act completes Choice Controls | 1 step | 8.1s |
| 🟢 | act completes Sequential Onboarding | 1 step | 9.2s |
Tested by e2e 0.23.1 · 6m 19s · android-emulator · run artifacts
🟢 e2e android: 58 passed, 1 skippedAll 59 tests in 7 files
Tested by e2e 0.23.1 · 8m 51s · android-emulator · run artifacts |
🟢 e2e ios: 56 passed, 1 skippedAll 57 tests in 7 files
Tested by e2e 0.23.1 · 6m 45s · ios-simulator · run artifacts |
|
[claude-opus-5-5] responding on behalf of kdy1 Left for the maintainer:
|
2ae0215 to
e61e085
Compare
e61e085 to
810cc54
Compare
The engine contract, locators, agent, replay cache, secrets, and the session half of a worker move from packages/e2e to packages/core, the new @e2e-dev/core package, at the same paths. e2e depends on it at its exact version (a changesets fixed group) and reaches its modules through @e2e-dev/core/lib/*, which is not public API; e2e/engine and e2e/agent re-export it. @e2e-dev/web and @e2e-dev/mobile peer on @e2e-dev/core and import the contract from @e2e-dev/core/engine. Install smoke checks that one copy of @e2e-dev/core is installed. Most of this diff is git mv and import specifiers rewritten to @e2e-dev/core/lib/<path>; no behavior changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Bun job built e2e before the @e2e-dev/core it compiles against, and the examples nightly installs e2e from a tarball whose exact @e2e-dev/core is not on npm; it now packs @e2e-dev/core and overrides it in each example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
810cc54 to
abef877
Compare
Engines peer on @e2e-dev/core. Yarn installs no peer the project does not list, and under Plug'n'Play the engine then fails to load. - init adds @e2e-dev/core with any engine - upgrade adds a required @e2e-dev peer the project lacks, and keeps a package e2e depends on at the version e2e names
Stack 2/3: session-half split → this PR →
@e2e-dev/coreAPI.Moves the engine contract, locators, agent, replay cache, secrets, and the session half of a worker from
packages/e2etopackages/core, published as the new@e2e-dev/corepackage.e2eis built on it. Nothing changes in behavior.@e2e-dev/core: 145 modules moved withgit mvto the same paths underpackages/core/src. Its one public entry is@e2e-dev/core/engine.e2ereaches the rest as@e2e-dev/core/lib/<path>(./lib/*in its exports), which is not public API. The next PR adds the@e2e-dev/coreand@e2e-dev/core/agententries.e2e: depends on@e2e-dev/coreat its exact version (workspace:*), and the changesetsfixedgroup keeps the two versions equal.e2e/engineande2e/agentre-export it unchanged, so engines, integrations, and executors work as before.@e2e-dev/weband@e2e-dev/mobileimport@e2e-dev/core/engineand peer on@e2e-dev/corebesidee2e(>=0.23.1 <1).e2e initadds@e2e-dev/corebeside an engine, ande2e upgradeadds a required@e2e-dev/*peer the project lacks, at the versione2edepends on. Checked on Yarn 4.18.1 PnP with packed builds: without core listed the config fails to load, with it the scaffolded test passes.buildandtestscripts run@e2e-dev/corefirst, and so does the Bun job inspec.yml..github/filters.ymladdspackages/core/**to the runner filter.@e2e-dev/coreand overrides it in each example's npm install.scripts/install-smoke.tspacks it too and fails on a second installed copy.Most of the diff is mechanical: of 639 files, 145 are pure renames and most of the rest only rewrite import specifiers to
@e2e-dev/core/lib/<path>. The parts to read:packages/core/package.json,packages/e2e/package.json,packages/{web,mobile}/package.json, rootpackage.json,.changeset/config.jsonpackages/core/src/engine/index.tsandagent/public.ts(verbatim),packages/e2e/src/engine/index.tsandagent/public.ts(re-exports)packages/core/tsconfig*.json,packages/core/vitest.config.ts,packages/e2e/vitest.config.ts(the integration project externalizes core'sdist, so tests and the built runner share one module state)packages/e2e/tests/unit/package-imports.test.ts(follows imports into@e2e-dev/core;aistays lazy there),scripts/install-smoke.ts,scripts/check-error-codes.ts.github/workflows/spec.yml,examples.yml,.github/actions/example-packages/action.yml,.github/filters.yml,CODEOWNERSAGENTS.md,CONTRIBUTING.md(stability, engine contract),docs/writing-an-engine.mdx,docs/reference/engine.mdx, READMEsTo confirm the rest is only import lines:
git diff -M --unified=0 <base> <head> -- 'packages/*/src' 'packages/*/tests' | grep '^[-+][^-+]' | grep -v "from '\|import('".Before merging:
@e2e-dev/coredoes not exist on npm yet, and npm Trusted Publishing can only be added to a package that exists. Publish a placeholder@e2e-dev/core@0.0.0by hand and connectrelease.ymlas its trusted publisher (CONTRIBUTING.md, "npm Trusted Publishing") before this merges. Otherwise the next release publishese2ewith an exact dependency on an@e2e-dev/coreversion that failed to publish.Verified
Ran it locally: yes. No behavior changes, so the evidence is the existing suites against the built packages, plus a fresh install:
pnpm test: e2e 4626 passed (unit and integration), web 810, mobile 531, every other package green, and@e2e-dev/core's entries check.scripts/install-smoke.tswith pnpm 11 and pnpm 12: installs the packed@e2e-dev/core,e2e,@e2e-dev/web, and@e2e-dev/mobilewith no build scripts, finds one@e2e-dev/corecopy, typechecks a mobile tool, and runs a TypeScript test.pnpm checkpasses.@e2e-dev/core. It only runs on the nightly or on a manual dispatch, which posts to Slack.🤖 Generated with Claude Code