From 3727e242cd39132d78e7b8fbb04b876c18b0f1ed Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Tue, 11 Aug 2026 19:07:16 +0800 Subject: [PATCH] fix(ci): satisfy lint contracts-ready lane --- packages/api/gateway/tests/client.spec.ts | 6 +----- packages/client/ui-settings/src/client/settings-scope.ts | 4 +--- packages/host/apiproxy/tests/api-proxy-config.spec.ts | 6 ++---- .../session-query/tests/session-query.spec.ts | 7 ++----- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/packages/api/gateway/tests/client.spec.ts b/packages/api/gateway/tests/client.spec.ts index 3c9a1b5ff4..d4a5965611 100644 --- a/packages/api/gateway/tests/client.spec.ts +++ b/packages/api/gateway/tests/client.spec.ts @@ -667,11 +667,7 @@ describe('Client TypeRT API', () => { const seen: string[] = [] // The declared return is void, so nobody awaits an async listener: the // rejection has to be contained here or it escapes as an unhandled one. - /* oxlint-disable-next-line typescript/no-misused-promises -- - * Deliberately the shape the contract does not invite: `$on` declares a void - * listener, and this pins what the service does when a caller hands it an - * async one anyway. */ - ctx.remote.$on('fixture/changed', () => Promise.reject(new Error('fixture async failure'))) + ctx.remote.$on('fixture/changed', () => Promise.reject(new Error('fixture async failure'))) // oxlint-disable-line typescript/no-misused-promises ctx.remote.$on('fixture/changed', (namespace) => { seen.push(namespace) }) try { ctx.remote.$dispatch('fixture/changed', ['credentials']) diff --git a/packages/client/ui-settings/src/client/settings-scope.ts b/packages/client/ui-settings/src/client/settings-scope.ts index e08e4da42e..674b6ea517 100644 --- a/packages/client/ui-settings/src/client/settings-scope.ts +++ b/packages/client/ui-settings/src/client/settings-scope.ts @@ -31,8 +31,6 @@ import type {} from '@deepseek-ai/dsh-api-remotes/types' // never — the owning package's client-safe, type-only subpath supplies the // cordis `Events` entry (and with it the branded `SettingsNamespace`). import type {} from '@deepseek-ai/dsh-settings/types' -import type { TypeRTClientRemote } from '@deepseek-ai/dsh-type-meta' - type SettingsFace = Pick /** @@ -240,7 +238,7 @@ export class SettingsScopeService extends Service { void controller.load() } const disposers = [ - (ctx.get('remote') as TypeRTClientRemote).$on('settings/document-updated', refresh), + (ctx.get('remote') as Context['remote']).$on('settings/document-updated', refresh), ctx.on('connection/reset', () => { refresh() }), ] void controller.load() diff --git a/packages/host/apiproxy/tests/api-proxy-config.spec.ts b/packages/host/apiproxy/tests/api-proxy-config.spec.ts index 165f406b24..e748d3a38c 100644 --- a/packages/host/apiproxy/tests/api-proxy-config.spec.ts +++ b/packages/host/apiproxy/tests/api-proxy-config.spec.ts @@ -229,10 +229,8 @@ function forwardedSettings(ns: string): HostFrame { return { type: 'host/remote-event', event: 'settings/document-updated', - /* oxlint-disable-next-line typescript/no-unsafe-assignment -- - * expect.any is typed `any`; the frame's args are JsonValue[]. The - * revision is the Host's own counter, so the matcher is the assertion. */ - args: [ns, expect.any(Number)], + // The revision is the Host's own counter, so the matcher is the assertion. + args: [ns, expect.any(Number)], // oxlint-disable-line typescript/no-unsafe-assignment } } diff --git a/packages/session-query/session-query/tests/session-query.spec.ts b/packages/session-query/session-query/tests/session-query.spec.ts index a61be6a7a0..b87bd017fb 100644 --- a/packages/session-query/session-query/tests/session-query.spec.ts +++ b/packages/session-query/session-query/tests/session-query.spec.ts @@ -134,11 +134,8 @@ function expectCode(code: SessionQueryErrorCode): Error { } function rejectUnknown(reason: unknown): Promise { - return new Promise((_resolve, reject) => { - // Exercise containment for an implementation that violates the Error rejection convention. - // oxlint-disable-next-line typescript/prefer-promise-reject-errors - reject(reason) - }) + // Exercise containment for an implementation that violates the Error rejection convention. + return Promise.reject(reason) // oxlint-disable-line typescript/prefer-promise-reject-errors } const cancellableSessionListings = [