You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "seekskyworld (via GitHub)" <gi...@apache.org> on 2026/09/24 09:23:01 UTC
[PR] test: validate Host and storage lifetimes on Node 22 [maka]
seekskyworld opened a new pull request, #5694:
URL: https://github.com/apache/maka/pull/5694
## Summary
On Node 22, six peer-stream tests are cancelled when the event loop drains, and the dependency-authority startup test fails on SQLite's experimental warning. Keep the synthetic transport fixture alive until its tests finish, and use the child process's READY/exit protocol for startup while retaining bounded stderr diagnostics on failure.
CI now runs these lifecycle fixtures on the minimum supported Node 22.19.0 in the existing runner, after its Node 24 checks. Production heartbeat timers and the declared Node support range are unchanged.
Fixes #5640
## Verification
- Before: the same 15 tests on current main passed on Node 24.18.1; Node 22.23.1 produced 8 passes, 1 failure and 6 cancellations.
- After: all 15 pass on Node 22.19.0, 22.23.1 and 24.18.1.
- Full Storage suite on Node 22.19.0: 1,438 passed, 8 platform skips.
- Full Runtime Host suite on Node 22.19.0: 2,090 passed, 12 platform/environment skips; no failures or cancellations.
- CI planner/workflow contracts: 87 passed.
- Repository build, typecheck, lint, format, Desktop/UI knip, ASF headers, and diff checks pass.
- Native Desktop E2E was not run locally. CI adds a focused Node 22 check; it does not duplicate the full Node 24 matrix.
## AI use
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: OpenAI Codex reproduced the failures, implemented the test/CI changes, ran validation and drafted this description under human direction.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [x] Yes — test fixture lifecycle and CI validation change as described above
- [ ] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] test: validate Host and storage lifetimes on Node 22 [maka]
Posted by "seekskyworld (via GitHub)" <gi...@apache.org>.
seekskyworld commented on code in PR #5694:
URL: https://github.com/apache/maka/pull/5694#discussion_r4237019501
##########
.github/workflows/ci.yml:
##########
@@ -521,3 +521,18 @@ jobs:
- name: Validate installed CLI release candidate
if: steps.plan.outputs.cli_package == 'true'
run: npm run release:cli:smoke -- packages/cli/release/*.tgz
+
+ # Reuse the built output in this runner. These fixtures exercise the
+ # minimum supported Node's event-loop and experimental SQLite behavior.
+ - name: Select minimum supported Node
+ if: steps.plan.outputs.runtime_host == 'true' || contains(steps.plan.outputs.standard_workspaces, 'packages/storage')
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
+ with:
+ node-version: '22.19.0'
Review Comment:
Added the engines lower-bound assertion in 0d17588bb. It handles the current union range and fails explicitly for unsupported range syntax. A mutation from ^22.19.0 to ^22.20.0 correctly fails while the CI version is unchanged; all 87 planner/workflow tests pass.
Automated update by OpenAI Codex under the contributor’s direction.
##########
packages/runtime-host/src/__tests__/resumable-peer-stream.test.ts:
##########
@@ -46,6 +46,11 @@ import {
} from '../transport/resumable-peer-stream.js';
import type { RuntimeHostPeerNativeStream } from '../transport/peer-native.js';
+// 内存 duplex 没有真实 socket 的活跃句柄;生产心跳刻意 unref,测试需自行
+// 持有生命周期,否则 Node 22 会在等待恢复时判定事件循环已结束。
+const syntheticTransportLifetime = setInterval(() => {}, 1_000);
+after(() => clearInterval(syntheticTransportLifetime));
Review Comment:
Removed the file-wide interval in 0d17588bb after syncing main. Upstream now wraps the blackhole recovery read/write in settleWithin, whose referenced timeout owns exactly that wait. All 15 focused Host/storage tests pass on Node 22.19.0 without the global keep-alive.
Automated update by OpenAI Codex under the contributor’s direction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] test: validate Host and storage lifetimes on Node 22 [maka]
Posted by "orangeCatDeveloper (via GitHub)" <gi...@apache.org>.
orangeCatDeveloper commented on code in PR #5694:
URL: https://github.com/apache/maka/pull/5694#discussion_r4117558599
##########
.github/workflows/ci.yml:
##########
@@ -521,3 +521,18 @@ jobs:
- name: Validate installed CLI release candidate
if: steps.plan.outputs.cli_package == 'true'
run: npm run release:cli:smoke -- packages/cli/release/*.tgz
+
+ # Reuse the built output in this runner. These fixtures exercise the
+ # minimum supported Node's event-loop and experimental SQLite behavior.
+ - name: Select minimum supported Node
+ if: steps.plan.outputs.runtime_host == 'true' || contains(steps.plan.outputs.standard_workspaces, 'packages/storage')
+ uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
+ with:
+ node-version: '22.19.0'
Review Comment:
P3: `22.19.0` duplicates the floor in the root `package.json` `engines.node` (`>=22.19.0`). When engines is bumped, this lane silently keeps testing the old minimum. Consider having the policy test assert this value equals the engines lower bound.
##########
packages/storage/src/__tests__/managed-dependency-environment-crash.test.ts:
##########
@@ -182,9 +186,14 @@ async function waitForChildReady(child: ChildProcess): Promise<void> {
output += chunk.toString('utf8');
if (output.includes('READY\n')) finish();
};
- const onErrorData = (chunk: Buffer) => finish(new Error(chunk.toString('utf8')));
+ // READY 是启动协议,stderr 也会含 Node 22 的 SQLite 实验性警告。
Review Comment:
P3: same here, please write this comment in English.
##########
packages/runtime-host/src/__tests__/resumable-peer-stream.test.ts:
##########
@@ -46,6 +46,11 @@ import {
} from '../transport/resumable-peer-stream.js';
import type { RuntimeHostPeerNativeStream } from '../transport/peer-native.js';
+// 内存 duplex 没有真实 socket 的活跃句柄;生产心跳刻意 unref,测试需自行
Review Comment:
P3: please write this comment in English. Explanatory comments under `packages/*/src` are overwhelmingly English, and it keeps the rationale readable for the wider community.
##########
packages/runtime-host/src/__tests__/resumable-peer-stream.test.ts:
##########
@@ -46,6 +46,11 @@ import {
} from '../transport/resumable-peer-stream.js';
import type { RuntimeHostPeerNativeStream } from '../transport/peer-native.js';
+// 内存 duplex 没有真实 socket 的活跃句柄;生产心跳刻意 unref,测试需自行
+// 持有生命周期,否则 Node 22 会在等待恢复时判定事件循环已结束。
+const syntheticTransportLifetime = setInterval(() => {}, 1_000);
+after(() => clearInterval(syntheticTransportLifetime));
Review Comment:
P3: this keep-alive is module-wide, so every test in the file is held open. A test that genuinely hangs on a never-resolving await will now wait for its timeout instead of being cancelled when the loop drains. Acceptable, but scoping it to the tests that wait for recovery would keep that fast failure signal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] test: validate Host and storage lifetimes on Node 22 [maka]
Posted by "seekskyworld (via GitHub)" <gi...@apache.org>.
seekskyworld commented on code in PR #5694:
URL: https://github.com/apache/maka/pull/5694#discussion_r4237019781
##########
packages/runtime-host/src/__tests__/resumable-peer-stream.test.ts:
##########
@@ -46,6 +46,11 @@ import {
} from '../transport/resumable-peer-stream.js';
import type { RuntimeHostPeerNativeStream } from '../transport/peer-native.js';
+// 内存 duplex 没有真实 socket 的活跃句柄;生产心跳刻意 unref,测试需自行
Review Comment:
The file-wide keep-alive and its comment are removed in 0d17588bb: current main already provides a bounded lifetime for the recovery wait. Node 22.19.0 focused coverage passes.
Automated update by OpenAI Codex under the contributor’s direction.
##########
packages/storage/src/__tests__/managed-dependency-environment-crash.test.ts:
##########
@@ -182,9 +186,14 @@ async function waitForChildReady(child: ChildProcess): Promise<void> {
output += chunk.toString('utf8');
if (output.includes('READY\n')) finish();
};
- const onErrorData = (chunk: Buffer) => finish(new Error(chunk.toString('utf8')));
+ // READY 是启动协议,stderr 也会含 Node 22 的 SQLite 实验性警告。
Review Comment:
Translated the READY/stderr protocol rationale into English in 0d17588bb. The Node 22.19.0 focused suite passes.
Automated update by OpenAI Codex under the contributor’s direction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org