Skip to content

fix(release): enforce the #1657 peer-floor rules in the release checks - #1661

Open
Varshith-Kali wants to merge 12 commits into
e2e-inc:mainfrom
Varshith-Kali:fix/1657-engine-peer-floor
Open

Varshith-Kali wants to merge 12 commits into
e2e-inc:mainfrom
Varshith-Kali:fix/1657-engine-peer-floor

Conversation

@Varshith-Kali

@Varshith-Kali Varshith-Kali commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Issue

Fixes #1657

What changed

  • The 0.12.6 mobile and 0.15.5 web patch releases raised their e2e peer floor to >=0.22.1, but no stable e2e@0.22.1 ever shipped, so a fresh install of an unchanged project on e2e ~0.21.3 fails with ERESOLVE. The published 0.12.6/0.15.5 metadata cannot be changed, so this change does not touch it: it makes the release checks catch the next one, and corrects the floors the next releases will publish.
  • Rule (b), scripts/check-peer-ranges.ts: a peer floor must name a version the sibling released (## x.y.z in its CHANGELOG.md), or the runner version in the same release (the version the sibling's pending changesets will release).
  • Rule (a), scripts/check-changeset-bumps.ts: a changeset that raises a peer floor past a runner minor the previous range accepted must be a **Breaking:** minor. The previous floor is read off the package's release tag; a raise counts only when it cuts off a released version on an older minor.
  • Rule (c), scripts/engine-exports.ts (new): every named import from e2e or an e2e/* entry must be exported by e2e at the floor version, read off the e2e@<version> tag. A new e2e/engine import counts as raising the floor.
  • The floors move to the released versions they already meant in practice, all as patch changesets: web and mobile to e2e >=0.23.0 (first version exporting the stepTimeout value and the EngineDoctorCheck types both engines import), acp to e2e >=0.22.0 (first version exporting the e2e/agent rules and tools it imports), limrun to mobile >=0.12.0 (first mobile release with the provider-owned local daemon change from feat(limrun): add hosted mobile device provider #988; on 0.11.0 the local daemon picks up AGENT_DEVICE_DAEMON_BASE_URL). None cuts off a released version a consumer could install on the old range, so no **Breaking:** minor is needed for these corrections.
  • AGENTS.md release paragraph now names the three rules and the scripts that enforce them.

Verified

Ran it locally: yes

  • pnpm check (full gate): exit 0
  • pnpm run test:scripts: 206 pass, 0 fail
Check old tree (c74de8d, new checks) this branch (61c1cc9)
node scripts/check-peer-ranges.ts exit 1, four phantom floors: web/mobile >=0.22.1, acp >=0.21.4, limrun mobile >=0.11.1 exit 0, 4 packages' e2e imports verified against their floors
node scripts/check-changeset-bumps.ts exit 0, 0 floor changes exit 0, 4 floor changes, none a crossing raise
Synthetic: web floor 0.18.0 to 0.23.0 with a patch changeset not run on main exit 1, rule (a) fires; with a **Breaking:** minor it passes
Synthetic: web floor 0.22.0 not run on main exit 1, rule (c) names stepTimeout, EngineDoctorCheck, EngineDoctorInfo

Two notes, not failures: the eight packages peering on e2e >=0.15.0 report that the floor cannot be verified from the tag record (e2e@0.15.0 was released but never tagged; earliest tag is 0.15.1). Their imports were verified present at 0.15.1, and the released-floor rule still applies to them. Rule (c) covers e2e/* imports only; an integration's imports from @e2e-dev/web or @e2e-dev/mobile are the same shape but a different sibling, and are a follow-up, not part of this change.

View guided diff

@github-actions github-actions Bot added the size:XL Up to 999 changed lines, not counting tests, fixtures, or the lockfile label Nov 10, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 14 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread scripts/engine-exports.test.ts Resolved
Comment thread scripts/check-changeset-bumps.ts Resolved
Comment thread scripts/check-peer-ranges.ts Resolved
Comment thread AGENTS.md Resolved
Comment thread scripts/engine-exports.ts Resolved
Comment thread scripts/peer-ranges.ts Resolved
Comment thread scripts/changeset-bumps.ts Resolved
Comment thread scripts/engine-exports.ts Resolved
Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Addressed all 10 cubic findings in 4e403bd (PR head, mergeable). Fixed 9, declined 1 doc change with a reason:

  • P1 test:157: the test job now checks out with fetch-depth: 0. CI logs showed this test failing at line 157 on all five test jobs in spec run 42763725083. The test also asserts the tag was fetched.
  • P1 check-changeset-bumps: the check falls back to the latest released tag when the current version has no tag yet, so a generated release PR still gets its floor check (verified by simulating one: 4 floor changes checked, 1 skipped).
  • P2 check-peer-ranges: a pending-release floor is verified against the working tree instead of passing on an unverifiable note (verified both ways, including a bogus import under a pending floor failing the check).
  • P2 engine-exports (namespace): named imports beside a namespace import are still validated.
  • P2 peer-ranges (no changelog): the pending version is checked before reporting a missing changelog.
  • P2 changeset-bumps: a floor raise now needs a Breaking: minor; a Release: minor no longer announces it.
  • P2 engine-exports (export type *): imports and exports are tracked by kind, so a type-only re-export no longer satisfies a value import.
  • P2 AGENTS.md wording: the sibling's version in the same release; named imports for the import check.
  • P2 AGENTS.md (Release minor doc): no change, the doc was right and the code was the deviation, fixed by the Breaking-only change above.

Evidence: pnpm run test:scripts 195 pass, 0 fail (10 new tests); tsc -p scripts clean; oxlint clean; check-peer-ranges and check-changeset-bumps both exit 0.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 10 files (changes from recent commits).

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[claude-opus-5-5] automated review on behalf of @okwasniewski

Thanks @Varshith-Kali. This follows the direction from #1657 well, and the cubic follow-ups were thorough. I replayed the new scripts on the #1493 commit, and rule (a) catches the original incident. A few things before human review:

Must fix

  1. packages/limrun/package.json: please use >=0.12.0, not >=0.11.0. #988 shipped limrun together with a mobile engine.ts change (provider-owned local daemons don't inherit remote daemon env vars), and that change first shipped in mobile 0.12.0. On mobile 0.11.0, limrun installs, and then its local daemon picks up AGENT_DEVICE_DAEMON_BASE_URL. It's still a patch, since 0.11.1 never shipped. Please update the changeset and peer-ranges.test.ts too.
  2. scripts/check-changeset-bumps.ts: on a release PR the changesets are already consumed, and the same is true on main right after it merges, before tags exist. So an announced raise that crosses a minor fails with "with no changeset". Repro: limrun floor 0.15.0 -> 0.23.0 with a **Breaking:** minor passes. Then bump limrun to 0.3.0 and delete the changesets, and the check exits 1. When the current version has no tag, please judge by the version change from the previous tag (a 0.x minor or major counts as announced).
  3. scripts/peer-ranges.test.ts:97-114: the repo-state test calls peerRangeProblems without nextVersions, so a floor naming the pending runner version passes check-peer-ranges but fails pnpm test. The hard-coded floors test breaks on any later legitimate raise. pnpm check already covers both, so please drop them.
  4. scripts/engine-exports.test.ts:194-236: these tests read the real e2e@0.22.0 and e2e@0.23.0 tags, so pnpm test fails in clones without them, and spec.yml now fetches full history in all 5 test jobs. Please switch to in-memory fixtures like the unit tests above them, and revert the spec.yml change (the check job already has fetch-depth: 0).
  5. scripts/check-peer-ranges.ts output: 8 of the 12 packages can't be verified (e2e@0.15.0 has no tag), but the summary says "12 packages' e2e imports verified". Please count only the verified ones.

Nits

  • engine-exports.ts: the regex parser misses several forms:

    • export * as ns (it counts the inner names instead)
    • export async function
    • export declare const enum
    • comments inside import lists
    • import('e2e/engine')

    oxc-parser is already a dependency of packages/e2e, and its module info would replace most of this file.

  • showAtTag is defined three times. The source walk, import collection, changeset parsing and changelog reads are also duplicated between the check scripts and the tests. A shared helper would help.

  • When no e2e@* tags exist at all, rules (a) and (c) quietly skip. Failing loudly there would stop a future shallow checkout from turning them off.

  • The JSDoc blocks retell the #1657 history. Short rule statements are enough.

  • The changeset lands in four user changelogs. Please keep only the floor changes and drop the release-check details.

For maintainers

  • Should type-only imports count as a floor raise? (mobile's 0.23.0 floor is types only.)
  • Keep the "pending runner version" exemption? It's how the 0.22.1 floor passed the released-version rule in #1493. Rule (a) still caught it.
  • Push an e2e@0.15.0 tag so the import check covers the eight >=0.15.0 integrations, or make unverifiable floors fail.
  • Extend the import check to @e2e-dev/web and @e2e-dev/mobile imports, now or in a follow-up.

@Varshith-Kali
Varshith-Kali force-pushed the fix/1657-engine-peer-floor branch from 4e403bd to 2408e9c Compare November 10, 2026 13:12
@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review. All five must-fixes are in, in 2408e9c (rebased onto current main first).

  1. Limrun floor is now >=0.12.0, in packages/limrun/package.json and the changeset, with the feat(limrun): add hosted mobile device provider #988 reason. Still a patch: no released mobile version sits between 0.11.1 and 0.12.0.
  2. check-changeset-bumps now judges a floor raise by the version change from the previous tag when the current version has no tag yet: a 0.x minor or a major counts as announced. Replayed your repro: the 0.15.0 -> 0.23.0 raise with a **Breaking:** minor passes, then with the version bumped to 0.3.0 and the changesets deleted it now passes too (it exited 1 before this change). A patch bump to 0.2.5 with the same raise still fails, so the fix stays narrow.
  3. Dropped both repo-state tests in peer-ranges.test.ts (the released-floors check and the hard-coded floors check). pnpm check still covers both.
  4. The three tag-reading tests in engine-exports.test.ts now run against in-memory fixture entries, including the original-bug case (stepTimeout absent at the 0.22.0-shaped entry, present at the 0.23.0-shaped one). Reverted the spec.yml fetch-depth change in the test jobs; the check job keeps its fetch-depth: 0.
  5. check-peer-ranges now counts only the packages whose imports were actually verified against a tag record: the summary now counts 4 verified packages instead of 12, with the eight e2e@0.15.0 floors still listed as unverifiable notes.

Nits:

  • Regex gaps fixed in engine-exports.ts: export * as ns now exports only the namespace name, export async function and export declare const enum are read as declarations, comments inside import and export lists are ignored, and a dynamic import of e2e/engine is read (destructured names, or unverifiable when bare). I did not swap in oxc-parser: it is a dependency of packages/e2e only, so scripts/ cannot import it without a new root dependency, and the installed 0.158.0 exposes no module info, only a raw AST, so both the import and export walks would still be hand-written. The regex fixes have unit tests.
  • Shared helper added: scripts/check-helpers.ts now holds showAtTag, the source walk and import collection, the changelog read, and the changeset parsing, used by both check scripts.
  • Both check scripts now fail loudly when no e2e@* tags exist at all, instead of quietly skipping rules (a) and (c). Verified with a stubbed git tag --list: both exit 1 with a message pointing at git fetch --tags.
  • JSDoc blocks on the check scripts and the rule modules now state the rules without retelling the fix(release): engine patch updates make unchanged runner ranges uninstallable #1657 history.
  • The changeset keeps only the floor changes; the release-check details are dropped.

Open maintainer questions (not implemented, for you):

  • Should type-only imports count as a floor raise? (mobile 0.23.0 floor is types only.)
  • Keep the pending runner version exemption?
  • Push an e2e@0.15.0 tag so the import check covers the eight >=0.15.0 integrations, or make unverifiable floors fail.
  • Extend the import check to @e2e-dev/web and @e2e-dev/mobile imports, now or in a follow-up.

Verified locally: pnpm run test:scripts 206 pass, 0 fail; node scripts/check-peer-ranges.ts and node scripts/check-changeset-bumps.ts both exit 0; oxlint on the touched scripts and tsc -p scripts clean; pnpm run check:dead-code clean.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[claude-opus-5-5] automated review on behalf of @okwasniewski

Thanks @Varshith-Kali, all five must-fixes check out. I replayed the release-PR repro (0.3.0 passes, 0.2.5 still fails), the tests no longer read tags, limrun is >=0.12.0, and the summary counts 4 verified. Mutation testing the new rules: 14 of 15 mutants are caught.

Must fix

  1. scripts/engine-exports.ts: please switch to oxc-parser. 0.158.0 does expose module info: parseSync(file, code).module has staticImports, staticExports and dynamicImports, each with isType. Using it from scripts/ only needs a root devDep at the version already in the lockfile. The regex parser fails on real input:

    • a JSDoc @example with import { x } from 'e2e/engine' in engine source counts as an import. release.yml runs check:peer-ranges before publishing, so a doc comment can block a release
    • a commented-out // export function gone counts as an export
    • export const { describe, ... } = test (collect/registry.ts:699) is missed
    • types inside export namespace StandardSchemaV1 leak out as top-level e2e exports (Props, Result, ...)

    This also deletes stripComments, the five regexes and the dynamic-import blanking.

Should fix

  • engine-exports.test.ts:187 doesn't test what its name says: isKeyModifier isn't in the fixture's type set. Allowing a type export to satisfy a value import passes the whole suite.
  • pendingChangesets(): return { file, changeset }[] instead of parallel arrays. That removes the files[index] guard. Please restore the toSorted() on file order too.
  • check-changeset-bumps.ts:44 repeats the pendingBumps loop. Use BumpType instead of the inline union.
  • tagExportsAt could take readFile(path) and leave the tag to the caller. Then showWorkingTree doesn't need an unused _tag.
  • changeset-bumps.ts:13,86 still retell the #1657 history. The changeset could be one line per floor move.
  • The cubic thread on AGENTS.md:683 is stale now and can be resolved.

The four maintainer questions (type-only imports as floor raises, pending-runner exemption, e2e@0.15.0 tag, web/mobile import checks) are with us.

@github-actions github-actions Bot added size:XXL 1,000+ changed lines, not counting tests, fixtures, or the lockfile and removed size:XL Up to 999 changed lines, not counting tests, fixtures, or the lockfile labels Nov 10, 2026
@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Thanks, all addressed in 3e3a759.

Must fix: scripts/engine-exports.ts now parses with oxc-parser (parseSync module info, root devDep 0.158.0, the version already in the lockfile). I reproduced all four regex failures first, then verified the fix on the same inputs: a JSDoc @example import no longer counts, a commented-out export no longer counts, export const { describe, ... } = test is now read (it was missed entirely), and types inside export namespace StandardSchemaV1 no longer leak as top-level e2e exports. stripComments, the five regexes, and the dynamic-import blanking are deleted. One judgment call: declaration kinds come from the parsed declarations, since module info alone cannot tell a declare function from a type (oxc marks export declare function as type-only, but it is a value export). Interfaces and type aliases are types only, classes and enums are both, everything else exported is a value. Also: const { type X } = await import(...) is not valid TypeScript (tsc rejects it), so the dynamic-import test now uses valid syntax with an aliased name, and destructured dynamic imports are read from the parsed AST.

Should fixes:

  • engine-exports.test.ts: isKeyModifier is now in the fixture type set, so the test fails a value import satisfied only by a type-only export, as its name says, with an assertion that exactly one name is missing.
  • pendingChangesets returns { file, changeset }[] in sorted file order, and the files[index] guard is gone.
  • check-changeset-bumps.ts:44 uses BumpType instead of the inline union.
  • tagExportsAt takes readFile(path), and showWorkingTree no longer takes an unused tag parameter.
  • changeset-bumps.ts no longer retells the fix(release): engine patch updates make unchanged runner ranges uninstallable #1657 history in its header or in announcesFloorRaise, and the changeset is now one line per floor move.
  • The cubic thread on AGENTS.md:683 is resolved.

Verified: pnpm run test:scripts 212 pass, 0 fail; tsc -p scripts clean; oxlint clean on the 6 changed script files; check-peer-ranges and check-changeset-bumps both exit 0 on the working tree. Against the live tags, e2e@0.22.0 still lacks stepTimeout and EngineDoctorCheck while e2e@0.23.0 exports both, and StandardSchemaV1.Props no longer leaks.

The four maintainer questions are untouched; they are with you.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread scripts/engine-exports.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked 7ca14d6. All asks from the last round are fixed. I probed each oxc-parser case (JSDoc @example, commented-out export, export const {} destructuring, namespace types) and ran the release-PR replay. test:scripts passes 218/218 and both checks exit 0. One must-fix left:

  1. Namespace and side-effect imports from a subpath the floor tag never exported still pass. This is the same bug class as the cubic P2, which 7ca14d6 fixed only for named imports (scripts/engine-exports.ts:126, :443). To reproduce, add import * as nope from 'e2e/nope'; import 'e2e/nope2'; to packages/web/src, then run node scripts/check-peer-ranges.ts. It exits 0 with only a note, and the side-effect import isn't recorded at all. In practice, a floor at 0.18.0 with import * as r from 'e2e/runner' passes, but ./runner first shipped in 0.19.0, so consumers get ERR_PACKAGE_PATH_NOT_EXPORTED. Record the subpath even when the import has no names, and fail it when the floor tag doesn't export that subpath.

Should fix:

  • The rule that a value import beats a type import exists in two copies, and both escape mutation testing. In add inside engineImports (:113), the only test imports the type first and the value second, so a "last write wins" mutant survives. The cross-file addEngineImports (:184) has no test at all. Either bug lets a value import be satisfied by a type-only export. Keep one merge helper and add a value-then-type test.
  • The rule that an interface plus a namespace with the same name count as both a type and a value (:195) has no test.
  • engine-exports.ts duplication:
    • the manifest is parsed twice and the export-key expression is repeated (:361, :401)
    • the All and Name branches in exportedNames (:262) have the same body
    • the type-only and value loops in resolveEntryExports repeat each other
    • the dynamic-import scan walks the AST twice. One walk would do.
  • About 30% of the 464 lines is JSDoc that restates the code. Cut the header and the tagExportsAt/engineImportProblems docs roughly in half.

Nits:

  • The RestElement check at :82 is dead code.
  • allResolved (:461) is untested.
  • parsed.errors is never checked, so a file that fails to parse is read silently.
  • oxc-parser is pinned in both the root and packages/e2e.

The maintainer decisions from last round (type-only imports, the pending-release exemption, an e2e@0.15.0 tag, web/mobile import checks) are still open on our side.

This was an automated review.

@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Addressed review 5850324577 in e23156f.

Must-fix: namespace, side-effect, and default-only imports from e2e/* now record the subpath even though they name no exports, and the check fails the import when the floor tag does not export that subpath. Repro verified: with import * as nope from 'e2e/nope'; import 'e2e/nope2'; in packages/web/src, node scripts/check-peer-ranges.ts now exits 1 listing both e2e/nope and e2e/nope2 as not exported at e2e@0.23.0 (before: exit 0, only a namespace note, side-effect import invisible). Also checked the live tags: ./runner is not exported at e2e@0.18.0 but is at 0.23.0, so the 0.18.0 floor case from the review now fails as it should. Regression tests cover the namespace, side-effect, and default-only cases (red before, green after).

Should-fix, all done: the value-beats-type rule now lives in one merge helper used by both engineImports and addEngineImports, with value-then-type tests for both; a test for interface plus namespace of the same name counting as both type and value; dedup of the manifest parse, the export-key expression, the All/Name branches, the type-only and value loops, and the dynamic-import walk (one walk now); JSDoc on the header and the tagExportsAt/engineImportProblems docs cut from 65 lines to 38.

Nits: dead RestElement check removed; allResolved test added; parse errors now throw instead of reading a half-parsed file silently (collectEngineImports names the file). oxc-parser stays pinned in both the root and packages/e2e: the package uses it at runtime (src/config/typescript.ts, src/mcp/code-parse.ts) while the scripts use the root one, and pnpm keeps their node_modules separate, so there is nothing safe to dedupe.

Tests: test:scripts 230/230 pass (218 baseline plus 12 new), tsc -p scripts clean, oxlint clean on the whole repo. node scripts/check-peer-ranges.ts exits 0 with the repro file removed.

The four maintainer decisions (type-only imports as floor raises, pending-runner exemption, e2e@0.15.0 tag, web/mobile import checks) are untouched and still open.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread scripts/engine-exports.ts Resolved
Varshith-Kali added a commit to Varshith-Kali/e2e that referenced this pull request Nov 11, 2026
A default import (import def from 'e2e/engine') was recorded with no names, so it passed whenever the floor exported any other name from that subpath, even with no default export. Record it as the `default` binding (value, or type for import type), and record `export default ...` as a `default` export on the entry side, so a floor without one now fails the check. Side-effect imports are unchanged: subpath existence only.

Addresses cubic review 5852130459 on PR e2e-inc#1661.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

View guided diff | Re-trigger cubic

@okwasniewski
okwasniewski dismissed their stale review November 11, 2026 04:17

Superseded by re-review of d7fc7d3.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. All asks from the last round are done and verified, and the cubic P2 on the default binding was valid and is fixed in d7fc7d3. Fixtures in packages/web/src with node scripts/check-peer-ranges.ts: namespace, side-effect, export * as, dynamic, default and import type default imports of a missing subpath all exit 1 (also for e2e/runner at floor 0.18.0); a legit namespace + side-effect import exits 0. test:scripts 238/238, check:peer-ranges and check:changeset-bumps pass, tsc -p scripts clean. mergeImportKinds kills both the first-write and last-write mutants.

Must fix (small)

  1. scripts/engine-exports.ts:402 and :445: an empty export set means "subpath not exported". An entry that exists but exports nothing (e.g. src/setup.ts = import './register.ts'; export {};) is reported as "does not export that subpath". Reproduced with an in-memory tagExportsAt + engineImportProblems probe: import 'e2e/setup' gets a problem. Latent today, but the message is wrong whenever it fires. Have tagExportsAt return a distinct missing state. That also lets engineImportProblems drop the named.length === 0 block (:437-455), which calls exportsAt again and repeats the "cannot be verified" and namespace messages word for word: one exportsAt per subpath, undefined -> note, missing -> problem, '*' -> note, then the named check (an empty list is trivially fine).
  2. add(subpath, []) in the re-export loop (:146) is untested. export * as ns from 'e2e/missing' only fails because of it; removing it fails no test. Add a unit test.

Nits

  • Dropping allResolved = false in the no-names branch survives: one verified subpath plus one unverifiable side-effect import counts as "verified". Goes away with (1).
  • The file name added to the parse error in scripts/check-helpers.ts:64-70 is untested.
  • A value export * reached through export type * (two hops) has no test (:348). Same behavior as before, coverage only.
  • engineImports's add closure and addEngineImports both repeat get-or-create around mergeImportKinds; one mergeInto(target, subpath, names) covers both.

Mutations: 19 on the two new commits, 15 killed, 4 survivors listed above.

Maintainer decisions still open: type-only imports as floor raises, the pending-runner exemption, an e2e@0.15.0 tag (8 of 12 packages stay unverifiable without it), web/mobile import checks.

This was an automated review.

Varshith-Kali added a commit to Varshith-Kali/e2e that referenced this pull request Nov 11, 2026
…s nothing

tagExportsAt returned empty export sets both when the tag never exported
a subpath and when its entry exists but exports nothing, so a side-effect
or namespace import of an empty entry (import './register.ts'; export {};)
was wrongly reported as "does not export that subpath". Return the
distinct 'missing' state for the never-exported case and empty sets only
for an entry that exports nothing, and collapse engineImportProblems to
one exportsAt call per subpath: undefined is a note, missing is a
problem, '*' is a note, then the named check, where an empty list is
trivially fine. A named import from a never-exported subpath now gets
the subpath message instead of the per-name one, and a check with one
verified subpath plus one unverifiable side-effect import no longer
counts as verified.

Also cover the add(subpath, []) in the re-export loop: export * as ns
from 'e2e/missing' only fails because of it. Add tests for the parse
error file name, a value export star reached through a type star, and
the shared mergeInto for the add closure and addEngineImports.

Addresses review 5853794400 on PR e2e-inc#1661.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Addressed review 5853794400 in f49362e:

  1. tagExportsAt now returns a distinct missing state when the tag record exists but the sibling never exported the subpath; an entry that exists but exports nothing returns empty sets. engineImportProblems is now one exportsAt call per subpath: undefined is an unverifiable note, missing is a problem, * is a note, then the named check. The no-names block and its duplicated messages are gone, and the allResolved nit goes away with it: a check with one verified subpath plus one unverifiable side-effect import no longer counts as verified.
  2. Added a unit test for the add(subpath, []) in the re-export loop: export * as ns from e2e/missing is recorded as the subpath with no names, and fails against a missing subpath.

Nits: added the check-helpers parse-error file-name test, the two-hop value export * through export type * test, and the shared mergeInto for the add closure and addEngineImports.

One behavior change worth noting: a named import from a never-exported subpath now reports the subpath message instead of the per-name one, since the subpath itself is what is missing.

Verified: test:scripts 246/246 (was 238/238), check:peer-ranges and check:changeset-bumps pass, tsc -p scripts clean, oxlint clean on the touched files. The check:peer-ranges notes are the same eight e2e@0.15.0 unverifiable notes as before.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 4 files (changes from recent commits).

View guided diff | Re-trigger cubic

@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

CI note on head f49362e: everything is green except the mobile gate, which failed only because its android deterministic job was cancelled mid-suite (the Run the suite step shows cancelled, no test failure). The run conclusion is cancelled, not failed. A re-run of the mobile workflow should clear it; no code change from our side.

@okwasniewski

Copy link
Copy Markdown
Member

[claude-opus-5-5] automated review on behalf of @okwasniewski

Thanks. Everything from the last round is done in f49362e, and I verified each item.

  • tagExportsAt now has 3 states, and 'missing' vs empty sets works. There is one exportsAt per subpath and the duplicated block is gone. I probed packages/web/src with node scripts/check-peer-ranges.ts at floor 0.23.0. Side-effect, namespace, default and named imports of an exported subpath behave as expected (exit 0, plus a note for the namespace import). Side-effect, export * as, export * and named imports of e2e/nope all exit 1 with the subpath message.
  • The add(subpath, []) re-export is now tested.
  • All nits are done (parse-error file name, two-hop type star, mergeInto, allResolved).
  • test:scripts passes 246/246 and tsc -p scripts is clean. I ran 11 mutants against the new code and all were killed.

CI: one correction on the android job. It was not cancelled mid-suite. The suite passed 57/57 by 07:18. Then the github reporter failed on the fork's read-only token, and the process hung until the 60 min job timeout at 08:08. That hang is not caused by this PR and we'll track it separately. I re-ran the mobile workflow.

No further code changes requested. Marking this ready for human review. Still open for maintainers: whether type-only imports count as floor raises, the pending-runner exemption, an e2e@0.15.0 tag, and the web/mobile import checks.

@okwasniewski
okwasniewski dismissed their stale review November 11, 2026 10:13

All requested changes addressed in f49362e (automated review)

@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Thanks for verifying each item and for the correction on the android job. You are right: the suite passed 57/57 and the hang came from the github reporter failing on the fork read-only token, not a cancellation mid-suite. My earlier note had that wrong. Thanks also for re-running the mobile workflow. No code change from my side; the four maintainer decisions in your comment stand as open.

Varshith-Kali added a commit to Varshith-Kali/e2e that referenced this pull request Nov 12, 2026
A default import (import def from 'e2e/engine') was recorded with no names, so it passed whenever the floor exported any other name from that subpath, even with no default export. Record it as the `default` binding (value, or type for import type), and record `export default ...` as a `default` export on the entry side, so a floor without one now fails the check. Side-effect imports are unchanged: subpath existence only.

Addresses cubic review 5852130459 on PR e2e-inc#1661.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Thanks for re-checking. Both fixes confirmed on our side too, and the red check is the known decision-package floor rise on main, not this PR. Ready for human review.

@okwasniewski
okwasniewski dismissed their stale review November 12, 2026 22:17

Asks addressed (automated review)

Varshith-Kali added a commit to Varshith-Kali/e2e that referenced this pull request Nov 15, 2026
A default import (import def from 'e2e/engine') was recorded with no names, so it passed whenever the floor exported any other name from that subpath, even with no default export. Record it as the `default` binding (value, or type for import type), and record `export default ...` as a `default` export on the entry side, so a floor without one now fails the check. Side-effect imports are unchanged: subpath existence only.

Addresses cubic review 5852130459 on PR e2e-inc#1661.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
Varshith-Kali added a commit to Varshith-Kali/e2e that referenced this pull request Nov 15, 2026
…s nothing

tagExportsAt returned empty export sets both when the tag never exported
a subpath and when its entry exists but exports nothing, so a side-effect
or namespace import of an empty entry (import './register.ts'; export {};)
was wrongly reported as "does not export that subpath". Return the
distinct 'missing' state for the never-exported case and empty sets only
for an entry that exports nothing, and collapse engineImportProblems to
one exportsAt call per subpath: undefined is a note, missing is a
problem, '*' is a note, then the named check, where an empty list is
trivially fine. A named import from a never-exported subpath now gets
the subpath message instead of the per-name one, and a check with one
verified subpath plus one unverifiable side-effect import no longer
counts as verified.

Also cover the add(subpath, []) in the re-export loop: export * as ns
from 'e2e/missing' only fails because of it. Add tests for the parse
error file name, a value export star reached through a type star, and
the shared mergeInto for the add closure and addEngineImports.

Addresses review 5853794400 on PR e2e-inc#1661.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
@Varshith-Kali
Varshith-Kali force-pushed the fix/1657-engine-peer-floor branch from dc92b4f to a5aa1a1 Compare November 15, 2026 01:03
@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (head a5aa1a1). The only conflict was the fallow 3.42.0 to 3.43.0 bump against this PR adding oxc-parser 0.158.0; kept both, lockfile verified with a frozen install and the 106 release-check script tests pass on the rebased head. CI is re-running; I will re-add the Ready for Human Review label once it is green.

@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

CI note on the rebased head (a5aa1a1): the two failures are the same peer-range issue, not the rebase. check fails in check:peer-ranges: packages/browser-run/package.json pins @e2e-dev/web >=0.15.6 <1, but web 0.15.6 was never released (the changelog goes 0.15.5 straight to 0.16.0, and there is no such tag). The floor came from the 13 Nov chore: version packages commit (#1590). The new check flags it because a floor has to name a released version. The spec gate failure follows from check failing.

browser-run only imports types (BrowserLease, BrowserProvider, and friends) that have shipped since #418, so the floor looks wrong rather than the code, but the right replacement value and whether the fix belongs in this PR or in the release flow is your call. Happy to fold in whichever value you prefer, or leave this PR untouched and let the release machinery handle it.

@okwasniewski

Copy link
Copy Markdown
Member

[claude-opus-5-5] automated review on behalf of @okwasniewski

Re-checked at a5aa1a16f. The rebase is mechanical: a range-diff against dc92b4fd8 shows identical commits apart from the fallow 3.43.0 lockfile line. The red check is a real catch on main, not the rebase. I confirmed @e2e-dev/web 0.15.6 was never published (npm goes 0.15.5 -> 0.16.0).

Please fold the fix into this PR, because main can't go green with the new check until the floor changes:

  • packages/browser-run/package.json: "@e2e-dev/web": ">=0.16.0 <1". browser-run imports more than the old types. feat(browser-run): add Cloudflare hosted browsers #1634 also changed packages/web/src/provider.ts, browser-connection.ts and surface.ts (CDP connect headers), and those changes first shipped in web 0.16.0. So 0.16.0 is the real floor, not 0.15.5.
  • Add a @e2e-dev/browser-run patch changeset: "Requires @e2e-dev/web 0.16.0 or later." Users see no difference, since a stable >=0.15.6 already resolves to 0.16.0 or later.

Separately, for the maintainer: #1634 wrote a floor that named the next patch, and then the release bumped minor. This check will catch that pattern from now on.

The main test (26) failure on 2030b175b is the known ACP ENOTEMPTY cleanup flake (#1773), and it isn't related to this PR.

@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Done: the @e2e-dev/web floor in packages/browser-run/package.json is now >=0.16.0 <1, and .changeset/browser-run-web-peer-floor.md adds the @e2e-dev/browser-run patch changeset. node scripts/check-peer-ranges.ts passes locally on this head. Note: node scripts/check-changeset-bumps.ts still flags the pre-existing mobile e2e floor raise (0.15.0 to 0.23.0, patch bump) from the engine-peer-floors changeset; that predates this fix and I left it untouched.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.

View guided diff | Re-trigger cubic

@okwasniewski

Copy link
Copy Markdown
Member

[claude-opus-5-5] automated review on behalf of @okwasniewski

Re-checked at 8ae5ecb13. The browser-run floor is now >=0.16.0 <1 and has a patch changeset. All checks are green, including check:peer-ranges. Labeled Ready for Human Review.

The mobile e2e floor raise flagged by check-changeset-bumps predates this PR and is a maintainer call. It is left as is here.

…e checks

Fixes e2e-inc#1657

The 0.12.6 mobile and 0.15.5 web patch releases raised their `e2e` peer
floor to `>=0.22.1`, but no stable `e2e@0.22.1` ever shipped, so a fresh
install of an unchanged project on `e2e ~0.21.3` fails with ERESOLVE.
Per the maintainer direction on e2e-inc#1657, the fix is in the release checks:
a floor must name a released version, a raise past a runner minor the
previous range accepted needs a `**Breaking:**` minor, and a new
`e2e/engine` import counts as a raise. The floors move to the released
versions they already meant in practice: web and mobile to `>=0.23.0`
(first version exporting `stepTimeout` and the `EngineDoctorCheck`
types), acp to `>=0.22.0` (first version exporting the `e2e/agent`
rules and tools it imports), limrun to mobile `>=0.11.0`.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
The test job now checks out with fetch-depth: 0: the new regression test reads the e2e@0.22.0 and e2e@0.23.0 tags, and the shallow checkout failed it on all five test jobs (spec run 42763725083).
check-changeset-bumps falls back to the latest released tag when the current version has no tag yet, so a generated release PR still gets its floor check.
check-peer-ranges verifies a pending-release floor against the working tree instead of passing it on an unverifiable note.
engine-exports tracks value and type imports separately: export type * no longer satisfies a value import (isKeyModifier), and named imports beside a namespace import are still validated.
peer-ranges checks the pending version before reporting a missing changelog.
A floor raise now needs a **Breaking:** minor: a **Release:** minor no longer announces it.
AGENTS.md and the check scripts say the sibling's version in the same release, and that the import check covers named imports.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
…checks

limrun now floors mobile at >=0.12.0: the provider-owned local daemon
change from e2e-inc#988 first shipped in mobile 0.12.0, and on 0.11.0 the local
daemon picks up AGENT_DEVICE_DAEMON_BASE_URL. Still a patch, since
0.11.1 never shipped.

check-changeset-bumps judges a floor raise by the version change from
the previous tag when the current version has no tag yet, so a release
PR whose changesets are already consumed no longer fails with
"with no changeset": a 0.x minor or a major counts as announced, and a
patch bump still does not.

The repo-state tests in peer-ranges.test.ts and the tag-reading tests
in engine-exports.test.ts are gone, replaced by in-memory fixtures;
pnpm check already covers both, and spec.yml no longer fetches full
history in the test jobs.

check-peer-ranges counts only the packages whose imports were actually
verified against a tag record (4, not 12).

The import parser now reads export * as ns (only the namespace name),
export async function, export declare const enum, comments inside
import and export lists, and dynamic import() (destructured names, or
unverifiable when bare). oxc-parser is not a clean swap here: it is a
dependency of packages/e2e only, so scripts/ cannot import it without
a new root dependency, and it exposes no module info, only a raw AST,
so both the import and export walks would still be hand-written.

showAtTag, the source walk, the import collection, the changelog read,
and the changeset parsing are shared in scripts/check-helpers.ts.
Both check scripts fail loudly when no e2e@* tags exist at all.
The JSDoc blocks state the rules without retelling the e2e-inc#1657 history,
and the changeset keeps only the floor changes.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
The regex parser in scripts/engine-exports.ts misread real engine
source, so rule (c) could block a release on a doc comment or miss a
real import. Replace it with oxc-parser module info (parseSync, root
devDep 0.158.0, the version already in the lockfile): JSDoc example
imports and commented-out exports no longer count, destructured
export const names are read, and types nested inside an exported
namespace no longer leak out as top-level exports. Declaration kinds
come from the parsed declarations, since module info alone cannot
tell a declare function from a type.

Also addresses the should-fixes from the same review: the
isKeyModifier test now puts the name in the fixture type set, so it
tests what its name says; pendingChangesets returns { file, changeset }
pairs in sorted file order; check-changeset-bumps uses BumpType
instead of the inline union; tagExportsAt takes readFile(path) and
showWorkingTree drops its unused tag parameter; the changeset is one
line per floor move and changeset-bumps no longer retells the e2e-inc#1657
history.

Verified: pnpm run test:scripts 212 pass, 0 fail; tsc -p scripts
clean; oxlint clean on the changed files; check-peer-ranges and
check-changeset-bumps both exit 0 on the working tree. On the live
tags, e2e@0.22.0 still lacks stepTimeout and EngineDoctorCheck while
e2e@0.23.0 exports both, and StandardSchemaV1.Props no longer leaks.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
tagExportsAt returned undefined both when a floor version had no tag record and when the tag existed but the sibling did not export the requested subpath, so engineImportProblems reported the second case as unverifiable and pnpm check passed. It now returns empty export sets when the tag record exists but names no such export, so the existing missing-export problem is reported; a missing tag record, an unparsable manifest, or an export entry with no types target stays unverifiable. Regression tests cover the new-subpath case and the still-unverifiable missing-tag case.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
…he floor tag never exported

Namespace, side-effect, and default-only imports from e2e/* now record
the subpath even though they name no exports, and engineImportProblems
fails the import when the floor tag does not export that subpath. Before
this, import * as nope from 'e2e/nope' passed with only a note, and
import 'e2e/nope2' was not recorded at all, so a floor at 0.18.0 with
import * as r from 'e2e/runner' passed even though ./runner first
shipped in 0.19.0.

Also addresses the rest of the review: one merge helper for the
value-beats-type rule with value-then-type tests for both copies, a test
for interface plus namespace counting as both type and value, dedup of
the manifest parse, export-key expression, All/Name branches, the
type-only and value loops, and the dynamic-import walk, roughly half the
JSDoc on the header and the tagExportsAt/engineImportProblems docs, and
the nits (dead RestElement check removed, allResolved test, parse errors
now throw instead of reading a half-parsed file silently). oxc-parser
stays pinned in both the root and packages/e2e: the package uses it at
runtime (config/typescript.ts, mcp/code-parse.ts) while the scripts use
the root one, and pnpm keeps their node_modules separate.

The four maintainer decisions (type-only imports as floor raises,
pending-runner exemption, e2e@0.15.0 tag, web/mobile import checks)
are untouched.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
A default import (import def from 'e2e/engine') was recorded with no names, so it passed whenever the floor exported any other name from that subpath, even with no default export. Record it as the `default` binding (value, or type for import type), and record `export default ...` as a `default` export on the entry side, so a floor without one now fails the check. Side-effect imports are unchanged: subpath existence only.

Addresses cubic review 5852130459 on PR e2e-inc#1661.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
…s nothing

tagExportsAt returned empty export sets both when the tag never exported
a subpath and when its entry exists but exports nothing, so a side-effect
or namespace import of an empty entry (import './register.ts'; export {};)
was wrongly reported as "does not export that subpath". Return the
distinct 'missing' state for the never-exported case and empty sets only
for an entry that exports nothing, and collapse engineImportProblems to
one exportsAt call per subpath: undefined is a note, missing is a
problem, '*' is a note, then the named check, where an empty list is
trivially fine. A named import from a never-exported subpath now gets
the subpath message instead of the per-name one, and a check with one
verified subpath plus one unverifiable side-effect import no longer
counts as verified.

Also cover the add(subpath, []) in the re-export loop: export * as ns
from 'e2e/missing' only fails because of it. Add tests for the parse
error file name, a value export star reached through a type star, and
the shared mergeInto for the add closure and addEngineImports.

Addresses review 5853794400 on PR e2e-inc#1661.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
The rebase onto 046bd08 dropped the web package.json bump, since e2e-inc#1393 already raised web's e2e peer floor to >=0.23.1 on main. The changeset still listed @e2e-dev/web as patch and described a web floor raise, which would have shipped a wrong CHANGELOG line and an extra web release. Drop web from the frontmatter and the bullet; mobile, acp, and limrun are unchanged.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
Mobile imports EngineDoctorCheck types from e2e/engine but never
stepTimeout, which only web uses. The bullet claimed both, so the
generated mobile changelog would describe the wrong dependency.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
…hecks

Rebasing onto the core move (0a5ee16) left check:peer-ranges failing on the new tree, for two gaps in the check itself rather than the packages. First, e2e/agent now re-exports @e2e-dev/core through a bare specifier, and resolveEntryExports only followed relative export star chains, so every name arriving that way read as missing at the 0.23.2 floor. Bare stars now resolve through the named workspace package's exports map, including wildcard entries, read at the same version as the tag lookup. Second, @e2e-dev/core is a new package with no CHANGELOG, and the pending-version map gave it 0.0.1 from its own patch bump, while the fixed group releases it at the runner's 0.23.2. Pending versions now expand through the changesets fixed groups before the floor check runs. The mobile floor bullet leaves the engine-peer-floors changeset: the core move already raised that floor to 0.23.2, so this branch no longer changes it. 15 new regression tests; scripts suite 167 green, both release checks green, tsc and oxlint clean.

Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
@Varshith-Kali

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (0a5ee16, the core move) as 74ad193, mergeable again. One conflict in packages/mobile/package.json: I took upstream's side, since its e2e floor is now >=0.23.2, which subsumes the >=0.23.0 this branch had set.

The rebase exposed two gaps in the peer-floor checks themselves, fixed in the same push. First, e2e/agent now re-exports @e2e-dev/core through a bare specifier, and resolveEntryExports only followed relative export star chains, so every name arriving that way read as missing at the 0.23.2 floor. Bare stars now resolve through the named workspace package's exports map, including wildcard entries, read at the same version as the tag lookup. Second, @e2e-dev/core has no CHANGELOG yet and its own patch bump computed 0.0.1, while the fixed group releases it at the runner's 0.23.2. Pending versions now expand through the changesets fixed groups before the floor check runs. The stale mobile bullet left the engine-peer-floors changeset, since the core move already raised that floor.

Verified locally: check:peer-ranges and check:changeset-bumps green, scripts suite 167 green (15 new regression tests), tsc and oxlint clean.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines, not counting tests, fixtures, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(release): engine patch updates make unchanged runner ranges uninstallable

2 participants