{
  "config": {
    "argv": [
      "/opt/hostedtoolcache/node/20.20.2/x64/bin/node",
      "/home/runner/work/dr-card-web/dr-card-web/node_modules/.bin/playwright",
      "test",
      "tests/e2e/test-gate.spec.ts"
    ],
    "configFile": "/home/runner/work/dr-card-web/dr-card-web/playwright.config.ts",
    "rootDir": "/home/runner/work/dr-card-web/dr-card-web/tests/e2e",
    "failOnFlakyTests": false,
    "forbidOnly": true,
    "fullyParallel": true,
    "globalSetup": null,
    "globalTeardown": null,
    "globalTimeout": 0,
    "grep": {},
    "grepInvert": null,
    "maxFailures": 0,
    "metadata": {
      "ci": {
        "commitHref": "https://github.com/sanchuang-dev/dr-card-web/commit/7616e071298a1a3fb9fadb6fd0583c7e19c4c2ad",
        "commitHash": "7616e071298a1a3fb9fadb6fd0583c7e19c4c2ad",
        "prHref": "https://github.com/sanchuang-dev/dr-card-web/pull/262",
        "prTitle": "fix(chat): connect the documented Socket.IO namespace",
        "prBaseHash": "6fb237b7195e0b02b20ca3f554b99489c3e26e86",
        "buildHref": "https://github.com/sanchuang-dev/dr-card-web/actions/runs/40053986730"
      },
      "gitCommit": {
        "shortHash": "7616e07",
        "hash": "7616e071298a1a3fb9fadb6fd0583c7e19c4c2ad",
        "subject": "Merge 3f8aeaa32e18456b6e287485f6f1d84c0b60dc89 into 6fb237b7195e0b02b20ca3f554b99489c3e26e86",
        "body": "Merge 3f8aeaa32e18456b6e287485f6f1d84c0b60dc89 into 6fb237b7195e0b02b20ca3f554b99489c3e26e86\n",
        "author": {
          "name": "SINGING-AKIBA",
          "email": "980325684@qq.com",
          "time": 1792808624000
        },
        "committer": {
          "name": "GitHub",
          "email": "noreply@github.com",
          "time": 1792808624000
        },
        "branch": "HEAD"
      },
      "gitDiff": "diff --git a/src/services/chatHuman.test.ts b/src/services/chatHuman.test.ts\nindex 90eee81..bb20b1c 100644\n--- a/src/services/chatHuman.test.ts\n+++ b/src/services/chatHuman.test.ts\n@@ -44,10 +44,10 @@ beforeEach(() => {\n })\n \n describe('#138 Socket.IO client contract', () => {\n-  it('connects same-origin default namespace using auth.token, never URL/query credentials', () => {\n+  it('connects the /socket.io namespace using auth.token, never URL/query credentials', () => {\n     const status = vi.fn(), onMessage = vi.fn(), onConnected = vi.fn()\n     const handle = connectChatSocket('secret-token', { onStatus: status, onMessage, onConnected })\n-    expect(mocks.io).toHaveBeenCalledWith('https://api.example.test', expect.objectContaining({\n+    expect(mocks.io).toHaveBeenCalledWith('https://api.example.test/socket.io', expect.objectContaining({\n       auth: { token: 'secret-token' }, path: '/socket.io/', autoConnect: false, reconnection: true,\n     }))\n     expect(mocks.socket.connect).toHaveBeenCalledOnce()\n@@ -75,7 +75,7 @@ describe('#138 Socket.IO client contract', () => {\n     mocks.runtime.socketBaseUrl = 'https://socket.example.test'\n     mocks.runtime.socketPath = '/realtime/socket.io/'\n     connectChatSocket('secret-token', { onStatus: vi.fn(), onMessage: vi.fn(), onConnected: vi.fn() })\n-    expect(mocks.io).toHaveBeenCalledWith('https://socket.example.test', expect.objectContaining({\n+    expect(mocks.io).toHaveBeenCalledWith('https://socket.example.test/socket.io', expect.objectContaining({\n       path: '/realtime/socket.io/',\n       auth: { token: 'secret-token' },\n     }))\ndiff --git a/src/services/chatHuman.ts b/src/services/chatHuman.ts\nindex 7c1aa6a..cb0a9c0 100644\n--- a/src/services/chatHuman.ts\n+++ b/src/services/chatHuman.ts\n@@ -6,6 +6,7 @@ import { AppError, createBusinessError, createContractError } from './http'\n import { signCardApiUrl } from './http/apiSignature'\n \n export const CHAT_TRANSFER_PATH = '/api/chatmessages/transfer'\n+export const CHAT_SOCKET_NAMESPACE = '/socket.io'\n const transferResultSchema = { mode: 'human' } as const\n \n export type ChatSocketStatus = 'connecting' | 'connected' | 'disconnected' | 'unauthorized'\n@@ -22,7 +23,7 @@ export function connectChatSocket(token: string, callbacks: ChatSocketEvents): C\n   if (!token) throw new AppError({ kind: 'http', status: 401, message: '请先登录' })\n   const base = runtimePolicy.apiBaseUrl\n   if (!base) throw new AppError({ kind: 'configuration', message: '客服连接地址尚未配置' })\n-  const socket: Socket = io(runtimePolicy.socketBaseUrl ?? new URL(base).origin, {\n+  const socket: Socket = io(`${runtimePolicy.socketBaseUrl ?? new URL(base).origin}${CHAT_SOCKET_NAMESPACE}`, {\n     path: runtimePolicy.socketPath ?? '/socket.io',\n     auth: { token },\n     autoConnect: false,",
      "actualWorkers": 2
    },
    "preserveOutput": "always",
    "projects": [
      {
        "outputDir": "/home/runner/work/dr-card-web/dr-card-web/test-results/artifacts",
        "repeatEach": 1,
        "retries": 1,
        "metadata": {
          "ci": {
            "commitHref": "https://github.com/sanchuang-dev/dr-card-web/commit/7616e071298a1a3fb9fadb6fd0583c7e19c4c2ad",
            "commitHash": "7616e071298a1a3fb9fadb6fd0583c7e19c4c2ad",
            "prHref": "https://github.com/sanchuang-dev/dr-card-web/pull/262",
            "prTitle": "fix(chat): connect the documented Socket.IO namespace",
            "prBaseHash": "6fb237b7195e0b02b20ca3f554b99489c3e26e86",
            "buildHref": "https://github.com/sanchuang-dev/dr-card-web/actions/runs/40053986730"
          },
          "gitCommit": {
            "shortHash": "7616e07",
            "hash": "7616e071298a1a3fb9fadb6fd0583c7e19c4c2ad",
            "subject": "Merge 3f8aeaa32e18456b6e287485f6f1d84c0b60dc89 into 6fb237b7195e0b02b20ca3f554b99489c3e26e86",
            "body": "Merge 3f8aeaa32e18456b6e287485f6f1d84c0b60dc89 into 6fb237b7195e0b02b20ca3f554b99489c3e26e86\n",
            "author": {
              "name": "SINGING-AKIBA",
              "email": "980325684@qq.com",
              "time": 1792808624000
            },
            "committer": {
              "name": "GitHub",
              "email": "noreply@github.com",
              "time": 1792808624000
            },
            "branch": "HEAD"
          },
          "gitDiff": "diff --git a/src/services/chatHuman.test.ts b/src/services/chatHuman.test.ts\nindex 90eee81..bb20b1c 100644\n--- a/src/services/chatHuman.test.ts\n+++ b/src/services/chatHuman.test.ts\n@@ -44,10 +44,10 @@ beforeEach(() => {\n })\n \n describe('#138 Socket.IO client contract', () => {\n-  it('connects same-origin default namespace using auth.token, never URL/query credentials', () => {\n+  it('connects the /socket.io namespace using auth.token, never URL/query credentials', () => {\n     const status = vi.fn(), onMessage = vi.fn(), onConnected = vi.fn()\n     const handle = connectChatSocket('secret-token', { onStatus: status, onMessage, onConnected })\n-    expect(mocks.io).toHaveBeenCalledWith('https://api.example.test', expect.objectContaining({\n+    expect(mocks.io).toHaveBeenCalledWith('https://api.example.test/socket.io', expect.objectContaining({\n       auth: { token: 'secret-token' }, path: '/socket.io/', autoConnect: false, reconnection: true,\n     }))\n     expect(mocks.socket.connect).toHaveBeenCalledOnce()\n@@ -75,7 +75,7 @@ describe('#138 Socket.IO client contract', () => {\n     mocks.runtime.socketBaseUrl = 'https://socket.example.test'\n     mocks.runtime.socketPath = '/realtime/socket.io/'\n     connectChatSocket('secret-token', { onStatus: vi.fn(), onMessage: vi.fn(), onConnected: vi.fn() })\n-    expect(mocks.io).toHaveBeenCalledWith('https://socket.example.test', expect.objectContaining({\n+    expect(mocks.io).toHaveBeenCalledWith('https://socket.example.test/socket.io', expect.objectContaining({\n       path: '/realtime/socket.io/',\n       auth: { token: 'secret-token' },\n     }))\ndiff --git a/src/services/chatHuman.ts b/src/services/chatHuman.ts\nindex 7c1aa6a..cb0a9c0 100644\n--- a/src/services/chatHuman.ts\n+++ b/src/services/chatHuman.ts\n@@ -6,6 +6,7 @@ import { AppError, createBusinessError, createContractError } from './http'\n import { signCardApiUrl } from './http/apiSignature'\n \n export const CHAT_TRANSFER_PATH = '/api/chatmessages/transfer'\n+export const CHAT_SOCKET_NAMESPACE = '/socket.io'\n const transferResultSchema = { mode: 'human' } as const\n \n export type ChatSocketStatus = 'connecting' | 'connected' | 'disconnected' | 'unauthorized'\n@@ -22,7 +23,7 @@ export function connectChatSocket(token: string, callbacks: ChatSocketEvents): C\n   if (!token) throw new AppError({ kind: 'http', status: 401, message: '请先登录' })\n   const base = runtimePolicy.apiBaseUrl\n   if (!base) throw new AppError({ kind: 'configuration', message: '客服连接地址尚未配置' })\n-  const socket: Socket = io(runtimePolicy.socketBaseUrl ?? new URL(base).origin, {\n+  const socket: Socket = io(`${runtimePolicy.socketBaseUrl ?? new URL(base).origin}${CHAT_SOCKET_NAMESPACE}`, {\n     path: runtimePolicy.socketPath ?? '/socket.io',\n     auth: { token },\n     autoConnect: false,",
          "actualWorkers": 2
        },
        "id": "chromium-mobile",
        "name": "chromium-mobile",
        "testDir": "/home/runner/work/dr-card-web/dr-card-web/tests/e2e",
        "testIgnore": [],
        "testMatch": [
          "**/*.@(spec|test).?(c|m)[jt]s?(x)"
        ],
        "timeout": 30000
      }
    ],
    "quiet": false,
    "reporter": [
      [
        "line",
        null
      ],
      [
        "html",
        {
          "outputFolder": "playwright-report",
          "open": "never"
        }
      ],
      [
        "json",
        {
          "outputFile": "test-results/playwright-results.json"
        }
      ]
    ],
    "reportSlowTests": {
      "max": 5,
      "threshold": 300000
    },
    "shard": null,
    "tags": [],
    "updateSnapshots": "missing",
    "updateSourceMethod": "patch",
    "version": "1.63.0",
    "workers": 2,
    "webServer": null
  },
  "suites": [
    {
      "title": "test-gate.spec.ts",
      "file": "test-gate.spec.ts",
      "column": 0,
      "line": 0,
      "specs": [
        {
          "title": "@test-gate build identity matches the production-like test policy",
          "ok": true,
          "tags": [
            "test-gate"
          ],
          "tests": [
            {
              "timeout": 30000,
              "annotations": [],
              "expectedStatus": "passed",
              "projectId": "chromium-mobile",
              "projectName": "chromium-mobile",
              "results": [
                {
                  "workerIndex": 0,
                  "parallelIndex": 0,
                  "status": "passed",
                  "duration": 94,
                  "errors": [],
                  "stdout": [],
                  "stderr": [],
                  "retry": 0,
                  "startTime": "2026-10-24T02:24:58.231Z",
                  "annotations": [],
                  "attachments": []
                }
              ],
              "status": "expected"
            }
          ],
          "id": "37c772ca39f4c8e5dd7a-c3b6e0ce5d8c5d8734e5",
          "file": "test-gate.spec.ts",
          "line": 31,
          "column": 1
        },
        {
          "title": "@test-gate browser entry does not start the app router",
          "ok": true,
          "tags": [
            "test-gate"
          ],
          "tests": [
            {
              "timeout": 30000,
              "annotations": [],
              "expectedStatus": "passed",
              "projectId": "chromium-mobile",
              "projectName": "chromium-mobile",
              "results": [
                {
                  "workerIndex": 1,
                  "parallelIndex": 1,
                  "status": "passed",
                  "duration": 1226,
                  "errors": [],
                  "stdout": [],
                  "stderr": [],
                  "retry": 0,
                  "startTime": "2026-10-24T02:24:58.259Z",
                  "annotations": [],
                  "attachments": []
                }
              ],
              "status": "expected"
            }
          ],
          "id": "37c772ca39f4c8e5dd7a-8ed37c8041402a2a6b34",
          "file": "test-gate.spec.ts",
          "line": 40,
          "column": 1
        },
        {
          "title": "@test-gate / shows the unsupported-host notice in a browser",
          "ok": true,
          "tags": [
            "test-gate"
          ],
          "tests": [
            {
              "timeout": 30000,
              "annotations": [],
              "expectedStatus": "passed",
              "projectId": "chromium-mobile",
              "projectName": "chromium-mobile",
              "results": [
                {
                  "workerIndex": 0,
                  "parallelIndex": 0,
                  "status": "passed",
                  "duration": 1271,
                  "errors": [],
                  "stdout": [],
                  "stderr": [],
                  "retry": 0,
                  "startTime": "2026-10-24T02:24:58.405Z",
                  "annotations": [],
                  "attachments": []
                }
              ],
              "status": "expected"
            }
          ],
          "id": "37c772ca39f4c8e5dd7a-b030d57053896c93a550",
          "file": "test-gate.spec.ts",
          "line": 51,
          "column": 3
        },
        {
          "title": "@test-gate /profile shows the unsupported-host notice in a browser",
          "ok": true,
          "tags": [
            "test-gate"
          ],
          "tests": [
            {
              "timeout": 30000,
              "annotations": [],
              "expectedStatus": "passed",
              "projectId": "chromium-mobile",
              "projectName": "chromium-mobile",
              "results": [
                {
                  "workerIndex": 1,
                  "parallelIndex": 1,
                  "status": "passed",
                  "duration": 1045,
                  "errors": [],
                  "stdout": [],
                  "stderr": [],
                  "retry": 0,
                  "startTime": "2026-10-24T02:24:59.827Z",
                  "annotations": [],
                  "attachments": []
                }
              ],
              "status": "expected"
            }
          ],
          "id": "37c772ca39f4c8e5dd7a-8605535a2807e17fcccc",
          "file": "test-gate.spec.ts",
          "line": 51,
          "column": 3
        },
        {
          "title": "@test-gate /settings shows the unsupported-host notice in a browser",
          "ok": true,
          "tags": [
            "test-gate"
          ],
          "tests": [
            {
              "timeout": 30000,
              "annotations": [],
              "expectedStatus": "passed",
              "projectId": "chromium-mobile",
              "projectName": "chromium-mobile",
              "results": [
                {
                  "workerIndex": 0,
                  "parallelIndex": 0,
                  "status": "passed",
                  "duration": 1007,
                  "errors": [],
                  "stdout": [],
                  "stderr": [],
                  "retry": 0,
                  "startTime": "2026-10-24T02:24:59.844Z",
                  "annotations": [],
                  "attachments": []
                }
              ],
              "status": "expected"
            }
          ],
          "id": "37c772ca39f4c8e5dd7a-4a2fdc9884c1725de4f8",
          "file": "test-gate.spec.ts",
          "line": 51,
          "column": 3
        },
        {
          "title": "@test-gate gated browser entry issues no business API request",
          "ok": true,
          "tags": [
            "test-gate"
          ],
          "tests": [
            {
              "timeout": 30000,
              "annotations": [],
              "expectedStatus": "passed",
              "projectId": "chromium-mobile",
              "projectName": "chromium-mobile",
              "results": [
                {
                  "workerIndex": 0,
                  "parallelIndex": 0,
                  "status": "passed",
                  "duration": 1101,
                  "errors": [],
                  "stdout": [],
                  "stderr": [],
                  "retry": 0,
                  "startTime": "2026-10-24T02:25:00.864Z",
                  "annotations": [],
                  "attachments": []
                }
              ],
              "status": "expected"
            }
          ],
          "id": "37c772ca39f4c8e5dd7a-09f38a2b8ed735e192d8",
          "file": "test-gate.spec.ts",
          "line": 65,
          "column": 1
        },
        {
          "title": "@test-gate injected native host bypasses the notice and starts the app",
          "ok": true,
          "tags": [
            "test-gate"
          ],
          "tests": [
            {
              "timeout": 30000,
              "annotations": [],
              "expectedStatus": "passed",
              "projectId": "chromium-mobile",
              "projectName": "chromium-mobile",
              "results": [
                {
                  "workerIndex": 1,
                  "parallelIndex": 1,
                  "status": "passed",
                  "duration": 1091,
                  "errors": [],
                  "stdout": [],
                  "stderr": [],
                  "retry": 0,
                  "startTime": "2026-10-24T02:25:00.895Z",
                  "annotations": [],
                  "attachments": []
                }
              ],
              "status": "expected"
            }
          ],
          "id": "37c772ca39f4c8e5dd7a-8caf237c4d42513fff2f",
          "file": "test-gate.spec.ts",
          "line": 80,
          "column": 1
        }
      ]
    }
  ],
  "errors": [],
  "stats": {
    "startTime": "2026-10-24T02:24:57.348Z",
    "duration": 4716.843,
    "expected": 7,
    "skipped": 0,
    "unexpected": 0,
    "flaky": 0
  }
}