From 313ace971dd3c1517aade2b0cad4eac4b93bc589 Mon Sep 17 00:00:00 2001 From: sunlei Date: Sat, 27 Jun 2026 01:11:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=B9=E9=BD=90NapCat=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E6=97=B6=E9=BB=98=E8=AE=A4=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci/napcat-desktop-cn/README.md | 6 +++--- ...am-sync-runtime-release-pipeline-implementation-plan.md | 4 ++-- k8s/prod/api.yaml | 4 ++-- .../application/runtime/napcat-runtime-profile.service.ts | 2 +- test/modules/qqbot/napcat/napcat-desktop-cn-image.spec.ts | 7 ++++--- test/modules/qqbot/napcat/napcat-runtime-promotion.spec.ts | 4 ++-- test/modules/qqbot/napcat/runtime-protocol-profile.spec.ts | 2 +- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ci/napcat-desktop-cn/README.md b/ci/napcat-desktop-cn/README.md index 550dc60..10e75ab 100644 --- a/ci/napcat-desktop-cn/README.md +++ b/ci/napcat-desktop-cn/README.md @@ -43,17 +43,17 @@ Build and verify: ```powershell docker build ` --build-arg NAPCAT_BASE_IMAGE=$napcatBaseImageDigest ` - -t kt-napcat-desktop-cn:desktop-cn-v8 ` + -t kt-napcat-desktop-cn:desktop-cn-v10 ` -f .kt-workspace/napcat-desktop-cn-build/ci/napcat-desktop-cn/Dockerfile ` .kt-workspace/napcat-desktop-cn-build -$name = "kt-napcat-v8-verify-$([DateTimeOffset]::UtcNow.ToUnixTimeSeconds())" +$name = "kt-napcat-v10-verify-$([DateTimeOffset]::UtcNow.ToUnixTimeSeconds())" docker run -d --name $name ` --cap-add SYS_ADMIN ` --security-opt apparmor=unconfined ` --security-opt seccomp=unconfined ` -e NAPCAT_REQUIRE_DEVICE_PROFILE=1 ` - kt-napcat-desktop-cn:desktop-cn-v8 + kt-napcat-desktop-cn:desktop-cn-v10 docker exec $name sh /ci/napcat-desktop-cn/verify.sh docker rm -f $name ``` diff --git a/docs/superpowers/plans/2026-06-24-napcatqq-upstream-sync-runtime-release-pipeline-implementation-plan.md b/docs/superpowers/plans/2026-06-24-napcatqq-upstream-sync-runtime-release-pipeline-implementation-plan.md index 33588ab..6425b0b 100644 --- a/docs/superpowers/plans/2026-06-24-napcatqq-upstream-sync-runtime-release-pipeline-implementation-plan.md +++ b/docs/superpowers/plans/2026-06-24-napcatqq-upstream-sync-runtime-release-pipeline-implementation-plan.md @@ -843,8 +843,8 @@ describe('NapCat runtime promotion contract', () => { it('keeps a safe default runtime profile in the K8s manifest', () => { const manifest = readSource('k8s/prod/api.yaml'); - expect(manifest).toContain('value: kt-napcat-desktop-cn:desktop-cn-v8'); - expect(manifest).toContain('value: desktop-cn-v8'); + expect(manifest).toContain('value: kt-napcat-desktop-cn:desktop-cn-v10'); + expect(manifest).toContain('value: desktop-cn-v10'); }); }); ``` diff --git a/k8s/prod/api.yaml b/k8s/prod/api.yaml index fa2000e..33872c1 100644 --- a/k8s/prod/api.yaml +++ b/k8s/prod/api.yaml @@ -33,9 +33,9 @@ spec: - name: DB_TIMEZONE value: "+08:00" - name: QQBOT_NAPCAT_IMAGE - value: kt-napcat-desktop-cn:desktop-cn-v8 + value: kt-napcat-desktop-cn:desktop-cn-v10 - name: QQBOT_NAPCAT_DESKTOP_PROFILE_VERSION - value: desktop-cn-v8 + value: desktop-cn-v10 - name: QQBOT_NAPCAT_SSH_KEY_PATH value: /app/secrets/napcat-ssh/id_rsa - name: QQBOT_PLUGIN_TASK_QUEUE_REDIS_PREFIX diff --git a/src/modules/qqbot/napcat/application/runtime/napcat-runtime-profile.service.ts b/src/modules/qqbot/napcat/application/runtime/napcat-runtime-profile.service.ts index d1c2c9c..032283f 100644 --- a/src/modules/qqbot/napcat/application/runtime/napcat-runtime-profile.service.ts +++ b/src/modules/qqbot/napcat/application/runtime/napcat-runtime-profile.service.ts @@ -71,7 +71,7 @@ export class NapcatRuntimeProfileService { dataDir: input.dataDir, desktopProfileVersion: this.getString( 'QQBOT_NAPCAT_DESKTOP_PROFILE_VERSION', - 'desktop-cn-v8', + 'desktop-cn-v10', ), deviceIdentityId: input.deviceIdentityId, imageRef: this.getString('QQBOT_NAPCAT_IMAGE', ''), diff --git a/test/modules/qqbot/napcat/napcat-desktop-cn-image.spec.ts b/test/modules/qqbot/napcat/napcat-desktop-cn-image.spec.ts index 9465ee4..308e847 100644 --- a/test/modules/qqbot/napcat/napcat-desktop-cn-image.spec.ts +++ b/test/modules/qqbot/napcat/napcat-desktop-cn-image.spec.ts @@ -134,13 +134,14 @@ describe('NapCat Chinese Desktop Runtime image assets', () => { expect(verify).not.toContain('selfInfo?.online !== false'); }); - it('deploys the production API with the verified desktop-cn-v8 runtime profile', () => { + it('deploys the production API with the verified desktop-cn-v10 runtime profile', () => { const manifest = readSource('k8s/prod/api.yaml'); expect(manifest).toContain('name: QQBOT_NAPCAT_IMAGE'); - expect(manifest).toContain('value: kt-napcat-desktop-cn:desktop-cn-v8'); + expect(manifest).toContain('value: kt-napcat-desktop-cn:desktop-cn-v10'); expect(manifest).toContain('name: QQBOT_NAPCAT_DESKTOP_PROFILE_VERSION'); - expect(manifest).toContain('value: desktop-cn-v8'); + expect(manifest).toContain('value: desktop-cn-v10'); + expect(manifest).not.toContain('kt-napcat-desktop-cn:desktop-cn-v8'); expect(manifest).not.toContain('kt-napcat-desktop-cn:desktop-cn-v7'); expect(manifest).not.toContain('kt-napcat-desktop-cn:desktop-cn-v4'); expect(manifest).not.toContain('kt-napcat-desktop-cn:desktop-cn-v3'); diff --git a/test/modules/qqbot/napcat/napcat-runtime-promotion.spec.ts b/test/modules/qqbot/napcat/napcat-runtime-promotion.spec.ts index 5bc19b3..bda6cf6 100644 --- a/test/modules/qqbot/napcat/napcat-runtime-promotion.spec.ts +++ b/test/modules/qqbot/napcat/napcat-runtime-promotion.spec.ts @@ -33,7 +33,7 @@ describe('NapCat runtime promotion contract', () => { it('keeps a safe default runtime profile in the K8s manifest', () => { const manifest = readSource('k8s/prod/api.yaml'); - expect(manifest).toContain('value: kt-napcat-desktop-cn:desktop-cn-v8'); - expect(manifest).toContain('value: desktop-cn-v8'); + expect(manifest).toContain('value: kt-napcat-desktop-cn:desktop-cn-v10'); + expect(manifest).toContain('value: desktop-cn-v10'); }); }); diff --git a/test/modules/qqbot/napcat/runtime-protocol-profile.spec.ts b/test/modules/qqbot/napcat/runtime-protocol-profile.spec.ts index ebb1752..3ff8a95 100644 --- a/test/modules/qqbot/napcat/runtime-protocol-profile.spec.ts +++ b/test/modules/qqbot/napcat/runtime-protocol-profile.spec.ts @@ -123,7 +123,7 @@ describe('NapCat runtime profile generation', () => { }); expect(profile).toMatchObject({ - desktopProfileVersion: 'desktop-cn-v8', + desktopProfileVersion: 'desktop-cn-v10', imageRef: 'kt-napcat-desktop-cn@sha256:profiledigest', locale: 'zh_CN.UTF-8', runtimeGid: 1101,