Skip to content

chore(repo): switch package manager references from pnpm to utoo#5959

Open
killagu wants to merge 15 commits into
eggjs:nextfrom
killagu:chore/replace-pnpm-with-utoo
Open

chore(repo): switch package manager references from pnpm to utoo#5959
killagu wants to merge 15 commits into
eggjs:nextfrom
killagu:chore/replace-pnpm-with-utoo

Conversation

@killagu
Copy link
Copy Markdown
Contributor

@killagu killagu commented Jun 2, 2026

Summary

  • Replace pnpm with utoo across docs, top-level scripts, and CI workflows so the repo guidance matches the package manager the project actually uses.
  • Update packageManager in package.json to utoo@1.0.28; switch scripts/{publish,version,utils}.js to invoke utoo (and align their comments).
  • In .github/workflows/release.yml and .github/workflows/e2e-test.yml, swap pnpm/action-setup for utooland/setup-utoo and call ut / utoo (mirroring the pattern already used by ci.yml).
  • Preserve filenames (pnpm-lock.yaml, pnpm-workspace.yaml) and the CLI argument value in ut install --from pnpm — those reference real artifacts on disk and a flag value, not tool invocations.
  • Out of scope (intentionally untouched): historical CHANGELOG.md entries, source code that detects pnpm node_modules layouts (packages/core/src/loader/*), and the plugin-pnpm* test fixtures.

Test plan

  • CI green on next for typecheck, build, lint, format check, and tests.
  • release.yml (workflow_dispatch dry-run) completes through install + build using ut install --from pnpm and ut run build.
  • e2e-test.yml succeeds end-to-end; in particular confirm PUBLINT_PACK: utoo is accepted by publint — if not, revert that env var to npm and keep the rest.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Switched project package manager metadata and CI/release/publish workflows from pnpm to utoo.
    • Added a packaging CLI to produce package tarballs and adjusted publish/version tooling to use utoo.
    • Bumped required Node.js minimum to >= 22.18.0.
  • Documentation

    • Updated README, guides, quickstarts and contributor docs to use utoo install/run/build/test commands.

Replace `pnpm` with `utoo` across docs, top-level scripts, and CI
workflows. Lockfile / workspace filenames (`pnpm-lock.yaml`,
`pnpm-workspace.yaml`) and the `ut install --from pnpm` flag value
are preserved because they refer to real artifacts on disk and to a
CLI argument, not to a tool invocation.

- AGENTS.md, README.md/README.zh-CN.md, packages/egg/README.md,
  tools/create-egg/README.md, plugins/redis/README.md,
  wiki/concepts/repository-map.md, tegg/CLAUDE.md,
  .github/copilot-instructions.md: rewrite command snippets and prose.
- package.json: bump `packageManager` to `utoo@1.0.28`.
- scripts/{publish,version,utils}.js: invoke `utoo` instead of
  `pnpm` and update comments.
- .github/workflows/release.yml, .github/workflows/e2e-test.yml:
  swap pnpm/action-setup for utooland/setup-utoo and call `ut` / `utoo`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 11:34
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR replaces pnpm with utoo/ut across the repo: updates package.json, GitHub Actions (release and E2E), adds a pack-all script, adjusts publish/version scripts, and converts developer- and user-facing documentation and examples to utoo/ut commands.

Changes

Package Manager Migration from pnpm to utoo

Layer / File(s) Summary
Package Manager Configuration
package.json
packageManager updated from pnpm@10.28.0 to utoo@1.0.28.
CI and Release Workflows
.github/workflows/release.yml, .github/workflows/e2e-test.yml
Workflows switched to setup/install utoo and use ut install --from pnpm and ut run build; E2E packaging now uses the repo pack-all script.
Repository packaging script
scripts/pack-all.js, .github/workflows/e2e-test.yml
New pack-all.js script runs npm pack per publishable package into the repo root; CI uses this instead of pnpm -r pack.
Publish & Version Scripts
scripts/publish.js, scripts/utils.js, scripts/version.js
Publish helper now invokes ut per-package with npm-style args and updated comments/dry-run messages; workspace wording updated to utoo.
Core Contributor Instructions
.github/copilot-instructions.md, AGENTS.md
Contributor bootstrapping, essential commands, validation steps, and workspace wording changed to utoo/ut command examples (includes corepack enable utoo and utoo --filter=...).
User-Facing README & Examples
README.md, README.zh-CN.md, packages/egg/README.md, plugins/redis/README.md, tools/create-egg/README.md
Quickstart and example commands switched to use ut/utoo for create/install/run/dev/test and filtered invocations.
Developer Guides & Wiki
tegg/CLAUDE.md, wiki/concepts/repository-map.md
Developer guidance and repository map updated to reference utoo workspaces and ut/utoo command patterns.
Dev services messages
scripts/dev-services.js
Error/recovery messages now instruct using ut run dev:services:reset instead of utoo.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • eggjs/egg#5859: Overlaps workflow dependency-install step changes affecting E2E workflow.
  • eggjs/egg#5739: Related E2E workflow edits previously using pnpm that overlap on steps.
  • eggjs/egg#5830: CI/workflow pnpm→utoo migration with similar ut run ... changes.

Suggested labels

chore: gitAction

Suggested reviewers

  • fengmk2
  • jerryliang64
  • gxkl

"🐰 I hopped through docs and CI tonight,
swapping pnpm for utoo with delight.
Workflows pack and scripts now sing anew,
README hops forward — fresh commands to view.
Carrots and commits, a tidy little bite."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: switching package manager references from pnpm to utoo across the repository.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the monorepo's package manager from pnpm to utoo across configuration files, scripts, and documentation. The review feedback points out a version mismatch in the Copilot instructions file, where the specified utoo version (v10.16.0) does not match the version configured in package.json (1.0.28), and provides a suggestion to correct it.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .github/copilot-instructions.md Outdated

- **Node.js >= 20.19.0 required** - This is a hard requirement
- Enable pnpm first: `corepack enable pnpm` (installs pnpm v10.16.0)
- Enable utoo first: `corepack enable utoo` (installs utoo v10.16.0)
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.

medium

The version of utoo specified here (v10.16.0) is outdated and does not match the version configured in package.json (1.0.28). It should be updated to reflect the correct version.

Suggested change
- Enable utoo first: `corepack enable utoo` (installs utoo v10.16.0)
- Enable utoo first: `corepack enable utoo` (installs utoo v1.0.28)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 26b1a40 — bumped to v1.0.28 to match package.json's packageManager field.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.21%. Comparing base (b015dce) to head (2a5ba86).
⚠️ Report is 1 commits behind head on next.

❗ There is a different number of reports uploaded between BASE (b015dce) and HEAD (2a5ba86). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (b015dce) HEAD (2a5ba86)
6 2
Additional details and impacted files
@@             Coverage Diff             @@
##             next    #5959       +/-   ##
===========================================
- Coverage   85.30%   65.21%   -20.09%     
===========================================
  Files         670        1      -669     
  Lines       19552       23    -19529     
  Branches     3863        9     -3854     
===========================================
- Hits        16678       15    -16663     
+ Misses       2481        7     -2474     
+ Partials      393        1      -392     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates repository-facing documentation, scripts, and CI workflows to reference utoo instead of pnpm, aligning contributor guidance and automation with the project’s actual package manager usage while preserving pnpm-specific artifact filenames/flags where required (e.g., pnpm-workspace.yaml, ut install --from pnpm).

Changes:

  • Replace pnpm CLI references with utoo / ut across root/package/plugin docs and agent guidance.
  • Update root packageManager to utoo@1.0.28 and switch release utility scripts to invoke utoo.
  • Update GitHub Actions workflows (release + e2e) to use utooland/setup-utoo and ut/utoo commands.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wiki/concepts/repository-map.md Updates wiki description of the monorepo package manager to utoo.
tools/create-egg/README.md Updates scaffolding instructions to use utoo create egg.
tegg/CLAUDE.md Updates tegg contributor commands from pnpm to utoo.
scripts/version.js Updates dry-run guidance output to suggest utoo run version:*.
scripts/utils.js Updates comment to refer to utoo workspace (still reads pnpm-workspace.yaml).
scripts/publish.js Switches publish implementation from invoking pnpm to invoking utoo.
README.zh-CN.md Updates quickstart commands to utoo.
README.md Updates quickstart/monorepo commands and descriptions to utoo.
plugins/redis/README.md Updates plugin test command to utoo.
packages/egg/README.md Updates quickstart commands and notes to utoo.
package.json Sets packageManager to utoo@1.0.28.
AGENTS.md Updates agent guidance and core commands from pnpm to utoo.
.github/workflows/release.yml Uses setup-utoo and ut install --from pnpm, updates build step to ut run build.
.github/workflows/e2e-test.yml Uses setup-utoo and utoo/ut commands; adjusts publint pack env var (needs follow-up).
.github/copilot-instructions.md Updates Copilot guidance from pnpm to utoo (contains version/engine mismatches).

Comment thread .github/workflows/e2e-test.yml Outdated
Comment on lines +157 to +161
# publint pack defaults to npm (main CI env has no utoo); in E2E we
# already have utoo installed and npm pack against utoo's symlinked
# node_modules is ~10x slower, so prefer utoo pack here
PUBLINT_PACK: utoo
run: ut run build
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — this was the actual cause of the failing E2E checks. Fixed in 26b1a40 by removing the PUBLINT_PACK: utoo env var so publint falls back to its default npm pack, matching the main CI environment.

Comment thread .github/copilot-instructions.md Outdated
Comment on lines +13 to +14
- **Node.js >= 20.19.0 required** - This is a hard requirement
- Enable pnpm first: `corepack enable pnpm` (installs pnpm v10.16.0)
- Enable utoo first: `corepack enable utoo` (installs utoo v10.16.0)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Both mismatches fixed in 26b1a40 — Node bumped to >=22.18.0 and utoo to v1.0.28 to track package.json's engines and packageManager fields.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/publish.js (1)

56-71: ⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

Fix utoo publish flag compatibility in scripts/publish.js

scripts/publish.js builds utoo --filter <pkg> publish --no-git-checks --access public --tag <npmTag> [--provenance] [--dry-run], but utoo’s publish command documents only --tag, --dry-run, and --otp—so the extra flags (--filter, --no-git-checks, --access, and conditional --provenance) are likely unsupported and can break publishing (the script retries once and exits process.exit(1) if anything still fails). e2e-test.yml only uses utoo -r pack, so the same publish-flag issue doesn’t apply there.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/publish.js` around lines 56 - 71, publishOne(pkg) is passing
unsupported utoo flags (--filter, --no-git-checks, --access, --provenance) which
can break publish; remove those flags and instead invoke utoo's publish command
from the package's own directory so workspace context is preserved. Update
publishOne(pkg) to call execFileSync('utoo', ['publish', '--tag', npmTag,
...(isDryRun ? ['--dry-run'] : []), ...(otpValue ? ['--otp', otpValue] : [])], {
cwd: pkgDir /* use the package's directory property */, stdio: 'inherit', env: {
...process.env, NPM_CONFIG_LOGLEVEL: 'verbose' }, timeout: 120000 }); — keep
npmTag, isDryRun, baseDir references as needed but set cwd to the package path
and drop --filter, --no-git-checks, --access, and --provenance.
🧹 Nitpick comments (3)
AGENTS.md (1)

21-27: ⚡ Quick win

Add explicit corepack enable utoo before command list.

Please include the enable step before utoo install in the canonical command section to avoid bootstrap failures on clean machines.

Based on learnings: "Enable utoo first with 'corepack enable utoo' before running install and build commands in the monorepo".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 21 - 27, Add an explicit "corepack enable utoo" step
before the listed canonical commands: update the AGENTS.md command section so
the first step is to run corepack enable utoo (preceding the `utoo install`,
`utoo run build`, `utoo run test`, `utoo run lint`, and `utoo run typecheck`
entries) and ensure any example usage (e.g., `utoo --filter=egg run test` /
`utoo --filter=site run dev`) remains unchanged and follows the install/build
steps.
scripts/version.js (1)

124-124: 💤 Low value

Minor: align command alias with the rest of the repo.

This prints utoo run version:..., while package.json scripts and the workflows consistently use the ut alias (e.g. ut run build). Consider ut run version:${versionType} for consistency in user-facing guidance. Functionally equivalent if both aliases are installed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/version.js` at line 124, The console.log in scripts/version.js
currently prints "utoo run version:${versionType}" which is inconsistent with
the repo's alias; update the message in the console.log call to use the "ut"
alias instead (e.g. "ut run version:${versionType}") so the user-facing guidance
matches package.json scripts and workflows; locate the console.log statement
that references versionType and replace the displayed command string
accordingly.
.github/workflows/release.yml (1)

65-66: 💤 Low value

Clarify the setup-utoo ref comment (SHA pin is already sufficient)

File: .github/workflows/release.yml
Lines: 65-66

      - name: Setup utoo
        uses: utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb # main

The step is already pinned to an immutable commit SHA, so it’s not “tracking” main in practice. The # main comment is potentially misleading, and this specific commit doesn’t appear to be publicly associated with a named release tag in the utooland/setup-utoo repo. Either update the comment to match the actual upstream ref you intend, or drop it; if you specifically want the latest v1 release, pin to that release tag’s commit instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 65 - 66, The comment after the
uses line for the "Setup utoo" step is misleading because the action is already
pinned to a commit SHA; either remove the trailing "# main" comment or replace
it with the actual intended upstream ref (e.g., the release tag or branch name)
or pin to the release tag commit (e.g., v1) instead; update the line that
references utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb (the
uses entry for the "Setup utoo" step) accordingly so the comment accurately
reflects the chosen ref or is removed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@scripts/publish.js`:
- Around line 56-71: publishOne(pkg) is passing unsupported utoo flags
(--filter, --no-git-checks, --access, --provenance) which can break publish;
remove those flags and instead invoke utoo's publish command from the package's
own directory so workspace context is preserved. Update publishOne(pkg) to call
execFileSync('utoo', ['publish', '--tag', npmTag, ...(isDryRun ? ['--dry-run'] :
[]), ...(otpValue ? ['--otp', otpValue] : [])], { cwd: pkgDir /* use the
package's directory property */, stdio: 'inherit', env: { ...process.env,
NPM_CONFIG_LOGLEVEL: 'verbose' }, timeout: 120000 }); — keep npmTag, isDryRun,
baseDir references as needed but set cwd to the package path and drop --filter,
--no-git-checks, --access, and --provenance.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 65-66: The comment after the uses line for the "Setup utoo" step
is misleading because the action is already pinned to a commit SHA; either
remove the trailing "# main" comment or replace it with the actual intended
upstream ref (e.g., the release tag or branch name) or pin to the release tag
commit (e.g., v1) instead; update the line that references
utooland/setup-utoo@3a51006d0b66afcc32d1b9177a4b200b74f4a8cb (the uses entry for
the "Setup utoo" step) accordingly so the comment accurately reflects the chosen
ref or is removed.

In `@AGENTS.md`:
- Around line 21-27: Add an explicit "corepack enable utoo" step before the
listed canonical commands: update the AGENTS.md command section so the first
step is to run corepack enable utoo (preceding the `utoo install`, `utoo run
build`, `utoo run test`, `utoo run lint`, and `utoo run typecheck` entries) and
ensure any example usage (e.g., `utoo --filter=egg run test` / `utoo
--filter=site run dev`) remains unchanged and follows the install/build steps.

In `@scripts/version.js`:
- Line 124: The console.log in scripts/version.js currently prints "utoo run
version:${versionType}" which is inconsistent with the repo's alias; update the
message in the console.log call to use the "ut" alias instead (e.g. "ut run
version:${versionType}") so the user-facing guidance matches package.json
scripts and workflows; locate the console.log statement that references
versionType and replace the displayed command string accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 595a3cf3-75db-4a32-bb14-923d1891e117

📥 Commits

Reviewing files that changed from the base of the PR and between 7e6be0e and ab76d57.

📒 Files selected for processing (15)
  • .github/copilot-instructions.md
  • .github/workflows/e2e-test.yml
  • .github/workflows/release.yml
  • AGENTS.md
  • README.md
  • README.zh-CN.md
  • package.json
  • packages/egg/README.md
  • plugins/redis/README.md
  • scripts/publish.js
  • scripts/utils.js
  • scripts/version.js
  • tegg/CLAUDE.md
  • tools/create-egg/README.md
  • wiki/concepts/repository-map.md

killagu and others added 2 commits June 2, 2026 19:45
…sions

- E2E `Build all packages` was failing because `PUBLINT_PACK: utoo`
  is not in publint's supported set (`npm | pnpm | yarn | bun`).
  Falling back to the default (`npm`) so publint's per-package pack
  succeeds again, matching the main CI environment.
- Align `.github/copilot-instructions.md` Node and utoo versions with
  the values declared in `package.json` (`engines.node >=22.18.0`,
  `packageManager: utoo@1.0.28`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- scripts/publish.js: invoke `utoo publish` from each package's own
  directory so utoo's supported flag set works. Drop pnpm-only flags
  (`--filter`, `--no-git-checks`); keep the npm-standard `--access`
  and `--provenance` flags that utoo forwards to npm.
- AGENTS.md: prepend `corepack enable utoo` to the canonical commands
  so a clean machine boots into the pinned utoo version.
- scripts/version.js: print the `ut run version:<type>` alias used by
  the rest of the repo (workflows + package.json scripts).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 11:49
@killagu
Copy link
Copy Markdown
Contributor Author

killagu commented Jun 2, 2026

@coderabbitai thanks — addressed in 8a96e3e:

  • publish.js (critical): dropped pnpm-only flags (--filter, --no-git-checks), kept npm-standard --access/--provenance (utoo forwards them to npm), and now cd's into each package directory so workspace context is preserved without --filter.
  • AGENTS.md (quick win): prepended corepack enable utoo to the canonical command list.
  • version.js (low value): switched the printed command from utoo run to the ut run alias used by the rest of the repo.
  • release.yml # main comment (low value): skipped — ci.yml already uses the same SHA-pinned-with-# main pattern for setup-utoo, so keeping them consistent is more valuable than rewriting one in isolation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Tip

For best results, initiate chat on the files or code changes.

@killagu Thanks for the detailed summary! All the changes look well-considered:

  • publish.js: The cd-into-directory approach is a clean solution — it avoids workspace-manager-specific flags while keeping each package's context correct for publishing.
  • AGENTS.md: corepack enable utoo as a first step makes sense.
  • version.js: Consistent with the rest of the repo using the ut alias.
  • release.yml comment: Agreed — keeping it consistent with ci.yml's existing SHA-pinned pattern is the right call over a one-off change.

🐇 ✨

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
.github/copilot-instructions.md (3)

95-95: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Command inconsistency in development workflow and validation sections.

Multiple locations still reference utoo run <script> instead of ut run <script>:

  • Line 95: Build instruction in "Making Changes"
  • Lines 111-120: All validation step commands
  • Line 181: Build reminder in "Build Issues"
  • Lines 220-223: All validation scenario commands
🔧 Proposed fix
 ### 1. Making Changes
 
-- Always build packages first: `utoo run build`
+- Always build packages first: `ut run build`
 - Work primarily in `packages/egg/src/` for core framework features
 **Always perform these validation steps after making changes:**
 
 ```bash
 # 1. Build all packages (required)
-utoo run build
+ut run build
 
 # 2. Run linting
-utoo run lint
+ut run lint
 
 # 3. Run tests (some failures are expected in fresh environment)
-utoo run test
+ut run test
 
 # 4. Test documentation site
-utoo run site:dev
+ut run site:dev

```diff
 ### Build Issues
 
-- Always run `utoo run build` after making changes
+- Always run `ut run build` after making changes
 - TypeScript compilation errors will show clearly
 After making changes, always verify:
 
-1. **Build Success**: `utoo run build` completes without errors
-2. **Linting Passes**: `utoo run lint` shows no new errors
-3. **Documentation Loads**: `utoo run site:dev` starts successfully and site loads at http://localhost:8000
-4. **Tests Run**: `utoo run test` executes (some failures expected, focus on your changes)
+1. **Build Success**: `ut run build` completes without errors
+2. **Linting Passes**: `ut run lint` shows no new errors
+3. **Documentation Loads**: `ut run site:dev` starts successfully and site loads at http://localhost:8000
+4. **Tests Run**: `ut run test` executes (some failures expected, focus on your changes)

Also applies to: 111-120, 181-181, 220-223

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/copilot-instructions.md at line 95, Replace incorrect developer
commands that use "utoo run <script>" with the correct "ut run <script>"
throughout the document; specifically update each occurrence of "utoo run
build", "utoo run lint", "utoo run test", and "utoo run site:dev" to "ut run
build", "ut run lint", "ut run test", and "ut run site:dev" respectively (these
tokens identify the locations to change).

82-89: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Command inconsistency in package-specific commands.

Examples use utoo --filter=<package> but should use ut --filter=<package> to match actual repository commands.

🔧 Proposed fix
-Run commands for specific packages using `utoo --filter=<package>`:
+Run commands for specific packages using `ut --filter=<package>`:
 
 ```bash
 # Examples
-utoo --filter=egg run test
-utoo --filter=`@eggjs/core` run build
-utoo --filter=site run dev
+ut --filter=egg run test
+ut --filter=`@eggjs/core` run build
+ut --filter=site run dev

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/copilot-instructions.md around lines 82 - 89, Update the example
commands in .github/copilot-instructions.md to use the correct CLI name: replace
all occurrences of "utoo --filter=" with "ut --filter=" in the
three example lines (the examples currently showing "utoo --filter=egg run
test", "utoo --filter=@eggjs/core run build", and "utoo --filter=site run dev");
ensure the rest of each example (flags and subcommands) remains unchanged.


</details>

---

`57-78`: _⚠️ Potential issue_ | _🔴 Critical_ | _⚡ Quick win_

**Command inconsistency in build, test, lint, and documentation sections.**

All command examples use `utoo run <script>`, but should use `ut run <script>` to match the actual repository commands.

Additionally, **line 73** has a hybrid command that doesn't match the repository scripts:
- Current: `cd site && utoo run build:skip`
- package.json line 34: `"site:build": "cd site && npm run build"`
- Should be: `ut run site:build` (from root) to match line 222




<details>
<summary>🔧 Proposed fix</summary>

```diff
 ### Build Commands
 
-- `utoo run build` - **Build all packages (~14 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
-- `utoo run clean` - Clean all dist directories
+- `ut run build` - **Build all packages (~14 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
+- `ut run clean` - Clean all dist directories
 
 ### Testing Commands
 
-- `utoo run test` - **Run all tests (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
-- `utoo run test:cov` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
-- `utoo run ci` - **Run test coverage + build (~2.1 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
+- `ut run test` - **Run all tests (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
+- `ut run test:cov` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
+- `ut run ci` - **Run test coverage + build (~2.1 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
 
 ### Linting Commands
 
-- `utoo run lint` - Run oxlint across all packages (~2 seconds)
+- `ut run lint` - Run oxlint across all packages (~2 seconds)
 
 ### Documentation Commands
 
-- `utoo run site:dev` - Start documentation dev server at http://localhost:8000
-- `cd site && utoo run build:skip` - **Build documentation site (~24 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
+- `ut run site:dev` - Start documentation dev server at http://localhost:8000
+- `ut run site:build` - **Build documentation site (~24 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
 
 ### Example Applications (Currently Not Working)
 
-- `utoo run example:commonjs` - Start CommonJS example (has runtime issues)
-- `utoo run example:typescript` - Start TypeScript example (has runtime issues)
+- `ut run example:commonjs` - Start CommonJS example (has runtime issues)
+- `ut run example:typescript` - Start TypeScript example (has runtime issues)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/copilot-instructions.md around lines 57 - 78, The docs use the wrong
npm-run prefix "utoo run" and one hybrid command; update all occurrences to the
correct "ut run" form (e.g., change `utoo run build`, `utoo run clean`, `utoo
run test`, `utoo run test:cov`, `utoo run ci`, `utoo run lint`, `utoo run
site:dev`, `utoo run example:commonjs`, `utoo run example:typescript`) and
replace the hybrid `cd site && utoo run build:skip` with the canonical root
command `ut run site:build` to match the repository scripts (referencing the
script names site:build and site:dev).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/copilot-instructions.md:
- Line 14: The docs reference the wrong CLI name and a potentially invalid
Corepack step; replace all occurrences of "utoo" with "ut" (e.g., change
"corepack enable utoo" and "utoo run build:skip" to use "ut"), and update the
bootstrap instruction to a valid Corepack/installer step for this repo (either
remove "corepack enable utoo" and use a generic "corepack enable" plus the
recommended prepare/activate step for the package manager, or explicitly
document installing/activating the "ut" shim), and ensure the example command
referencing "build:skip" maps to the real npm script (e.g., "ut run site:build"
or "ut run build:skip" only if that script exists in package.json).

---

Outside diff comments:
In @.github/copilot-instructions.md:
- Line 95: Replace incorrect developer commands that use "utoo run <script>"
with the correct "ut run <script>" throughout the document; specifically update
each occurrence of "utoo run build", "utoo run lint", "utoo run test", and "utoo
run site:dev" to "ut run build", "ut run lint", "ut run test", and "ut run
site:dev" respectively (these tokens identify the locations to change).
- Around line 82-89: Update the example commands in
.github/copilot-instructions.md to use the correct CLI name: replace all
occurrences of "utoo --filter=<package>" with "ut --filter=<package>" in the
three example lines (the examples currently showing "utoo --filter=egg run
test", "utoo --filter=`@eggjs/core` run build", and "utoo --filter=site run dev");
ensure the rest of each example (flags and subcommands) remains unchanged.
- Around line 57-78: The docs use the wrong npm-run prefix "utoo run" and one
hybrid command; update all occurrences to the correct "ut run" form (e.g.,
change `utoo run build`, `utoo run clean`, `utoo run test`, `utoo run test:cov`,
`utoo run ci`, `utoo run lint`, `utoo run site:dev`, `utoo run
example:commonjs`, `utoo run example:typescript`) and replace the hybrid `cd
site && utoo run build:skip` with the canonical root command `ut run site:build`
to match the repository scripts (referencing the script names site:build and
site:dev).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc2d5ec3-7eaf-4f97-801d-8b5fd308edfb

📥 Commits

Reviewing files that changed from the base of the PR and between ab76d57 and 26b1a40.

📒 Files selected for processing (2)
  • .github/copilot-instructions.md
  • .github/workflows/e2e-test.yml
💤 Files with no reviewable changes (1)
  • .github/workflows/e2e-test.yml

Comment thread .github/copilot-instructions.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Comment thread .github/copilot-instructions.md Outdated
Comment on lines +57 to +58
- `utoo run build` - **Build all packages (~14 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
- `utoo run clean` - Clean all dist directories
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 585d981 — changed to ut run clean-dist to match the actual root script. (Also caught example:commonjs/example:typescriptexample:dev:commonjs/example:dev:typescript while in the same file.)

Comment thread tegg/CLAUDE.md Outdated
pnpm run build # Build all packages including tegg (runs build in all workspaces)
pnpm run clean # Clean all build artifacts including tegg (removes dist, tsbuildinfo)
utoo run build # Build all packages including tegg (runs build in all workspaces)
utoo run clean # Clean all build artifacts including tegg (removes dist, tsbuildinfo)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 585d981ut run cleanut run clean-dist to match the root script.

utoo doesn't implement pnpm's recursive `-r pack`, so the E2E
"Pack packages into tgz" step was failing with
`error: unexpected argument '-r' found`. Replace it with a small
node script that reuses the publish-script's package discovery and
runs `npm pack --pack-destination <repoRoot>` per publishable
package, matching the tgz layout `ecosystem-ci/patch-project.ts`
expects (repo-root-relative file:// overrides).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
scripts/pack-all.js (1)

14-14: Confirm getPublishablePackages returns { directory, folder }
scripts/utils.js exports getPublishablePackages(baseDir) and it builds/pushes package objects containing both folder and directory (also throwing a clear error if pnpm-workspace.yaml is missing). This matches what scripts/pack-all.js expects when forming the cwd for npm pack.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/pack-all.js` at line 14, Confirm that the function
getPublishablePackages in scripts/utils.js returns objects containing both
properties named directory and folder (and throws a clear error if
pnpm-workspace.yaml is missing), because scripts/pack-all.js uses those keys to
form the cwd for the npm pack call; if the function does not return both fields
or the error behavior differs, update getPublishablePackages to include both
directory and folder on each package object and to throw a descriptive error
when pnpm-workspace.yaml is absent so pack-all.js can safely use pkg.directory
and pkg.folder when constructing the npm pack cwd.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@scripts/pack-all.js`:
- Line 14: Confirm that the function getPublishablePackages in scripts/utils.js
returns objects containing both properties named directory and folder (and
throws a clear error if pnpm-workspace.yaml is missing), because
scripts/pack-all.js uses those keys to form the cwd for the npm pack call; if
the function does not return both fields or the error behavior differs, update
getPublishablePackages to include both directory and folder on each package
object and to throw a descriptive error when pnpm-workspace.yaml is absent so
pack-all.js can safely use pkg.directory and pkg.folder when constructing the
npm pack cwd.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1abed799-6af9-4876-9aec-d555acaf3b2c

📥 Commits

Reviewing files that changed from the base of the PR and between 8a96e3e and a0c2ddf.

📒 Files selected for processing (2)
  • .github/workflows/e2e-test.yml
  • scripts/pack-all.js

CodeRabbit / Copilot caught that the docs reference \`utoo run …\`
while package.json scripts and CI workflows all use the \`ut\` alias,
and some referenced root scripts (\`clean\`, \`build:skip\`,
\`example:commonjs\`/\`example:typescript\`) don't exist.

- Rewrite \`utoo install/run/create/test/pack/publish/--filter/-r\` to
  the matching \`ut …\` form in README.md, README.zh-CN.md,
  packages/egg/README.md, tools/create-egg/README.md,
  plugins/redis/README.md, tegg/CLAUDE.md, AGENTS.md,
  .github/copilot-instructions.md, scripts/publish.js, and
  scripts/dev-services.js. Keep the \`utoo\` package name (corepack,
  \`packageManager\`, prose) intact.
- Fix script name drift: \`ut run clean\` → \`ut run clean-dist\`,
  \`ut run build:skip\` → \`ut run build\`,
  \`ut run example:{commonjs,typescript}\` → \`ut run example:dev:{commonjs,typescript}\`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 12:02
`ut pm-pack` does not yet resolve `workspace:` / `catalog:` protocols
inside the packed manifests, so downstream `npm install` in the
ecosystem-ci projects fails with `EUNSUPPORTEDPROTOCOL`. `npm pack`
has the same limitation, which is why the previous attempt with
scripts/pack-all.js also broke.

Keep pnpm available just for the pack step and drop the unused
scripts/pack-all.js. The rest of the workflow stays on utoo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Comment thread .github/copilot-instructions.md Outdated
Comment on lines +62 to +64
- `ut run test` - **Run all tests (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
- `ut run test:cov` - **Run tests with coverage (~2 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
- `ut run ci` - **Run test coverage + build (~2.1 minutes). NEVER CANCEL. Set timeout to 180+ seconds.**
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 2a4c085ut run ci description now matches the actual script (ut run test -- --coverage, no build).

Comment thread .github/copilot-instructions.md Outdated
Comment on lines +72 to +73
- `ut run site:dev` - Start documentation dev server at http://localhost:8000
- `cd site && ut run build` - **Build documentation site (~24 seconds). NEVER CANCEL. Set timeout to 60+ seconds.**
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 2a4c085 — dropped the localhost:8000 claim (VitePress picks its own port), and switched the build invocation to the root ut run site:build script.

Comment thread scripts/utils.js Outdated
import yaml from 'js-yaml';

// Get all publishable packages from pnpm workspace
// Get all publishable packages from utoo workspace
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Clarified in 2a4c085 — comment now states explicitly that utoo reads the existing pnpm-workspace.yaml, matching the code.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/publish.js (1)

93-109: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Dry-run publish errors never fail the script.

When isDryRun is true, this catch path still queues the package in toRetry, but the retry block is skipped by && !isDryRun. That leaves finalFailed empty, so the script prints a successful summary and exits 0 even if ut publish --dry-run failed for one or more packages. That makes the release workflow's dry-run gate unreliable.

Suggested fix
-const published = [];
-const skipped = [];
-const toRetry = [];
+const published = [];
+const skipped = [];
+const toRetry = [];
+const finalFailed = [];
@@
   } catch {
     // Double-check: the publish might have actually succeeded
     // (e.g. npm returned non-zero but the package landed)
     if (!isDryRun && isPublished(pkg.name, pkg.version)) {
       console.log(`  ⏭️  ${label} already published (confirmed after error)`);
       skipped.push(label);
+    } else if (isDryRun) {
+      console.error(`  ❌ ${label} dry-run failed`);
+      finalFailed.push(label);
     } else {
       console.error(`  ❌ ${label} failed, will retry`);
       toRetry.push(pkg);
     }
   }
 }
 
 // Retry failed packages once
-const finalFailed = [];
 if (toRetry.length > 0 && !isDryRun) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/publish.js` around lines 93 - 109, The catch path currently queues
failed packages into toRetry but the retry loop is skipped when isDryRun is
true, causing dry-run failures to be ignored; update the catch block handling
around isDryRun/isPublished so that when isDryRun is true and the publish
attempt throws, the package is added to finalFailed (and an error logged)
instead of being silently ignored or queued for retry; reference the
variables/functions label, pkg, isDryRun, isPublished, skipped, toRetry, and
finalFailed when making this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 21-27: Update the canonical commands list to include the missing
validation step `ut run site:dev` and explicitly state the mandated validation
order: run `ut run build` → `ut run lint` → `ut run test` → `ut run site:dev`;
ensure the bullet list replaces the current unordered steps with the ordered
sequence and add a brief note that filtered commands (e.g. `ut --filter=egg run
test` or `ut --filter=site run dev`) may be used for focused work but do not
replace the full validation sequence.

In `@packages/egg/README.md`:
- Around line 23-27: Prepend the utoo bootstrap step to the quickstart by
instructing users to run "corepack enable utoo" (which installs utoo v1.0.28)
before any ut commands; update the snippet around the mkdir/npm init/ut commands
(the block that currently shows "npm init egg --type=simple", "ut install", "ut
run dev") to include the corepack enable utoo step first so a clean machine will
have utoo enabled prior to running ut install or ut run dev.

In `@README.md`:
- Around line 29-33: The README code blocks invoking the ut CLI (e.g., sequences
starting with "ut create", "ut install", "ut run dev") are missing the
prerequisite bootstrap step; update each affected code sample (including the
block containing "ut create egg@beta" and the other examples referenced) to
prepend the required command corepack enable utoo (which installs utoo v1.0.28)
before any ut commands so users on a clean machine won't fail before
install/dev/service commands; ensure the explanatory text mentions enabling utoo
first per the project guideline.

---

Outside diff comments:
In `@scripts/publish.js`:
- Around line 93-109: The catch path currently queues failed packages into
toRetry but the retry loop is skipped when isDryRun is true, causing dry-run
failures to be ignored; update the catch block handling around
isDryRun/isPublished so that when isDryRun is true and the publish attempt
throws, the package is added to finalFailed (and an error logged) instead of
being silently ignored or queued for retry; reference the variables/functions
label, pkg, isDryRun, isPublished, skipped, toRetry, and finalFailed when making
this change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5b4ceb70-1bb6-4b5a-923c-f3f3ff1b9b7a

📥 Commits

Reviewing files that changed from the base of the PR and between a0c2ddf and 585d981.

📒 Files selected for processing (10)
  • .github/copilot-instructions.md
  • AGENTS.md
  • README.md
  • README.zh-CN.md
  • packages/egg/README.md
  • plugins/redis/README.md
  • scripts/dev-services.js
  • scripts/publish.js
  • tegg/CLAUDE.md
  • tools/create-egg/README.md
✅ Files skipped from review due to trivial changes (5)
  • plugins/redis/README.md
  • scripts/dev-services.js
  • README.zh-CN.md
  • .github/copilot-instructions.md
  • tegg/CLAUDE.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • tools/create-egg/README.md

Comment thread AGENTS.md
Comment on lines +21 to +27
- `corepack enable utoo` enables the pinned utoo version on a clean machine.
- `ut install` hydrates the workspace.
- `ut run build` builds all packages.
- `ut run test` runs the main test suite.
- `ut run lint` runs linting.
- `ut run typecheck` runs TypeScript checking.
- use filtered commands for focused work, for example `ut --filter=egg run test` or `ut --filter=site run dev`.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Jun 2, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Document the required validation sequence in the canonical command list.

AGENTS.md is the shared source of truth, but this section still omits the required ut run site:dev step and the mandated build → lint → test → site:dev order. Agents following this file will miss repo-required validation.

As per coding guidelines "Run validation steps in sequence after making changes: (1) build all packages with ut run build, (2) run linting with ut run lint, (3) run tests with ut run test, (4) test documentation site with ut run site:dev".

🧰 Tools
🪛 LanguageTool

[style] ~26-~26: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...intruns linting. -ut run typecheck` runs TypeScript checking. - use filtered com...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 21 - 27, Update the canonical commands list to
include the missing validation step `ut run site:dev` and explicitly state the
mandated validation order: run `ut run build` → `ut run lint` → `ut run test` →
`ut run site:dev`; ensure the bullet list replaces the current unordered steps
with the ordered sequence and add a brief note that filtered commands (e.g. `ut
--filter=egg run test` or `ut --filter=site run dev`) may be used for focused
work but do not replace the full validation sequence.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Skipping for this PR — adding a mandated build → lint → test → site:dev validation sequence to AGENTS.md is a new convention beyond the pnpm→utoo rename scope. Happy to land it in a follow-up.

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.

@killagu, that's a fair scope boundary — keeping this PR focused on the rename makes sense. Would you like me to open a GitHub issue to track adding the mandated build → lint → test → site:dev validation sequence to AGENTS.md as a follow-up?

Comment thread packages/egg/README.md
Comment thread README.md
killagu and others added 2 commits June 2, 2026 20:11
Without an explicit \`version\` input, \`pnpm/action-setup\` reads
\`packageManager\` from package.json — which now declares \`utoo@1.0.28\`,
not pnpm — and aborts with \`Invalid packageManager field in
package.json\`. Pin to \`10\` (matches the prior \`pnpm@10.28.0\` we used)
so the pack step bootstraps regardless of the \`packageManager\` value.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- .github/copilot-instructions.md: `ut run ci` actually runs tests
  with coverage only (no build); rewrite description accordingly.
  Site dev server uses VitePress' default port, not :8000; drop the
  hard-coded URL. Replace the `cd site && ut run build` invocation
  with the root `ut run site:build` script.
- scripts/utils.js: clarify the workspace-file comment — utoo reads
  `pnpm-workspace.yaml` as-is, so naming the file matters.
- README.md / README.zh-CN.md / packages/egg/README.md: prepend
  `corepack enable utoo` to the quickstart so clean machines get the
  pinned utoo before `ut create`/`ut install`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 12:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Comment thread plugins/redis/README.md

```bash
pnpm test
ut test
Comment on lines 74 to +75
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: ut install --from pnpm
killagu and others added 2 commits June 2, 2026 20:47
The previous env var \`PNPM_PACKAGE_MANAGER_STRICT\` is not recognized
by pnpm, so pnpm kept refusing the pack step with
\`This project is configured to use utoo\`. The actual setting is
\`package-manager-strict\`, exposed via \`NPM_CONFIG_PACKAGE_MANAGER_STRICT\`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ps resolve

\`pnpm -r pack\` needs pnpm's own \`node_modules\` symlink layout to
resolve \`workspace:*\` versions; otherwise it errors with
\`ERR_PNPM_CANNOT_RESOLVE_WORKSPACE_PROTOCOL\`. Run
\`pnpm install --no-frozen-lockfile --ignore-scripts\` first — the
packages are already in the global utoo store, so this is cheap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 12:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.


- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: ut install --from pnpm
Comment thread plugins/redis/README.md

```bash
pnpm test
ut test
Copilot AI review requested due to automatic review settings June 3, 2026 11:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 5 comments.

Comment thread scripts/run-workspaces.js
Comment on lines +43 to +47
addChildren('tools');
addChildren('tegg/core');
addChildren('tegg/plugin');
addChildren('tegg/standalone');
return dirs;
Comment thread scripts/clean-dist.js
}
}

for (const base of ['packages', 'plugins', 'tools', 'tegg']) {
Comment thread AGENTS.md
Comment on lines +61 to +65
CI splits the test suite across parallel runners via `scripts/run-shard.js`
(`node scripts/run-shard.js <shard>`). Each heavy fork-based package
(`cluster`, `egg`, `mock`, `development`, `schedule-a`/`schedule-b`) runs on its
own runner with a `--maxWorkers` cap so forked egg cluster child processes do
not oversubscribe the CPU and time out; `rest-a`/`rest-b` split everything else
Comment thread AGENTS.md
Comment on lines +66 to +68
with full parallelism. The goal is to keep each shard's `vitest run` wall time
under ~60s. To reproduce one shard locally: `node scripts/run-shard.js cluster`.
Use `node scripts/run-shard.js all` for the unsharded full suite.
Comment thread plugins/redis/README.md

```bash
pnpm test
ut test
Copilot AI review requested due to automatic review settings June 3, 2026 12:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 7 comments.

Comment thread scripts/run-workspaces.js
Comment on lines +41 to +46
addChildren('packages');
addChildren('plugins');
addChildren('tools');
addChildren('tegg/core');
addChildren('tegg/plugin');
addChildren('tegg/standalone');
Comment thread scripts/run-shard.js
Comment on lines +134 to +135
const shardName = argv[0] && !argv[0].startsWith('-') ? argv[0] : 'all';
const passthrough = (argv[0] && !argv[0].startsWith('-') ? argv.slice(1) : argv).filter(Boolean);
Comment thread .github/workflows/ci.yml Outdated
Comment on lines +214 to +215
- name: Run tests (shard ${{ matrix.shard }})
run: node scripts/run-shard.js ${{ matrix.shard }} -- --coverage
Comment thread AGENTS.md
Comment on lines +61 to +66
CI splits the test suite across parallel runners via `scripts/run-shard.js`
(`node scripts/run-shard.js <shard>`). Each heavy fork-based package
(`cluster`, `egg`, `mock`, `development`, `schedule-a`/`schedule-b`) runs on its
own runner with a `--maxWorkers` cap so forked egg cluster child processes do
not oversubscribe the CPU and time out; `rest-a`/`rest-b` split everything else
with full parallelism. The goal is to keep each shard's `vitest run` wall time
Comment thread AGENTS.md
Comment on lines +65 to +68
not oversubscribe the CPU and time out; `rest-a`/`rest-b` split everything else
with full parallelism. The goal is to keep each shard's `vitest run` wall time
under ~60s. To reproduce one shard locally: `node scripts/run-shard.js cluster`.
Use `node scripts/run-shard.js all` for the unsharded full suite.
Comment on lines 74 to 76
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: ut install --from pnpm

Comment thread plugins/redis/README.md

```bash
pnpm test
ut test
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 5 comments.

Comment thread plugins/redis/README.md

```bash
pnpm test
ut test
Comment thread AGENTS.md
Comment on lines +61 to +68
CI splits the test suite across parallel runners via `scripts/run-shard.js`
(`node scripts/run-shard.js <shard>`). Each heavy fork-based package
(`cluster`, `egg`, `mock`, `development`, `schedule-a`/`schedule-b`) runs on its
own runner with a `--maxWorkers` cap so forked egg cluster child processes do
not oversubscribe the CPU and time out; `rest-a`/`rest-b` split everything else
with full parallelism. The goal is to keep each shard's `vitest run` wall time
under ~60s. To reproduce one shard locally: `node scripts/run-shard.js cluster`.
Use `node scripts/run-shard.js all` for the unsharded full suite.
Comment thread .github/workflows/ci.yml Outdated
Comment on lines 247 to 250
- name: Run example tests
if: ${{ matrix.os != 'windows-latest' }}
# Only run example tests once per (os, node) combo to avoid duplication.
if: ${{ matrix.os != 'windows-latest' && matrix.shard == 'rest-1' }}
run: |
Comment on lines 74 to +75
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: ut install --from pnpm

import { escape, getFilepath } from './utils.ts';

describe('test/override.test.ts', () => {
Copilot AI review requested due to automatic review settings June 3, 2026 16:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 2 comments.

Comment thread AGENTS.md
Comment on lines +63 to +67
(`cluster`, `egg`, `mock`, `development`, `schedule-a`/`schedule-b`) runs on its
own runner with a `--maxWorkers` cap so forked egg cluster child processes do
not oversubscribe the CPU and time out; `rest-a`/`rest-b` split everything else
with full parallelism. The goal is to keep each shard's `vitest run` wall time
under ~60s. To reproduce one shard locally: `node scripts/run-shard.js cluster`.
Comment thread plugins/redis/README.md

```bash
pnpm test
ut test
@killagu killagu force-pushed the chore/replace-pnpm-with-utoo branch from e785de1 to 756903c Compare June 4, 2026 02:50
Copilot AI review requested due to automatic review settings June 4, 2026 03:02
@killagu killagu force-pushed the chore/replace-pnpm-with-utoo branch from 756903c to e895a5e Compare June 4, 2026 03:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 6 comments.

Comment thread scripts/run-workspaces.js
Comment on lines +41 to +47
addChildren('packages');
addChildren('plugins');
addChildren('tools');
addChildren('tegg/core');
addChildren('tegg/plugin');
addChildren('tegg/standalone');
return dirs;
Comment thread scripts/clean-dist.js
Comment on lines +49 to +57
for (const base of ['packages', 'plugins', 'tools', 'tegg']) {
const abs = path.join(ROOT, base);
try {
statSync(abs);
} catch {
continue;
}
walk(abs);
}
Comment thread scripts/run-shard.js
Comment on lines +134 to +136
const shardName = argv[0] && !argv[0].startsWith('-') ? argv[0] : 'all';
const passthrough = (argv[0] && !argv[0].startsWith('-') ? argv.slice(1) : argv).filter(Boolean);

Comment thread AGENTS.md
Comment on lines +61 to +68
CI splits the test suite across parallel runners via `scripts/run-shard.js`
(`node scripts/run-shard.js <shard>`). Each heavy fork-based package
(`cluster`, `egg`, `mock`, `development`, `schedule-a`/`schedule-b`) runs on its
own runner with a `--maxWorkers` cap so forked egg cluster child processes do
not oversubscribe the CPU and time out; `rest-a`/`rest-b` split everything else
with full parallelism. The goal is to keep each shard's `vitest run` wall time
under ~60s. To reproduce one shard locally: `node scripts/run-shard.js cluster`.
Use `node scripts/run-shard.js all` for the unsharded full suite.
Comment thread plugins/redis/README.md

```bash
pnpm test
ut test
Comment on lines +13 to +25
app = cluster('apps/cluster_mod_sticky', {
sticky: true,
port: 17010,
} as any);
app.debug();
await app.ready();
});
afterAll(() => app.close());

it('should online sticky cluster mode startup success', async () => {
app.expect('stdout', /app_worker#\d:\d+ started at (?!9500)/);
app.expect('stdout', /egg started on http:\/\/127.0.0.1:17010/);
await request('http://127.0.0.1:17010').get('/portal/i.htm').expect('hi cluster').expect(200);
…st path

Cut the monolithic test job (single ~190s vitest run, gated by a 170s cluster
file; 12-29min on CI) into parallel, wall-time-balanced shards so every job on
the PR critical path stays ≤60s — verified on real CI (48 ubuntu shards run
15-59s).

PR critical path = ubuntu only:
- Test sharding (scripts/run-shard.js, driven by the CI matrix): fork-heavy
  packages split via vitest --shard (cluster→3, egg→2, mock→2, schedule→4,
  security→2, plus redis/multipart/development standalone), each capped with
  --maxWorkers so forked egg cluster processes don't oversubscribe the CPU; the
  light remainder greedy bin-packed by per-dir cpu weight into 8 rest-* shards.
- Long single test files split by `describe` block (no semantic change, no
  removed cases) so vitest can parallelize them.
- quality split into a parallel matrix (lint/typecheck/fmtcheck/build/site) so
  the slowest check — not their sum — bounds wall time.
- egg-bin runs without --coverage to stay ≤60s (no threshold; report only).

macOS/Windows whole-suite compatibility (slow: ~13-25min; macOS has only ~5
runner slots) moved to a `test-compat` job that runs at merge time
(merge_group) and on push to next — NOT on pull_request — so it no longer gates
the PR wall while still enforcing cross-platform coverage before code lands.
CI test jobs on a PR drop from 132 to the 48 ubuntu shards.

Latent bugs fixed along the way:
- tegg controller ControllerMetaManager.test.ts triggers a duplicate-proto
  error that polluted the process-global registry under isolate:false, failing
  sibling files; isolated that project (isolate:true).
- clean-dist used `ut run clean --workspaces` which aborts the && chain (root has
  no clean script) → scripts/clean-dist.js.
- typecheck/pretest used `ut run <self> --workspaces`, which includes the root
  and recurses infinitely → scripts/run-workspaces.js (concurrent, root-bin PATH).
- Windows runner images no longer set %HOME%, breaking egg_loader getHomedir;
  export HOME=%USERPROFILE% on the windows compat job.

Windows flakes absorbed by --retry. No test semantics changed or cases removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants