Repository navigation
fix(release): enforce the #1657 peer-floor rules in the release checks - #1661
Varshith-Kali wants to merge 12 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 14 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
Addressed all 10 cubic findings in 4e403bd (PR head, mergeable). Fixed 9, declined 1 doc change with a reason:
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. |
okwasniewski
left a comment
There was a problem hiding this comment.
[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
packages/limrun/package.json: please use>=0.12.0, not>=0.11.0. #988 shipped limrun together with a mobileengine.tschange (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 upAGENT_DEVICE_DAEMON_BASE_URL. It's still a patch, since 0.11.1 never shipped. Please update the changeset andpeer-ranges.test.tstoo.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 floor0.15.0 -> 0.23.0with 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).scripts/peer-ranges.test.ts:97-114: the repo-state test callspeerRangeProblemswithoutnextVersions, so a floor naming the pending runner version passescheck-peer-rangesbut failspnpm test. The hard-coded floors test breaks on any later legitimate raise.pnpm checkalready covers both, so please drop them.scripts/engine-exports.test.ts:194-236: these tests read the reale2e@0.22.0ande2e@0.23.0tags, sopnpm testfails in clones without them, andspec.ymlnow fetches full history in all 5 test jobs. Please switch to in-memory fixtures like the unit tests above them, and revert thespec.ymlchange (thecheckjob already hasfetch-depth: 0).scripts/check-peer-ranges.tsoutput: 8 of the 12 packages can't be verified (e2e@0.15.0has 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 functionexport declare const enum- comments inside import lists
import('e2e/engine')
oxc-parseris already a dependency ofpackages/e2e, and its module info would replace most of this file. -
showAtTagis 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.0tag so the import check covers the eight>=0.15.0integrations, or make unverifiable floors fail. - Extend the import check to
@e2e-dev/weband@e2e-dev/mobileimports, now or in a follow-up.
4e403bd to
2408e9c
Compare
|
Thanks for the detailed review. All five must-fixes are in, in 2408e9c (rebased onto current main first).
Nits:
Open maintainer questions (not implemented, for you):
Verified locally: |
okwasniewski
left a comment
There was a problem hiding this comment.
[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
-
scripts/engine-exports.ts: please switch tooxc-parser. 0.158.0 does expose module info:parseSync(file, code).modulehasstaticImports,staticExportsanddynamicImports, each withisType. Using it fromscripts/only needs a root devDep at the version already in the lockfile. The regex parser fails on real input:- a JSDoc
@examplewithimport { x } from 'e2e/engine'in engine source counts as an import.release.ymlrunscheck:peer-rangesbefore publishing, so a doc comment can block a release - a commented-out
// export function gonecounts as an export export const { describe, ... } = test(collect/registry.ts:699) is missed- types inside
export namespace StandardSchemaV1leak out as top-levele2eexports (Props,Result, ...)
This also deletes
stripComments, the five regexes and the dynamic-import blanking. - a JSDoc
Should fix
engine-exports.test.ts:187doesn't test what its name says:isKeyModifierisn'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 thefiles[index]guard. Please restore thetoSorted()on file order too.check-changeset-bumps.ts:44repeats thependingBumpsloop. UseBumpTypeinstead of the inline union.tagExportsAtcould takereadFile(path)and leave the tag to the caller. ThenshowWorkingTreedoesn't need an unused_tag.changeset-bumps.ts:13,86still retell the #1657 history. The changeset could be one line per floor move.- The cubic thread on
AGENTS.md:683is 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.
|
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:
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. |
There was a problem hiding this comment.
All reported issues were addressed across 17 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
okwasniewski
left a comment
There was a problem hiding this comment.
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:
- 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';topackages/web/src, then runnode 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 withimport * as r from 'e2e/runner'passes, but./runnerfirst shipped in 0.19.0, so consumers getERR_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
addinsideengineImports(:113), the only test imports the type first and the value second, so a "last write wins" mutant survives. The cross-fileaddEngineImports(: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
AllandNamebranches inexportedNames(:262) have the same body - the type-only and value loops in
resolveEntryExportsrepeat 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/engineImportProblemsdocs roughly in half.
Nits:
- The
RestElementcheck at :82 is dead code. allResolved(:461) is untested.parsed.errorsis never checked, so a file that fails to parse is read silently.oxc-parseris pinned in both the root andpackages/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.
|
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 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. |
There was a problem hiding this comment.
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
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>
Superseded by re-review of d7fc7d3.
okwasniewski
left a comment
There was a problem hiding this comment.
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)
scripts/engine-exports.ts:402and: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-memorytagExportsAt+engineImportProblemsprobe:import 'e2e/setup'gets a problem. Latent today, but the message is wrong whenever it fires. HavetagExportsAtreturn a distinct missing state. That also letsengineImportProblemsdrop thenamed.length === 0block (:437-455), which callsexportsAtagain and repeats the "cannot be verified" and namespace messages word for word: oneexportsAtper subpath, undefined -> note, missing -> problem,'*'-> note, then the named check (an empty list is trivially fine).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 = falsein 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-70is untested. - A value
export *reached throughexport type *(two hops) has no test (:348). Same behavior as before, coverage only. engineImports'saddclosure andaddEngineImportsboth repeat get-or-create aroundmergeImportKinds; onemergeInto(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.
…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>
|
Addressed review 5853794400 in f49362e:
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. |
|
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. |
|
[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.
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 |
All requested changes addressed in f49362e (automated review)
|
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. |
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>
|
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. |
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>
dc92b4f to
a5aa1a1
Compare
|
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. |
|
CI note on the rebased head (a5aa1a1): the two failures are the same peer-range issue, not the rebase. browser-run only imports types ( |
|
[claude-opus-5-5] automated review on behalf of @okwasniewski Re-checked at Please fold the fix into this PR, because main can't go green with the new check until the floor changes:
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 |
|
Done: the |
There was a problem hiding this comment.
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
|
[claude-opus-5-5] automated review on behalf of @okwasniewski Re-checked at The mobile |
…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>
8ae5ecb to
74ad193
Compare
|
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. |
Issue
Fixes #1657
What changed
e2epeer floor to>=0.22.1, but no stablee2e@0.22.1ever shipped, so a fresh install of an unchanged project one2e ~0.21.3fails 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.scripts/check-peer-ranges.ts: a peer floor must name a version the sibling released (## x.y.zin its CHANGELOG.md), or the runner version in the same release (the version the sibling's pending changesets will release).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.scripts/engine-exports.ts(new): every named import frome2eor ane2e/*entry must be exported bye2eat the floor version, read off thee2e@<version>tag. A newe2e/engineimport counts as raising the floor.e2e >=0.23.0(first version exporting thestepTimeoutvalue and theEngineDoctorChecktypes both engines import), acp toe2e >=0.22.0(first version exporting thee2e/agentrules 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; on0.11.0the local daemon picks upAGENT_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.mdrelease paragraph now names the three rules and the scripts that enforce them.Verified
Ran it locally: yes
pnpm check(full gate): exit 0pnpm run test:scripts: 206 pass, 0 failnode scripts/check-peer-ranges.ts>=0.22.1, acp>=0.21.4, limrun mobile>=0.11.1e2eimports verified against their floorsnode scripts/check-changeset-bumps.ts0.18.0to0.23.0with a patch changeset**Breaking:**minor it passes0.22.0stepTimeout,EngineDoctorCheck,EngineDoctorInfoTwo notes, not failures: the eight packages peering on
e2e >=0.15.0report that the floor cannot be verified from the tag record (e2e@0.15.0was 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) coverse2e/*imports only; an integration's imports from@e2e-dev/webor@e2e-dev/mobileare the same shape but a different sibling, and are a follow-up, not part of this change.