Skip to content

test: isolate mock cluster ports and logs#5923

Open
killagu wants to merge 1 commit into
nextfrom
agent/egg-dev/9def10d5
Open

test: isolate mock cluster ports and logs#5923
killagu wants to merge 1 commit into
nextfrom
agent/egg-dev/9def10d5

Conversation

@killagu
Copy link
Copy Markdown
Contributor

@killagu killagu commented May 3, 2026

Summary

  • isolate egg-mock HOME/EGG_HOME for NODE_ENV=test so fixture logs stay under baseDir
  • spread egg-mock cluster default ports by Vitest worker thread and process to reduce parallel collisions
  • seed cluster-client and sticky worker port detection from deterministic per-process ranges

Tests

  • taskset -c 0-2 pnpm exec vitest run packages/cluster/test/app_worker.test.ts -t "listen config" --retry 0 --bail 1 --reporter dot
  • taskset -c 0-2 pnpm exec vitest run plugins/mock/test/format_options.test.ts plugins/mock/test/cluster.test.ts --retry 0 --bail 1 --reporter dot
  • taskset -c 0-2 pnpm exec vitest run plugins/schedule/test/schedule.test.ts plugins/schedule/test/schedule-type-worker1.test.ts plugins/schedule/test/schedule-type-worker2.test.ts --retry 0 --bail 1 --reporter dot
  • taskset -c 0-3 pnpm exec vitest run packages/cluster/test/app_worker.test.ts -t "listen config" plugins/mock/test/format_options.test.ts plugins/mock/test/cluster.test.ts plugins/schedule/test/schedule.test.ts plugins/schedule/test/schedule-type-worker1.test.ts plugins/schedule/test/schedule-type-worker2.test.ts --retry 0 --bail 1 --reporter dot
  • taskset -c 0-3 pnpm exec vitest run plugins/mock/test/format_options.test.ts plugins/mock/test/cluster.test.ts plugins/schedule/test/schedule.test.ts plugins/schedule/test/schedule-type-worker1.test.ts plugins/schedule/test/schedule-type-worker2.test.ts --retry 0 --bail 1 --reporter dot
  • pnpm --filter @eggjs/cluster typecheck
  • pnpm --filter @eggjs/mock typecheck
  • pnpm exec oxlint packages/cluster/src/master.ts packages/cluster/src/utils/options.ts plugins/mock/src/lib/cluster.ts plugins/mock/src/lib/format_options.ts plugins/mock/src/lib/types.ts plugins/mock/test/format_options.test.ts

Summary by CodeRabbit

  • New Features

    • Optional clusterPort setting to control cluster startup port and ensure consistent sticky-worker startup.
  • Bug Fixes

    • More deterministic port selection to reduce port conflicts across processes/threads.
    • Environment detection improved: NODE_ENV/EGG_SERVER_ENV fallback and both HOME and EGG_HOME mocked when appropriate.
    • Cluster app options merge env correctly so provided env values are preserved.
  • Tests

    • Added tests covering port detection, constructor behavior, and environment-mocking.

Copilot AI review requested due to automatic review settings May 3, 2026 15:40
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 3, 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

Cluster port selection now uses deterministic helper functions (configurable via new clusterPort option or PID/thread-derived fallbacks); sticky-worker port is clusterPort + 1 when sticky mode is enabled. Mock plugin port windowing and env-mocking (adds EGG_HOME) were added. Tests and docs updated; minor API tweak to an optional parameter.

Changes

Cluster & Mock Port and Env Flow

Layer / File(s) Summary
Type Definition
packages/cluster/src/utils/options.ts, plugins/mock/src/lib/types.ts
Added optional clusterPort?: number to ClusterOptions, MockClusterOptions, and MockClusterApplicationOptions.
Deterministic Port Helpers
packages/cluster/src/master.ts
Added getClusterPortStart(clusterPort?: number) (fallback 20000 + (process.pid % 30000)) and getStickyWorkerPortStart(clusterPort: number) (clusterPort + 1).
Port Detection Wiring
packages/cluster/src/master.ts
Master.detectPorts() calls detectPort() with start values from the new helpers and assigns detected clusterPort and stickyWorkerPort back to this.options.
Mock Port Calculation
plugins/mock/src/lib/cluster.ts
Introduced windowed port constants and getMockClusterPortStart(pid, workerThreadId); globalThis.eggMockMasterPort now uses this helper.
Environment Defaults & Merging
plugins/mock/src/lib/cluster.ts, plugins/mock/src/lib/format_options.ts
ClusterApplication defaults options.opt to {} and merges env as { ...process.env, ...opt.env }. formatOptions() uses EGG_SERVER_ENV ?? NODE_ENV, expands HOME mocking condition (includes NODE_ENV === 'test'), and also sets EGG_HOME to options.baseDir when mocking.
API Shape Minor Change
plugins/mock/src/lib/cluster.ts
_callFunctionOnAppWorker parameter property made optional (property?: any).
Tests & Documentation
packages/cluster/test/master/detect_ports.test.ts, plugins/mock/test/format_options.test.ts, plugins/mock/test/cluster_constructor.test.ts, packages/cluster/README.md
Added tests for port helpers and master wiring; extended format_options tests to assert EGG_HOME; added cluster constructor tests for mock ports and env merging; documented new clusterPort option in README.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • fengmk2

Poem

🐰 I nibble at ports, seed by PID and thread,
I tuck HOME and EGG_HOME into a cozy bed,
I count from two-ten-thousand, then hop one more,
Workers wake in order, no collision on the floor.
A happy rabbit hums — the cluster starts in sync.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.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 PR title clearly summarizes the main changes: isolating mock cluster ports and logs. This directly aligns with the core objectives stated in the PR (isolating HOME/EGG_HOME, spreading cluster ports, and seeding port detection).
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
  • Commit unit tests in branch agent/egg-dev/9def10d5

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.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 3, 2026

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c92451
Status: ✅  Deploy successful!
Preview URL: https://b6e4f4df.egg-cci.pages.dev
Branch Preview URL: https://agent-egg-dev-9def10d5.egg-cci.pages.dev

View logs

@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.22%. Comparing base (871e596) to head (4c92451).
⚠️ Report is 3 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #5923      +/-   ##
==========================================
+ Coverage   85.09%   85.22%   +0.13%     
==========================================
  Files         667      668       +1     
  Lines       19185    19310     +125     
  Branches     3743     3791      +48     
==========================================
+ Hits        16325    16457     +132     
+ Misses       2467     2462       -5     
+ Partials      393      391       -2     

☔ View full report in Codecov by Sentry.
📢 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

@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 introduces a configurable clusterPort for the egg cluster and improves port detection logic to avoid conflicts by incorporating process.pid and threadId. It also enhances environment variable handling by supporting NODE_ENV as a fallback for EGG_SERVER_ENV and ensuring EGG_HOME is correctly set. Feedback was provided to improve type safety in the ClusterApplication constructor by replacing an any type cast with a more specific record type.

Comment thread plugins/mock/src/lib/cluster.ts Outdated
*/
constructor(options: MockClusterApplicationOptions) {
const opt = options.opt;
const opt: any = options.opt ?? {};
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

Using any here reduces type safety. Since you are subsequently adding an env property to this object, it would be better to use a more descriptive type such as Record<string, any> to maintain better type safety while allowing dynamic property assignment.

Suggested change
const opt: any = options.opt ?? {};
const opt = (options.opt ?? {}) as Record<string, any>;

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 3, 2026

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c92451
Status: ✅  Deploy successful!
Preview URL: https://a27d9b89.egg-v3.pages.dev
Branch Preview URL: https://agent-egg-dev-9def10d5.egg-v3.pages.dev

View logs

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

This PR aims to make Egg's test helpers less flaky under parallel Vitest runs by isolating mock home/log paths and spreading the default ports used by @eggjs/mock and @eggjs/cluster.

Changes:

  • Make formatOptions() derive mock home paths from NODE_ENV/EGG_SERVER_ENV and set EGG_HOME alongside HOME.
  • Add clusterPort to the mock/cluster option types and forward EGG_HOME into cluster child processes.
  • Seed cluster client and sticky-worker port detection from deterministic process-based ranges to reduce parallel port collisions.

Reviewed changes

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

Show a summary per file
File Description
plugins/mock/test/format_options.test.ts Adds coverage for NODE_ENV=test home-path mocking behavior.
plugins/mock/src/lib/types.ts Extends mock option types with clusterPort.
plugins/mock/src/lib/format_options.ts Changes env resolution and starts mocking EGG_HOME in addition to HOME.
plugins/mock/src/lib/cluster.ts Changes default mock cluster port allocation and injects EGG_HOME into child env.
packages/cluster/src/utils/options.ts Documents the new clusterPort option on cluster startup options.
packages/cluster/src/master.ts Seeds cluster-client/sticky port detection from deterministic per-process ranges.

Comment thread plugins/mock/src/lib/format_options.ts Outdated
Comment on lines +81 to +84
if (!isMocked(process.env, 'HOME') && (env === 'default' || env === 'test' || env === 'prod')) {
mm(process.env, 'HOME', options.baseDir);
}
if (!isMocked(process.env, 'EGG_HOME') && (env === 'default' || env === 'test' || env === 'prod')) {
Comment thread packages/cluster/src/master.ts Outdated
Comment on lines +256 to +263
const clusterPort = await detectPort(
this.options.clusterPort ?? CLUSTER_CLIENT_PORT_START + (process.pid % 30_000),
);
this.options.clusterPort = clusterPort;
this.log('[master] detected cluster port: %s', clusterPort);
// If sticky mode, detect worker port
if (this.options.sticky) {
const stickyWorkerPort = await detectPort();
const stickyWorkerPort = await detectPort(clusterPort + 1);
Comment thread plugins/mock/src/lib/cluster.ts Outdated
var eggMockMasterPort: number;
}
globalThis.eggMockMasterPort = 17000 + (process.pid % 1000);
globalThis.eggMockMasterPort = 17000 + (process.pid % 20) * 1000 + (threadId % 10) * 100;
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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/mock/src/lib/cluster.ts`:
- Around line 82-87: The code in cluster.ts force-sets EGG_HOME on every child
by falling back to options.baseDir (const opt.env = ... EGG_HOME:
opt.env?.EGG_HOME ?? process.env.EGG_HOME ?? options.baseDir), which bypasses
the env gate in format_options.ts; change the merge so EGG_HOME is only
preserved if explicitly provided by opt.env or process.env (i.e., remove the
fallback to options.baseDir), so: keep the spread merge but set EGG_HOME to
opt.env?.EGG_HOME ?? process.env.EGG_HOME (no default), ensuring cluster.ts
(opt.env block / EGG_HOME assignment) no longer overrides home unless explicitly
set and thus respects the env gating logic in format_options.ts.

In `@plugins/mock/src/lib/format_options.ts`:
- Around line 80-85: The fallback logic uses const env =
process.env.EGG_SERVER_ENV ?? process.env.NODE_ENV and then checks (env ===
'default' || env === 'test' || env === 'prod') before mocking HOME/EGG_HOME, but
NODE_ENV commonly equals 'production' so those branches won't run; update the
condition in format_options.ts (around the env checks and the isMocked/MM calls
for 'HOME' and 'EGG_HOME') to also accept 'production' (or normalize env
'production' to 'prod') so that when NODE_ENV='production' the mm calls will run
and HOME/EGG_HOME are isolated.
🪄 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: 4815ef01-0ce5-42f3-9794-4f6d258d480c

📥 Commits

Reviewing files that changed from the base of the PR and between 22fc588 and d45f127.

📒 Files selected for processing (6)
  • packages/cluster/src/master.ts
  • packages/cluster/src/utils/options.ts
  • plugins/mock/src/lib/cluster.ts
  • plugins/mock/src/lib/format_options.ts
  • plugins/mock/src/lib/types.ts
  • plugins/mock/test/format_options.test.ts

Comment thread plugins/mock/src/lib/cluster.ts Outdated
Comment thread plugins/mock/src/lib/format_options.ts Outdated
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)
plugins/mock/test/format_options.test.ts (1)

145-161: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Missing EGG_HOME assertions for the EGG_SERVER_ENV=default/test/prod sub-cases.

format_options.ts now mocks EGG_HOME under the same shouldMockHome gate as HOME, but the pre-existing sub-cases only assert HOME. The first formatOptions() call (line 152) will mock EGG_HOME to baseDir; subsequent sub-cases (lines 155–161) will see isMocked returning true but the value stays correct. Adding the assertions would close the coverage gap introduced by the new EGG_HOME logic.

✅ Proposed assertions to add
   mm(process.env, 'EGG_SERVER_ENV', 'default');
   formatOptions();
   assert.equal(process.env.HOME, baseDir);
+  assert.equal(process.env.EGG_HOME, baseDir);

   mm(process.env, 'EGG_SERVER_ENV', 'test');
   formatOptions();
   assert.equal(process.env.HOME, baseDir);
+  assert.equal(process.env.EGG_HOME, baseDir);

   mm(process.env, 'EGG_SERVER_ENV', 'prod');
   formatOptions();
   assert.equal(process.env.HOME, baseDir);
+  assert.equal(process.env.EGG_HOME, baseDir);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/mock/test/format_options.test.ts` around lines 145 - 161, The test is
missing assertions that EGG_HOME is mocked alongside HOME when formatOptions()
runs; after each formatOptions() call in the sub-cases where you set
process.env.EGG_SERVER_ENV to 'default', 'test', and 'prod' (the mm calls and
subsequent formatOptions() invocations in the spec), add assertions that
process.env.EGG_HOME equals baseDir (similar to the existing HOME assertions) so
each sub-case verifies EGG_HOME was set by formatOptions().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@plugins/mock/test/format_options.test.ts`:
- Around line 145-161: The test is missing assertions that EGG_HOME is mocked
alongside HOME when formatOptions() runs; after each formatOptions() call in the
sub-cases where you set process.env.EGG_SERVER_ENV to 'default', 'test', and
'prod' (the mm calls and subsequent formatOptions() invocations in the spec),
add assertions that process.env.EGG_HOME equals baseDir (similar to the existing
HOME assertions) so each sub-case verifies EGG_HOME was set by formatOptions().

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 064b72e0-e3c9-41e5-8e2d-4c40129e3757

📥 Commits

Reviewing files that changed from the base of the PR and between d45f127 and 549a49a.

📒 Files selected for processing (5)
  • packages/cluster/src/master.ts
  • packages/cluster/test/master/detect_ports.test.ts
  • plugins/mock/src/lib/cluster.ts
  • plugins/mock/src/lib/format_options.ts
  • plugins/mock/test/format_options.test.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/cluster/test/master/detect_ports.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/cluster/src/master.ts

Copilot AI review requested due to automatic review settings May 3, 2026 16:00
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 7 out of 7 changed files in this pull request and generated 4 comments.

Comment thread plugins/mock/src/lib/format_options.ts Outdated
const env = process.env.EGG_SERVER_ENV ?? process.env.NODE_ENV;
const nodeEnv = process.env.NODE_ENV;
const shouldMockHome =
env === 'default' || env === 'test' || env === 'prod' || env === 'production' || nodeEnv === 'test';
Comment thread packages/cluster/src/master.ts Outdated
Comment thread plugins/mock/src/lib/cluster.ts Outdated
Comment thread packages/cluster/src/utils/options.ts Outdated
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)
packages/cluster/test/master/detect_ports.test.ts (1)

16-54: ⚡ Quick win

Consider adding a non-sticky detectPorts() path test.

The current suite covers only sticky: true. The if (this.options.sticky) branch in detectPorts() means that when sticky is false, detectPort should only be called once and stickyWorkerPort should remain undefined. Adding this case would complete branch coverage for the method under test.

🧪 Suggested additional test
+  it('should only detect cluster port when not in sticky mode', async () => {
+    const master = Object.create(Master.prototype) as Master;
+    master.options = {
+      clusterPort: 34567,
+      sticky: false,
+    } as any;
+    master.logger = { error: vi.fn() } as any;
+    master.log = vi.fn();
+
+    await master.detectPorts();
+
+    assert.equal(detectPortMock.mock.calls.length, 1);
+    assert.equal(master.options.clusterPort, 34567);
+    assert.equal(master.options.stickyWorkerPort, undefined);
+  });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cluster/test/master/detect_ports.test.ts` around lines 16 - 54, Add
a test that exercises the non-sticky branch of Master.detectPorts(): instantiate
a Master-like object (Object.create(Master.prototype)), set master.options = {
clusterPort: 34567, sticky: false } and a stubbed logger, mock detectPort
(detectPortMock) to a known behavior, call await master.detectPorts(), then
assert detectPort was called only once with the resolved cluster port and that
master.options.stickyWorkerPort remains undefined while
master.options.clusterPort is set from the single detectPort result; this covers
the if (this.options.sticky) false path in detectPorts().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/cluster/test/master/detect_ports.test.ts`:
- Around line 16-54: Add a test that exercises the non-sticky branch of
Master.detectPorts(): instantiate a Master-like object
(Object.create(Master.prototype)), set master.options = { clusterPort: 34567,
sticky: false } and a stubbed logger, mock detectPort (detectPortMock) to a
known behavior, call await master.detectPorts(), then assert detectPort was
called only once with the resolved cluster port and that
master.options.stickyWorkerPort remains undefined while
master.options.clusterPort is set from the single detectPort result; this covers
the if (this.options.sticky) false path in detectPorts().

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b2828bf-8906-4d4a-b662-0e662dfd6d05

📥 Commits

Reviewing files that changed from the base of the PR and between 21e5482 and 13b4292.

📒 Files selected for processing (6)
  • packages/cluster/README.md
  • packages/cluster/test/master/detect_ports.test.ts
  • plugins/mock/src/lib/cluster.ts
  • plugins/mock/src/lib/format_options.ts
  • plugins/mock/test/cluster_constructor.test.ts
  • plugins/mock/test/format_options.test.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/cluster/README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • plugins/mock/test/format_options.test.ts
  • plugins/mock/src/lib/format_options.ts

Copilot AI review requested due to automatic review settings May 3, 2026 16:16
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 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread packages/cluster/src/master.ts Outdated
Comment on lines +32 to +33
export function getClusterPortStart(clusterPort?: number): number {
return clusterPort ?? CLUSTER_CLIENT_PORT_START + (process.pid % 30_000);
Copilot AI review requested due to automatic review settings May 3, 2026 16:54
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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread packages/cluster/src/master.ts
Copilot AI review requested due to automatic review settings May 3, 2026 17:16
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 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread plugins/mock/src/lib/cluster.ts Outdated
Comment on lines +101 to +104
opt.env = {
...process.env,
...opt.env,
};
Comment thread packages/cluster/src/app_worker.ts Outdated
Comment thread plugins/mock/src/lib/types.ts
Copilot AI review requested due to automatic review settings May 3, 2026 18:34
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 11 out of 11 changed files in this pull request and generated 2 comments.

Comment thread plugins/mock/src/lib/format_options.ts Outdated
if (!isMocked(process.env, 'HOME') && shouldMockHome) {
mm(process.env, 'HOME', options.baseDir);
}
if (!isMocked(process.env, 'EGG_HOME') && shouldMockHome) {
Comment thread packages/cluster/src/master.ts Outdated
Copilot AI review requested due to automatic review settings May 5, 2026 06:43
@killagu killagu force-pushed the agent/egg-dev/9def10d5 branch from 6945e8a to f28d41a Compare May 5, 2026 06: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 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread plugins/mock/src/lib/cluster.ts Outdated
Comment on lines +101 to +103
if (opt.env === undefined) {
opt.env = { ...process.env };
}
@killagu killagu force-pushed the agent/egg-dev/9def10d5 branch from f28d41a to 4c92451 Compare May 5, 2026 07:27
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.

2 participants