Gateway: fix stale self version in status output (#32655)

Merged via squash.

Prepared head SHA: b9675d1f90
Co-authored-by: liuxiaopai-ai <73659136+liuxiaopai-ai@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
Liu Xiaopai
2026-03-03 15:41:52 +08:00
committed by GitHub
parent b1b41eb443
commit ae29842158
7 changed files with 48 additions and 17 deletions

View File

@@ -112,7 +112,8 @@ export function registerDefaultAuthTokenSuite(): void {
ws.close();
});
test("connect (req) handshake resolves server version from env precedence", async () => {
test("connect (req) handshake resolves server version from runtime precedence", async () => {
const { VERSION } = await import("../version.js");
for (const testCase of [
{
env: {
@@ -120,7 +121,7 @@ export function registerDefaultAuthTokenSuite(): void {
OPENCLAW_SERVICE_VERSION: "2.4.6-service",
npm_package_version: "1.0.0-package",
},
expectedVersion: "2.4.6-service",
expectedVersion: VERSION,
},
{
env: {
@@ -136,7 +137,7 @@ export function registerDefaultAuthTokenSuite(): void {
OPENCLAW_SERVICE_VERSION: "\t",
npm_package_version: "1.0.0-package",
},
expectedVersion: "1.0.0-package",
expectedVersion: VERSION,
},
]) {
await withRuntimeVersionEnv(testCase.env, async () =>