Files
QLinker/docs/能力基线.json
T
xiaowang 27182fc7d2 feat: 交付任务005-021全量改动(自动化/AI/联系人中心、消息中心改造、运维与容器化)
- 自动化中心:规则引擎、流程画布与触发器(V7/V10/V12/V18/V21)、测试全流程、安全边界、执行记录
- AI 中心:服务商/模型/调用与工具授权/治理(V8/V17)及配套前端页面
- 联系人中心:联系人目录、分组/标签、同步幂等(V19)与实装页面
- 消息中心:三栏布局重做、头像昵称服务端抓取与缓存(V16 conversation_profile)、出站归属修复
- 接入管理:NapCat 反向 WS/HTTP 回调多通道发送传输、连接状态统一口径
- 运维中心:备份保留与恢复确认(V13/V22/V24)、监控告警(V23)、日志与审计
- 全局:账号上下文切换(V20 account_profile)、统一 UI 基础组件、分页样式、Flyway 增量迁移护栏
- 部署:Dockerfile/docker-compose/Nginx 容器化编排与 CI 校验脚本
- 文档:任务 005-021 交付记录、设计画板导出、接口/数据库/架构文档同步
2026-11-17 17:29:06 +08:00

1032 lines
77 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"meta": {
"purpose": "NapCat 能力目录基线(机器可读)。DEC-005 决策为『不锁 NapCat 版本,但升级必须跑全量回归』,本文件即该回归的门禁基线:tools/probe/capability-check.mjs 以此比对实测结果,状态漂移即门禁失败。",
"governance": [
"本文件只登记实测证据支持的结论,禁止把设计目标或上游文档声明写成已验证。",
"status 取值语义见 enums.status;任何项不得留空,未采到必须用 untested 并在 todo 说明阻塞原因。",
"变更本文件必须同时提供证据文件名(evidence),且证据文件位于 gitignored 的 local/ 目录,文件名需在 docs/决策基线.md 可检索。"
],
"targetNapCat": {
"protocol_version": "v11",
"version_observed": "4.18.41",
"platform": "linux",
"note": "DEC-005 不锁版本。version_observed 仅为本次基线采集时的实际版本,升级后必须重跑 capability-check。"
},
"collectedAt": "2026-10-29",
"environment": {
"transport": "forward-websocket",
"authConfirmedBy": "meta_event/lifecycle",
"testGroup": 933280401,
"testFriend": 2161656029,
"selfQq": 3575608514
},
"evidenceRule": "三证据 = API retcode + 入站事件段 + get_group_msg_history/get_friend_msg_history 回读段。retcode=0 单独不构成成功结论。",
"probes": {
"matrix": "tools/probe/matrix-probe.mjs",
"segments": "tools/probe/seg-probe.mjs",
"record": "tools/probe/record-probe.mjs",
"recordAmr": "tools/probe/record-amr-probe.mjs",
"recordDecoder": "tools/probe/record-decoder-probe.mjs",
"forwardFollowup": "tools/probe/fwd-record-followup.mjs",
"urlMedia": "tools/probe/url-media-probe.mjs",
"historyAudit": "tools/probe/history-audit.mjs",
"historyDump": "tools/probe/history-dump.mjs",
"privateHistoryAudit": "tools/probe/private-history-audit.mjs",
"forwardReadback": "tools/probe/forward-readback-probe.mjs",
"noticeCapability": "tools/probe/notice-capability.mjs",
"aiRecordSideeffect": "tools/probe/ai-record-sideeffect.mjs",
"historyWindow": "tools/probe/history-window-probe.mjs",
"historyPageAlias": "tools/probe/history-page-alias-probe.mjs",
"historyWindowRecheck": "tools/probe/history-window-recheck.mjs",
"segCensus": "tools/probe/seg-census.mjs",
"privateRecordFwdMedia": "tools/probe/private-record-fwd-media.mjs",
"fwdMediaNode": "tools/probe/fwd-media-node-probe.mjs",
"reliability": "tools/probe/reliability-probe.mjs",
"reliabilityTimeline": "tools/probe/reliability-timeline.mjs",
"wsConnLimit": "tools/probe/ws-conn-limit-probe.mjs",
"wsReconnect": "tools/probe/ws-reconnect-probe.mjs",
"seqNamespace": "tools/probe/seq-namespace-probe.mjs",
"historyCountScan": "tools/probe/history-count-scan.mjs",
"historyEdgeOffbyone": "tools/probe/history-edge-offbyone.mjs"
}
},
"enums": {
"status": {
"verified": "三证据一致通过:API 成功、事件段与提交段一致、history 回读段一致。",
"silent_drop": "API retcode=0,但该消息段在事件与 history 中均消失,仅余其它段。上游假成功。",
"downgraded": "API retcode=0 且消息送达,但段被改写为其它类型(通常降级为 text),语义丢失。",
"no_event": "API retcode=0 且 history 可回读到该消息,但入站事件通道完全无回推。",
"rejected": "API 返回非 0 retcode,消息未发出,有明确错误原文。",
"readback_gap": "写入成功但读回接口不可用或读不回内容,属能力缺口。",
"blocked": "受部署/网络/配置条件限制本轮无法采集,不等于不支持。",
"untested": "本轮未采集,无结论。",
"not_applicable": "该维度对此能力不存在(例如纯入站事件没有 history 回读形态)。"
},
"realEnvTest": {
"verified": "已在真实 NapCat 4.18.41 环境完成验证。",
"partial": "部分场景已验证,仍有子场景未覆盖(见 limitations/todo)。",
"blocked": "环境条件受阻,未能验证。",
"not_tested": "本轮未做真实环境验证。"
},
"adapterStatus": {
"pending": "QLinker 侧解析/发送适配尚未实现(当前仓库无 Java 业务代码,全部为 pending)。"
}
},
"globalConstraints": [
{
"id": "GC-001",
"title": "retcode=0 不等于送达,也不等于语义完整",
"detail": "实测存在三类假成功:段被静默丢弃(poke/location/私聊 at)、降级为 text(music 的 url 形式)、成功但零事件回推(file/上传群文件)。判定必须以事件段数组与 history 段数组比对为准。",
"evidence": ["local/matrix-result-2026-10-29T06-48-10-358Z.jsonl", "local/history-audit-1793256740235.jsonl"]
},
{
"id": "GC-002",
"title": "上游自检类 API 不可信",
"detail": "can_send_record 返回 data.yes=true,但真实 record 发送(含合法 silk v3 素材)全部 retcode=1200。能力判定禁止采信上游 can_* 探测,必须真实发送 + 回读。",
"evidence": ["local/record-probe-2026-10-29T06-51-01-418Z.jsonl"]
},
{
"id": "GC-003",
"title": "自发消息的 post_type 不是 message",
"detail": "自己发出的消息回推 post_type=message_sent,并带 message_sent_type=self。接收链路若只匹配 post_type==message 会完全漏掉自发消息。target_id 与 message_sent_type 仅事件通道有,history 无。",
"evidence": ["local/url-media-2026-10-29T06-56-59-995Z.jsonl"]
},
{
"id": "GC-004",
"title": "raw_message 含 HTML 实体转义,禁止用简单正则切 CQ 码",
"detail": "history 的 raw_message 把 [ ] , 等转义为 [ ] ,。按文本标记匹配消息会失败,必须用 message_id 关联。",
"evidence": ["local/dump-145523.jsonl"]
},
{
"id": "GC-005",
"title": "message_id 不是序号",
"detail": "message_id == message_seq == real_id,为随机大整数,不可跨会话比较、不递增。会话内唯一稳定递增标识是 real_seq(字符串)。去重键候选 (bindingUid, group_id, real_seq) 已证明【不完整】:real_seq 只在单个会话内唯一,且 group_id 不得只表示群号,必须改为「会话类型 + 会话 ID」,见 GC-022。",
"evidence": ["docs/决策基线.md#19"]
},
{
"id": "GC-006",
"title": "媒体 CDN URL 含 rkey,具时效",
"detail": "跨轮次复用历史 URL 会失效。采集 URL 形式媒体必须『现发现用』,且发送前先 HEAD/GET 验证可达,否则会把 URL 过期误判成 NapCat 不支持 URL 形式。",
"evidence": ["local/url-media-2026-10-29T06-56-59-995Z.jsonl"]
},
{
"id": "GC-007",
"title": "get_ai_record 名义为查询接口,实际会真实发送语音消息",
"detail": "安全影响重大:调用前 history 有 4 条 record 消息,调用一次后新增 1 条,且新增消息的 CDN fileid 与接口返回值完全一致。该接口必须按写操作纳入权限、限流、审计与副作用管控,禁止当作只读探测使用。",
"severity": "high",
"evidence": ["local/ai-record-sideeffect-*.jsonl", "local/dump-145523.jsonl"]
},
{
"id": "GC-008",
"title": "WS 握手不校验 access_token",
"detail": "错误凭据仍可完成握手,随后才回 retcode=1403 并断开。健康检查与『连接可用』判定必须等到收到 meta_event/lifecycle,不能以 onopen 为准。",
"evidence": ["docs/决策基线.md#16"]
},
{
"id": "GC-009",
"title": "写操作接口对不存在的目标也返回 retcode=0(假成功)",
"detail": "set_group_kick_members 传入不存在的 user_id=[1],retcode=0 且 data=null,群成员数实测前后均为 5,即实际未产生任何效果。写操作不得以 retcode 判定业务成功,必须回读目标状态(成员列表/消息列表)确认,否则会把『什么都没做』记成『已完成』。",
"severity": "high",
"evidence": ["local/notice-capability-2026-10-29T07-29-59-898Z.jsonl"]
},
{
"id": "GC-010",
"title": "real_seq 是字符串,message_id 是数字,二者类型不同",
"detail": "get_group_msg_history 与 get_friend_msg_history 回读的 real_seq 均为 string(如 \"3115\"),message_id 为 number。事件通道与 history 的同一标识类型不保证一致。去重键、排序与数据库列类型必须显式统一(建议 real_seq 统一按无符号整型入库并在边界层做一次转换),禁止依赖 JS/Java 的隐式转换或字符串比较,否则会出现 '9' > '10' 类的排序与去重错误。",
"evidence": ["local/private-history-audit-2026-10-29T07-33-39-286Z.jsonl", "docs/决策基线.md#21"]
},
{
"id": "GC-011",
"title": "群文件 file_id 有独立读回路径,不必只依赖 history",
"detail": "upload_group_file 不返回 file_id,但 get_group_root_files 可直接列出群文件并给出 file_id/file_name/size/uploader/modify_time,get_group_file_url 用该 file_id 可换到下载直链(实测 retcode=0)。因此文件类消息的补拉与下载不必受 history 窗口限制,但 file 事件缺失本身仍需 history/文件列表双路对账。",
"evidence": ["local/notice-capability-2026-10-29T07-29-59-898Z.jsonl"]
},
{
"id": "GC-012",
"title": "合并转发内层节点不可还原;news 的『可解析性』是发送形态造成的假象",
"detail": "get_forward_msg 对本轮同一连接刚发出(seq=3124/3125)的合并转发立即调用,仍返回 retcode=1200『消息已过期或者为内层消息』;改用 forward_id/resid/uniseq 则直接回『message_id is required』⇒ 既排除『消息已过期』的时序解释,也证明这些参数根本不被接受,属接口能力缺口。唯一附带内容 meta.detail.news 的形态由当初 node.content 的传法决定,两种形态可还原性完全相反(已用同一批含 image/record/at 的节点做定点对照):content 传【段数组】时 news 是渲染后的降级摘要——image→『[图片]』、record→『[该消息类型暂不支持查看]』、at→『@昵称』,资源标识不可逆丢失;content 传【JSON.stringify(段数组)】时 news 里原样嵌入原始段数组文本,段类型/file/CDN url/甚至 base64 全部保留。注意两者不是『一个对一个错』:段数组形态渲染正确(人能看到图片/占位符)但结构在 news 中丢失,JSON 字符串形态结构可取回但 QQ 客户端会把整段 JSON 当字面文本显示(对收件人是语义损坏),因此 QLinker 发送侧仍必须用段数组形态,禁止为了『能取回结构』改用字符串形态。结论:标准化模型禁止把 news 当作可靠的结构化节点来源(他人转发的形态由上游决定、本地不可控),必须原样保留 json.data.data 全文与 resid/uniseq/filename/tsum,并把『[图片]』『[该消息类型暂不支持查看]』识别为上游降级占位串而非用户正文。",
"severity": "high",
"sizeRisk": "content 传 JSON 字符串时 base64 会被整段写入 news,单条外层消息体积可膨胀数 KB 以上。落库与日志必须按不可信大负载处理(大小上限、脱敏、不无条件写日志),对应 AGENTS 5.2/7.3/16.1。",
"evidence": ["local/forward-readback-2026-10-29T08-13-22-610Z.jsonl", "local/forward-readback-2026-10-29T08-00-43-746Z.jsonl", "local/fwd-media-node-2026-10-29T09-44-17-649Z.jsonl"]
},
{
"id": "GC-013",
"title": "判定接入链路受阻前必须先确定 TCP 连接发起方,三条链路不可互相外推",
"detail": "httpServers 由 QLinker 主动连 NapCat(受阻查 NapCat 侧端口映射/宿主防火墙);httpClients 与 websocketClients 由 NapCat 主动连 QLinker(受阻查 NapCat→本机路由与开发机自身防火墙入站规则,属本地可控)。三条链路方向与排查位置不同,禁止用一条的受阻原因给另一条定性。当前实测仅覆盖 3 个隧道地址(10.66.0.5 / 10.66.0.4 映射地址 / 100.121.146.35),本机 192.168.200.3 与 192.168.43.173 从未实测,故 LINK-http-callback 由 blocked 回退为 untested。零副作用预检法:NapCat GET /api/base/proxy 探本机端口 + 本机 sink 监听,refused=路由可达、timeout=无可达路由,无需改 OB11 配置也无需重启。",
"evidence": ["docs/决策基线.md#23"]
},
{
"id": "GC-014",
"title": "NapCat 主动外连 QLinker 的链路,必须先确认本机防火墙对 node.exe 的【公用网络】入站阻止规则",
"detail": "实测本机 Windows 防火墙三个 profile 全部启用,node.exe 的规则按 profile 行为相反:公用=阻止 TCP/UDP 入站,专用=允许。而本机以太网(192.168.200.3)与 WLAN(192.168.43.173) 的 NetworkCategory 实测均为 Public,唯一 Private 网络是 Tailscale(该地址已实测 NapCat 侧不可达)。⇒ 任何『NapCat 主动连 QLinker』的链路(HTTP 回调、反向 WS)在解决此规则前必然收不到连接,且失败表现为『零连接尝试』,与路由不可达的现象完全相同,极易误判为拓扑问题。排查顺序:先 netsh advfirewall 查本机规则(零凭据零副作用),再做路由预检,最后才动配置。修改本机防火墙规则属改变本机安全配置,需单独授权。",
"severity": "high",
"evidence": ["docs/决策基线.md#24"]
},
{
"id": "GC-015",
"title": "history 只能读回 NapCat 本地的一段滑动窗口且【不可翻页】,事件流实时落库是唯一完整来源",
"detail": "实测 count 语义近似『返回该会话最近的不多于 min(count, 可读总量) 条』:群 count=10/20/30/50/51/60/80/100 精确返回同数、count=150/200/500/1000 稳定返回 122 条(seq=3076..3197),私聊超过可读总量后稳定 14 条(seq=1231..1244),不传 count 时群默认 20 条,messages 为升序数组。⚠️ 前几轮的上限结论均已作废并被修正:『私聊硬上限 10 条 / 群 46 条』错在把『可读总量恰好等于返回条数』误判为接口上限;『群 count=100/200 均返回 50 条』亦非接口截断,下一轮同参数返回 122 条 ⇒ 当时 50 条确为可读量耗尽;私聊不传 count 时返回 14 条(等于其可读总量),并非默认 20 条的证据。⚠️ 但『精确返回同数』只在低 count 段成立:count=108..122 一律少 1 条(GC-021),故条数随 count 单调不减【不是】可靠的完整性判据。翻页方面,start_id/end_id/message_id/msg_id 在窗口边界与窗口中部两种取值下均返回同一页,12 个候选参数名(start_id,end_id,message_id,msg_id,start_seq,end_seq,seq,offset,page,index,from_seq,to_seq)穷举全部无效,连续翻页推进 0 页 ⇒ 禁止把 history 设计成可分页补拉的数据源。设计后果:可读起点随窗口滑动,QLinker 必须依靠事件流实时落库作为唯一完整消息来源,history 仅作有限窗口的兜底核对;对 count 设上限的理由是『防止单次响应过大』而非『接口只给这么多』,禁止在任何文档中写入固定上限值。",
"severity": "high",
"evidence": [
"local/history-recheck-2026-10-29T09-47-33-494Z.jsonl",
"local/history-page-alias-2026-10-29T09-39-22-278Z.jsonl",
"local/history-count-scan-2026-10-30T02-01-06-024Z.jsonl",
"docs/决策基线.md#25",
"docs/决策基线.md#26"
]
},
{
"id": "GC-016",
"title": "node 段不得与其他段混发,后端以 retcode=1400 拒绝,QLinker 发送侧必须前置校验",
"detail": "send_group_msg 的 message 同时含 node 段与 text 段时,上游返回 retcode=1400『转发消息不能和普通消息混在一起发送,转发需要保证message只有type为node的元素』;同一探针中纯 node 的 fwd_media_flat 返回 retcode=0(seq=3122)。⇒ 统一发送服务(第 8.1 参数校验)应在检测到 node 段时要求 message 全部为 node,并在前端给出明确错误,而不是把上游错误原样抛给用户。",
"severity": "medium",
"evidence": ["local/pr-fwd-2026-10-29T09-40-59-566Z.jsonl", "docs/决策基线.md#25"]
},
{
"id": "GC-017",
"title": "news 中的『[图片]』『[该消息类型暂不支持查看]』等是上游渲染占位串,禁止当作用户正文入库",
"detail": "合并转发 meta.detail.news[].text 是上游渲染后的降级摘要,实测占位串包括『[图片]』『[该消息类型暂不支持查看]』,at 段被渲染为『@昵称』。这些字符串不是用户输入、也不携带任何资源标识,若直接入库会污染标准化消息与后续规则匹配(第 9 章规则输入必须来自可信字段)。解析层需将其识别为降级占位并标记原段类型未知,同时保留 json.data.data 原文供上游能力修复后重放。",
"severity": "medium",
"evidence": ["local/fwd-media-node-2026-10-29T09-44-17-649Z.jsonl", "docs/决策基线.md#25"]
},
{
"id": "GC-018",
"title": "正向 WebSocket 按连接扇出且【无并发连接数上限】,同 token 多实例会静默互收全量事件",
"detail": "同一账号同时开两条正向 WS,同一条消息每条连接各收 1 份(C1-fanout 两轮复现:seq=3165、seq=3217);依次建 6 条连接全部完成握手并收到 lifecycle,全部关闭后立即重连亦成功 ⇒ 上游既不做连接数限制,也不做单连接互斥。设计后果:(1) 重复投递的唯一已知根因是连接泄漏或同 token 多实例,不是上游重发,去重必须实现但根因可控;(2) 多个 QLinker 实例绑定同一 NapCat 时彼此都能收到全量事件,不会因为『已被别人连接』而报错,必须靠 bindingUid 维度去重与『同一 bindingUid 唯一活跃接收者』的部署约束防止重复副作用(第 8.3、9.3 章);(3) 健康检查不得把『能连上』当作独占可用依据。",
"severity": "high",
"evidence": ["local/reliability-2026-10-30T02-05-07-336Z.jsonl", "local/ws-conn-limit-2026-10-30T01-48-53-772Z.jsonl", "docs/决策基线.md#26"]
},
{
"id": "GC-019",
"title": "断线期间的事件上游完全不补推,重连后一条都收不到;实时落库是硬约束而非优化",
"detail": "接收连接主动关闭期间发出 3 条消息,history 侧确认该会话新增 3 条,重连并收到 lifecycle 后观测 8s,补推 0 条(replay_seqs 为空,两轮独立复现)。叠加 GC-015(history 不可翻页、可读起点随窗口滑动)⇒ 断线缺口不可完整回填。设计后果:(1) 事件流实时落库是唯一完整消息来源,不得设计成『先攒着,回头用 history 补齐』;(2) 必须显式记录连接离线区间,恢复后在有限窗口内对账并把缺口作为告警暴露给运维(第 16.2、16.3 章),禁止静默接受缺口;(3) 接收路径的可用性等级应高于业务处理路径,接收侧积压或失败必须优先告警。",
"severity": "high",
"evidence": ["local/reliability-2026-10-30T02-05-07-336Z.jsonl", "docs/决策基线.md#26"]
},
{
"id": "GC-020",
"title": "事件到达顺序与 real_seq 顺序不一致,禁止按到达顺序定序",
"detail": "并发发送 16 条全部 retcode=0,事件到达顺序出现 3 个逆序对(…3201,3203,3202,3205,3204…3210,3209…);8 条批次亦出现 1 个逆序对 ⇒ 两轮独立复现,非偶发。且 API 响应顺序本身与 real_seq 不同序、事件顺序又与 API 顺序不同序,任何一层都不能推断顺序。设计后果:入库排序与『会话内上一条消息』判断必须以 real_seq 为准;允许乱序到达需要短缓冲,但缓冲时长只能作为工程参数、不得当作上游保证;规则引擎(第 9 章)若依赖消息先后关系,必须显式声明其乱序容忍策略。",
"severity": "high",
"evidence": ["local/reliability-2026-10-30T02-05-07-336Z.jsonl", "docs/决策基线.md#26"]
},
{
"id": "GC-021",
"title": "history 在 count 未超过可读量时仍会少给一条(窗口边界丢条),禁止用返回条数做完整性判据",
"detail": "以 count=500 取到可读窗口 122 条(seq=3076..3197,编号连续无空洞)作为参照集后逐值细扫:count≤107 时返回条数严格等于 count;count=108..122(即可读量往前 15 条以内)一律返回 count-1 条,且缺失的恰是本次应含的最旧一条(count=108 缺 seq=3090,count=120 返回 119 条缺 seq=3078,count=122 返回 121 条缺 seq=3076);count≥123 超过可读量后稳定返回全窗口 122 条,反而不再少;两轮独立结果逐值完全一致,稳定可复现。⇒ 『返回条数 == min(count, 可读量)』不成立,GC-015 中『精确返回同数』的表述仅在低 count 段成立,且该异常带的位置随窗口变化,无法用固定阈值规避。设计后果:补拉对账不得用『本次返回条数是否等于请求条数』判断是否拉全,必须以 real_seq 连续性 + 与事件流交叉比对为准;若用条数做完整性判据会把漏拉当成拉全,属静默数据丢失。规避方式:请求时多要若干条(如 count+32)并自行按 real_seq 去重排序,禁止依赖返回条数。",
"severity": "high",
"evidence": ["local/history-edge-2026-10-30T02-03-26-473Z.jsonl", "local/history-count-scan-2026-10-30T02-01-06-024Z.jsonl", "docs/决策基线.md#26"]
},
{
"id": "GC-022",
"title": "real_seq 仅在单个会话内唯一,去重键必须含【会话类型 + 会话 ID】二元组",
"detail": "群窗口 122 条 real_seq 去重后 122 个、私聊窗口 14 条去重后 14 个 ⇒ 会话内唯一成立;群区间 3076..3197 与私聊区间 1231..1244 本批样本取值重叠 0 个,但两者量级独立(比值 2.57,而群历史消息量远多于私聊),重叠为 0 只是当前取值区间错开的巧合,不能据此认为存在全局命名空间。风险点:群号与 QQ 号同为无符号 64 位整数,若用同一列混装两种 ID,仅靠 real_seq 去重会把不同会话的消息误判为重复并丢弃(数据丢失级)。⇒ 去重键与消息唯一索引必须包含会话类型判别 + 会话 ID + real_seq,类型转换遵守 GC-010;GC-005 的候选键 (bindingUid, group_id, real_seq) 中 group_id 不得只表示群号。",
"severity": "high",
"evidence": ["local/seq-namespace-2026-10-30T02-00-04-792Z.jsonl", "local/reliability-2026-10-30T02-05-07-336Z.jsonl", "docs/决策基线.md#26"]
}
],
"capabilities": [
{
"id": "MSG-text",
"name": "文本段",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_text/p_text + history-audit 16/16 命中",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_text", "expect": { "retcode": 0, "eventSegs": "text", "historySegs": "text" } },
"limitations": ["实测 5000 字长文本不截断(seg-probe: long_text)。"],
"todo": []
},
{
"id": "MSG-at",
"name": "@ 成员段",
"kind": "message-segment",
"api": ["send_group_msg"],
"supports": ["group"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_at_all -> at+text(群)",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_at_all", "expect": { "retcode": 0, "eventSegs": "at+text", "historySegs": "at+text" } },
"limitations": [
"@全体可用:at.data.qq == \"all\"(字面量字符串),且 get_group_at_all_remain 返回 can_at_all=true、群剩 19 次/个人剩 9 次。",
"私聊 at 段被静默丢弃(见 MSG-at-private)。"
],
"todo": []
},
{
"id": "MSG-at-private",
"name": "@ 段用于私聊",
"kind": "message-segment",
"api": ["send_private_msg"],
"supports": [],
"sendStatus": "silent_drop",
"eventStatus": "silent_drop",
"historyStatus": "silent_drop",
"parseStatus": "pending",
"automationTest": "matrix-probe: p_at -> retcode=0,事件与 history 段均只剩 text",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "p_at", "expect": { "retcode": 0, "eventSegs": "text", "historySegs": "text" } },
"limitations": ["典型假成功:retcode=0 但 at 段消失。标准化模型不得据此认为 at 生效。"],
"todo": []
},
{
"id": "MSG-face",
"name": "表情段",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_face/p_face -> face+text",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_face", "expect": { "retcode": 0, "eventSegs": "face+text", "historySegs": "face+text" } },
"limitations": [
"face.data.raw 是 19 字段大对象(faceIndex/faceText/faceType 等),按 ADR-013 必须整体保留原始 JSON,不得只取 id。"
],
"todo": []
},
{
"id": "MSG-image",
"name": "图片段(base64 与 URL 两种形式)",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: p_image_b64 -> image+text;url-media-probe: g_image_url -> image+text(事件与 history 均命中)",
"realEnvTest": "verified",
"regressionProbe": { "probe": "urlMedia", "case": "g_image_url", "expect": { "retcode": 0, "eventSegs": "image+text", "historySegs": "image+text" } },
"limitations": [
"URL 形式可用,但必须先现场取 URL 且验证可下载(GC-006)。",
"回推段带 file_size 与 url,url 指向带 rkey 的时效 CDN,落库须转存 MinIO,不得直接持久化该 URL。"
],
"todo": ["超大图与非法图片内容的边界未测。"]
},
{
"id": "MSG-video",
"name": "视频段(base64 与 URL 两种形式)",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_video_b64 -> text+video;url-media-probe: g_video_url -> text+video",
"realEnvTest": "verified",
"regressionProbe": { "probe": "urlMedia", "case": "g_video_url", "expect": { "retcode": 0, "eventSegs": "text+video", "historySegs": "text+video" } },
"limitations": [
"不校验内容合法性:70 字节的 PNG 伪装成 video 也 retcode=0 并成功落库。发送侧必须自行做类型与大小校验,不能依赖上游。"
],
"todo": ["真实编码视频的可播放性未验证。"]
},
{
"id": "MSG-record",
"name": "语音段",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "record-amr-probe --yes: amr_cdnUrl/amr_b64/amr_b64_fmt/amr_b64_fmt_amr 四次 retcode=0,事件段=record+text,history seq=3118-3121 回读 record+text;对照组 amr_localPath=1200。私聊独立取证:private-record-fwd-media --yes 的 p_rec_b64/p_rec_cdn 均 retcode=0,事件段=record+text,history seq=1241/1242 回读 record+text;p_rec_path=1200",
"realEnvTest": "verified",
"regressionProbe": { "probe": "recordAmr", "case": "amr_b64", "expect": { "retcode": 0, "eventSegs": "record+text", "historySegs": "record+text" } },
"limitations": [
"【推翻前一轮结论】record 段本身可用,但**载荷必须是 AMR**(magic 2321414d52 = \"#!AMR\")。同一传法下的严格对照:base64:// 形式 amr=0 / silk=1200,CDN url 形式 amr=0 / silk=1200。silk 载荷(含 NapCat 自己 get_ai_record 产出的合法 silk v3,magic 03232153494c4b5f5633)一律 retcode=1200 'Failed to open input: Invalid data found when processing input'。",
"定性:不是 record 功能损坏,也不是素材非法或参数形态错误,而是本 NapCat 环境**缺 silk 解码/转码链**,只保留 AMR 直通路径。发送侧必须保证上传 AMR,或在 QLinker 侧先转码为 AMR。",
"file 传 NapCat 宿主机本地绝对路径(history record 段的 path 字段原值)仍 retcode=1200 'Failed to open input'。可用途径仅两条:QQ CDN 新鲜直链、base64://<字节>。禁止依赖本地路径。",
"can_send_record=yes 未区分载荷格式,与 silk 失败矛盾,再次印证 GC-002:上游自检不可采信。",
"转码/读回接口 get_record 与本能力是两回事:真实 amr 的 file/url/path × mp3/wav/silk 共 9 组全部 retcode=1200,自造 WAV 内联形式全部 'file not found'(不接受内联载荷)。故 get_record 既不能用于验证也不能用于转码,标 blocked,见 MSG-record-transcode。",
"私聊作用域已独立取证,不再依赖群结论外推:send_private_msg + record 的 base64://AMR 与新鲜 CDN 直链两种载荷均 retcode=0,事件段与 history 段均为 record+text(seq=1241/1242);宿主机本地路径形态在私聊同样 1200。可用路径与群侧完全一致。"
],
"todo": ["确认 QLinker 侧 AMR 转码方案(发送前转码 vs 仅接受 AMR 上传)并写入功能设计。", "silk 支持需换用具备完整解码依赖的 NapCat 部署重测,属上游环境项。"]
},
{
"id": "MSG-record-silk",
"name": "语音段 silk 载荷(负向对照)",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": [],
"sendStatus": "rejected",
"eventStatus": "rejected",
"historyStatus": "rejected",
"parseStatus": "pending",
"automationTest": "record-probe: 7 种 silk 传法(b64_plain / b64_format_silk / b64_name_silk / url_plain / url_field / url_format_silk / b64_url_both)全部 retcode=1200;record-amr-probe 同传法下 amr 成功,构成载荷格式对照",
"realEnvTest": "verified",
"regressionProbe": { "probe": "record", "case": "b64_plain", "expect": { "retcode": 1200, "messageContains": "Failed to open input" } },
"limitations": [
"素材为 NapCat 自己 get_ai_record 产出并下载的合法 silk v3(magic 03232153494c4b5f5633,即 \\x03#!SILK_V3,0x03 前缀来自 QQ 官方),排除我方构造错误。",
"本项是 MSG-record 的负向对照,用于在回归中区分『silk 仍不支持』与『AMR 路径也坏了』。若本项 retcode 变为 0,说明上游解码链已补齐,需重新评估 MSG-record 的转码要求。"
],
"todo": ["换用具备完整 silk 解码依赖的 NapCat 部署重测。"]
},
{
"id": "MSG-record-transcode",
"name": "语音转码读回 get_record",
"kind": "message-segment",
"api": ["get_record"],
"supports": [],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "blocked",
"parseStatus": "pending",
"automationTest": "record-decoder-probe: 真实 amr 的 file/url/path 三种表达 × out_format=mp3/wav/silk 共 9 组,get_record 成功 0/9",
"realEnvTest": "blocked",
"regressionProbe": { "probe": "recordDecoder", "case": "get_record.file.mp3", "expect": { "retcode": 1200 } },
"limitations": [
"错误原文三类:file 形式 'Failed to open input: Invalid data found when processing input';url/path 形式 'file not found';out_format=silk 时 '转换失败 out_format 字段可能格式不正确'。",
"正向对照不成立:自造合法 WAV(RIFF,8044B)以 base64://、data URI、裸 base64、b64 字段四种内联形式提交,全部 'file not found' → get_record 不接受内联载荷,因此**无法据此区分『缺 ffmpeg』与『只缺 silk/amr 解码器』**,本项只记为环境受阻,不得写成已定性。",
"影响:QLinker 不能依赖 get_record 做语音转码或可读性校验,媒体落库需自行处理 AMR(与 GC-006 的 URL 时效约束叠加,必须现取现转存 MinIO)。"
],
"todo": ["在具备 ffmpeg 的 NapCat 部署上重跑 record-decoder-probe,才能真正区分缺哪个组件。"]
},
{
"id": "MSG-record-via-ai",
"name": "语音消息(官方 TTS 旁路)",
"kind": "message-segment",
"api": ["send_group_ai_record", "get_ai_record"],
"supports": ["group"],
"sendStatus": "no_event",
"eventStatus": "no_event",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "fwd-record-followup: send_group_ai_record -> retcode=0 但 data.message_id=0;history 可回读 record 段",
"realEnvTest": "verified",
"regressionProbe": { "probe": "forwardFollowup", "case": "ai_record_group", "expect": { "retcode": 0 } },
"limitations": [
"这是当前唯一能让语音消息进入群的路径,但 send_group_ai_record 返回 data.message_id=0(假标识),必须靠事件或 history 反查真实 message_id。",
"get_ai_record 会真实发消息(GC-007),高风险。",
"record 段本身不可用(MSG-record)与此不矛盾:TTS 走的是上游另一条上传链路。"
],
"todo": ["send_private_ai_record 未测。"]
},
{
"id": "MSG-reply",
"name": "引用回复段(含嵌套引用)",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_reply_1/g_reply_nested/p_reply -> reply+text",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_reply_nested", "expect": { "retcode": 0, "eventSegs": "reply+text", "historySegs": "reply+text" } },
"limitations": [
"引用嵌套可用:对『本身含 reply 段的消息』再引用,成功。reply.data.id 指向被引用消息的 message_id。",
"上游只给 id,不回推被引用消息的正文与发送者。标准化模型若要展示引用摘要,必须自行按 message_id 反查本地库,且要处理被引用消息不在当前 history 窗口的情况。"
],
"todo": []
},
{
"id": "MSG-forward-write",
"name": "合并转发消息(写出)",
"kind": "message-segment",
"api": ["send_group_msg(node 段)", "send_group_forward_msg", "send_private_forward_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "fwd-record-followup: fwd_group_content_arr -> json 段,news=[雪珂: 数组形-A, 小王: 数组形-B];seg-probe: node_multi -> tsum=3",
"realEnvTest": "verified",
"regressionProbe": { "probe": "forwardFollowup", "case": "fwd_group_content_arr", "expect": { "retcode": 0, "eventSegs": "json", "newsCount": 2 } },
"limitations": [
"node.data.content 必须是【消息段数组】。传 JSON 字符串会被当字面文本渲染(matrix-probe: g_forward_api 的 news 里出现被转义的 {\"type\":\"text\"...} 原文),这是典型静默语义损坏。",
"forward 段的 data.nodes 容器形式无效(tsum=0);必须用并列 node 段或 send_*_forward_msg 的 messages 数组。",
"落库形态是 json 段(app=com.tencent.multimsg),真实节点内容在 meta.detail.news,每项是 '昵称: 内容' 的拼接字符串,非结构化段数组。",
"send_group_msg 里 node 段与 text 段混用会 retcode=1400『转发消息不能和普通消息混在一起发送』(GC-016);纯 node 段数组才 retcode=0。统一发送服务必须前置校验,不得把上游错误原样抛给用户。",
"节点内容不限于 text:image/record/at 节点在段数组形态下均可正常发出并在 QQ 端渲染(fwd-media-node-probe: fwd_media_arr retcode=0,seq=3123)。但『能发出』不等于『能读回』,读回限制见 MSG-forward-read。",
"禁止为了『news 里能取回结构』把 content 改传 JSON.stringify(段数组):该形态虽使 news 保留原始段数组文本(含 CDN url 与 base64),但 QQ 客户端会把整段 JSON 当字面文本显示,对收件人属语义损坏;且 base64 会被整段写入 news 导致单条消息体积膨胀,落库与日志须按不可信大负载处理(大小上限、脱敏、不无条件写日志)。"
],
"todo": []
},
{
"id": "MSG-forward-read",
"name": "合并转发消息(读回)",
"kind": "message-segment",
"api": ["get_forward_msg", "get_msg"],
"supports": [],
"sendStatus": "readback_gap",
"eventStatus": "readback_gap",
"historyStatus": "readback_gap",
"parseStatus": "pending",
"automationTest": "forward-readback-probe 穷举 19 种参数组合 + 对 8 条外层 multimsg 消息逐条重试,全部失败;同时逐条解析 9 条外层消息的 meta.detail.news 判定可还原性。fwd-media-node-probe 追加:对本连接刚发出的 seq=3124/3125 立即调用 get_forward_msg 仍 1200,并用同一批含 image/record/at 的节点做 content 两形态定点对照",
"realEnvTest": "verified",
"regressionProbe": { "probe": "forwardReadback", "case": "outer:outer_mid", "expect": { "retcode": 1200, "messageContains": "无法获取转发消息" } },
"limitations": [
"确定结论:被转发条目【无法结构化还原】。get_forward_msg 存在(缺 message_id 时回 'message_id is required',证明已被路由),但对 history 当场回读到的 8 条外层 multimsg 消息(含本轮几分钟前刚发出、seq=3115/mid=1978018074 的最新一条)逐条调用,全部 retcode=1200 '消息已过期或者为内层消息,无法获取转发消息'。最新鲜的消息同样失败 ⇒ 排除『消息已过期』,属接口能力缺口,不是时序问题。",
"此前 8 组参数全用 mid=497853103,该 id 实为 seq=3090 的【外层】multimsg 消息(不是内层),所以旧结论方向正确但依据有缺陷;本轮已对全部外层 id 与 resid/uniseq/filename/forward_id 组合重测,结论不变。",
"get_forward_msg 不在 docs/NapCat开放接口.md 的 API 清单中(清单只有 send_forward_msg / send_group_forward_msg / send_private_forward_msg),属未文档化的残缺实现。get_group_msg 直接 1404 不支持。",
"⚠️ news[].text 的『可解析性』是发送形态的假象,不是还原能力:9 条外层消息中只有 seq=3101 与私聊 seq=1238 能 JSON.parse 成功,而这两条恰恰是【发送形态用错】的那两条(node.content 传 JSON 字符串,被当字面文本渲染)。能 parse 出来的是我们误发的字面串,不是协议还原的结构。",
"正确发送形态(node.content 传段数组)的 5 条消息,news[].text 全是 '昵称: 纯文本'(如 '雪珂: 数组形-A'、'雪珂: 纯节点一'、'雪珂: 并列节点一'),段类型与嵌套结构在 news 里【已不可逆丢失】。⇒ 依赖 news 还原只能拿到文本摘要,必须按降级摘要对待。",
"【已补齐,原『无实测依据』标记作废】已用正确形态(content 传段数组)+ 非文本节点定点采样:news[].text 依次为『昵称: 文本正文』『昵称: [图片]』『昵称: @昵称+正文』『昵称: [该消息类型暂不支持查看]』。即 image→『[图片]』、record→『[该消息类型暂不支持查看]』、at→『@昵称』,file_id/url 等资源标识【完全丢失】,确认不可还原(不是『只是降级为文本』这种轻描淡写,媒体内容本身在 news 中不存在)。",
"反向形态(content 传 JSON.stringify(段数组))在同一批节点上会把原始段数组文本整段写进 news,段类型/file/CDN url/base64 全部保留。这【不是】协议还原能力、也不是可用的取回路径:该形态下 QQ 客户端把整段 JSON 当字面文本显示,对收件人属语义损坏,QLinker 发送侧禁止采用。它只说明 news 是上游渲染结果的搬运,形态由发送方决定。",
"get_msg 是本项唯一可用的读回接口:对群与私聊的外层转发消息均 retcode=0,返回与 history 同构的完整消息对象(含 message 段数组、real_seq、sender),可拿到 json 段原文。它读回的是外层卡片,仍读不到内层节点。",
"标准化模型对转发段必须保留:json.data.data 原始 JSON 全文、app、view、desc/prompt、extra.filename、extra.tsum、meta.detail.resid、meta.detail.uniseq、meta.detail.source、meta.detail.summary、meta.detail.news 数组原文。不得只存 prompt/summary。resid/uniseq 即使当前无法用于读回也必须保留,供上游修复后重放。",
"⚠️ meta.detail.resid 不是恒定存在:seq=3085/3088 两条 tsum=0 的静默失效消息,detail_keys 实测只有 news/source/summary/uniseq(无 resid)⇒ 该字段必须按可空建模;'缺 resid' 可作为静默失效的辅助判据。",
"落库必须同时记录 forwardNodeFormSuspect 之类的形态标记:news 项是否为段数组字面串,可反推当初是 content:string 还是 content:array,用于识别被当字面文本渲染的静默语义损坏。"
],
"todo": [
"升级 NapCat 后必须重跑 forward-readback-probe.mjs(只读、零副作用);一旦 get_forward_msg 可读回,news 降级问题即可解除。",
"resid/uniseq 的官方语义仍未查明,上游修复后需重测。"
]
},
{
"id": "OP-get-msg",
"name": "单条消息读回",
"kind": "operation",
"api": ["get_msg"],
"supports": ["group", "private"],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "forwardReadback: outer:get_msg -> retcode=0,返回完整消息对象(self_id/user_id/time/message_id/message_seq/real_id/real_seq/message_type/sender/message 段数组)",
"realEnvTest": "verified",
"regressionProbe": { "probe": "forwardReadback", "case": "outer:get_msg", "expect": { "retcode": 0 } },
"limitations": [
"与 get_group_msg_history 相比是不依赖窗口/分页的单条精确读回路径,可用于事件漏采后的定点补偿对账。",
"读不回合并转发的内层节点(见 MSG-forward-read)。",
"get_group_msg 不存在(1404 不支持的API),不得在代码中引用该名字。"
],
"todo": []
},
{
"id": "MSG-file",
"name": "文件段与群文件上传",
"kind": "message-segment",
"api": ["send_group_msg(file 段)", "upload_group_file"],
"supports": ["group"],
"sendStatus": "no_event",
"eventStatus": "no_event",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_upload_file/p_upload_file -> retcode=0 且事件 NO_EVENT;followup 延长观测 20s 仍 0 条事件;history seq=3108 可回读 file 段",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_upload_file", "expect": { "retcode": 0, "eventSegs": "NO_EVENT" } },
"limitations": [
"上传成功但入站事件通道完全无回推(含 upload 类 notice),延长到 20s 仍为 0 条。依赖事件驱动落库的链路会永久漏采文件消息,必须靠 history 主动补拉兜底。",
"upload_group_file 返回 retcode=0 但不返回 file_id。file_id 有两条读回路径:history 的 file 段,或 get_group_root_files(实测 retcode=0,直接给出 file_id/file_name/size/uploader/modify_time,见 GC-011)。后者不受 history 窗口限制,应作为文件补拉与下载的首选。",
"get_group_file_url 用上述 file_id 可换到下载直链(实测 retcode=0,返回 ftn.qq.com 直链);传入不存在的 file_id 时报 'real fileUUID not found!'。",
"history 的 file 段 file_name 字段为 '-',真实文件名在 data.file 与 url 的 fname 参数里。"
],
"todo": ["私聊 upload_file 的事件回推同样缺失,需确认是通道问题还是接口行为。"]
},
{
"id": "MSG-music",
"name": "音乐分享段",
"kind": "message-segment",
"api": ["send_group_msg"],
"supports": ["group"],
"sendStatus": "downgraded",
"eventStatus": "downgraded",
"historyStatus": "downgraded",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_music_url({type,url})-> retcode=0 但段只剩 text;music{type:163,id} -> retcode=1200",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_music_url", "expect": { "retcode": 0, "eventSegs": "text", "historySegs": "text" } },
"limitations": [
"两种不同失败模式,都必须记录:{type:'163',id} 形式被明确拒绝(1200);{type,url} 形式 retcode=0 但整条被降级为纯文本,音乐卡片丢失。",
"降级为 text 属静默语义丢失,标准化模型若按事件段解析会认为这是一条普通文本消息。"
],
"todo": ["未穷举 music 的其它字段组合(如 subtype/content/url 完整三元组),不得宣称音乐分享完全不可用。"]
},
{
"id": "MSG-ark",
"name": "ARK 消息段",
"kind": "message-segment",
"api": ["send_group_msg"],
"supports": [],
"sendStatus": "rejected",
"eventStatus": "rejected",
"historyStatus": "rejected",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_ark -> retcode=1200",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_ark", "expect": { "retcode": 1200, "messageContains": "未知的消息类型" } },
"limitations": ["错误原文 '未知的消息类型:ark' —— 该版本消息段解析器不识别 ark。"],
"todo": []
},
{
"id": "MSG-location",
"name": "位置段",
"kind": "message-segment",
"api": ["send_group_msg"],
"supports": [],
"sendStatus": "silent_drop",
"eventStatus": "silent_drop",
"historyStatus": "silent_drop",
"parseStatus": "pending",
"automationTest": "matrix-probe: g_location -> retcode=0,seq=3103,事件与 history 段均只剩 text(复测两次一致)",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "g_location", "expect": { "retcode": 0, "eventSegs": "text", "historySegs": "text" } },
"limitations": ["静默丢弃,无错误提示。"],
"todo": []
},
{
"id": "MSG-poke",
"name": "戳一戳",
"kind": "message-segment",
"api": ["send_poke", "group_poke", "friend_poke"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "untested",
"parseStatus": "pending",
"automationTest": "seg-probe: poke 消息段被静默丢弃;改用 send_poke 接口成功",
"realEnvTest": "partial",
"regressionProbe": { "probe": "manual", "case": "poke", "expect": { "note": "消息段形态无效,必须走 send_poke 接口" } },
"limitations": [
"poke 作为消息段无效(静默丢弃),必须用独立接口 send_poke/group_poke/friend_poke。",
"history 回读未采(戳一戳是否入 history 未确认)。"
],
"todo": ["补 poke 的 history 回读证据。"]
},
{
"id": "MSG-json",
"name": "JSON 卡片段(json/markdown)",
"kind": "message-segment",
"api": ["send_group_msg", "send_private_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "matrix-probe: p_json -> json+text",
"realEnvTest": "verified",
"regressionProbe": { "probe": "matrix", "case": "p_json", "expect": { "retcode": 0, "eventSegs": "json+text", "historySegs": "json+text" } },
"limitations": ["事件与 history 均给 json 段原文,但卡片是否真正渲染未做客户端目视确认。"],
"todo": []
},
{
"id": "MSG-unknown-seg",
"name": "未知消息段与空消息数组",
"kind": "message-segment",
"api": ["send_group_msg"],
"supports": [],
"sendStatus": "rejected",
"eventStatus": "rejected",
"historyStatus": "rejected",
"parseStatus": "pending",
"automationTest": "seg-probe: 未知段类型与空 message 数组均 retcode=1200,整条失败",
"realEnvTest": "verified",
"regressionProbe": { "probe": "segments", "case": "unknown_type", "expect": { "retcode": 1200 } },
"limitations": ["上游对未知段是整条拒绝而非忽略,发送侧必须自行过滤未知段,否则一条坏段会让整条消息发不出去。"],
"todo": []
},
{
"id": "OP-recall",
"name": "撤回/删除消息",
"kind": "operation",
"api": ["delete_msg"],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "seg-probe: recall_msg -> retcode=1404(接口不存在);delete_msg -> retcode=0,回推 notice/group_recall,history message=[]",
"realEnvTest": "verified",
"regressionProbe": { "probe": "manual", "case": "recall", "expect": { "recall_msg_retcode": 1404, "delete_msg_retcode": 0 } },
"limitations": [
"recall_msg 不存在(1404),必须用 delete_msg。",
"撤回后 history 的 message 变成空数组,且【没有】 is_recall 标记。区分『空消息』与『已撤回』只能靠本地状态机 + notice/group_recall 事件,不得依赖上游标记。"
],
"todo": []
},
{
"id": "EV-lifecycle",
"name": "连接认证确认(lifecycle)",
"kind": "event",
"api": [],
"supports": ["transport"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "所有探测脚本以收到 meta_event/lifecycle 作为认证确认门禁",
"realEnvTest": "verified",
"regressionProbe": { "probe": "any", "case": "lifecycle", "expect": { "required": true } },
"limitations": ["见 GC-008:onopen 不代表认证成功。"],
"todo": []
},
{
"id": "EV-self-sent",
"name": "自发消息回推",
"kind": "event",
"api": [],
"supports": ["group", "private"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "url-media-probe 事件 post_type=message_sent,含 message_sent_type=self 与 target_id",
"realEnvTest": "verified",
"regressionProbe": { "probe": "urlMedia", "case": "g_image_url", "expect": { "postType": "message_sent" } },
"limitations": ["见 GC-003。"],
"todo": []
},
{
"id": "EV-notice",
"name": "群通知类事件(成员增减/管理员变动/群文件/戳一戳通知)",
"kind": "event",
"api": [],
"supports": [],
"sendStatus": "untested",
"eventStatus": "untested",
"historyStatus": "untested",
"parseStatus": "pending",
"automationTest": "未采集",
"realEnvTest": "not_tested",
"regressionProbe": null,
"limitations": ["本轮矩阵事件文件中 notice/request 类事件为 0 条,但原因未定性:可能是无人触发(需真实第二账号操作),也可能是通道不推送。二者不得混为一谈。"],
"todo": [
"需用户在 QQ 端配合的清单(本轮按约定不采集,标记为待验证):群成员加入/退出、群管理员任命/撤销、群文件上传通知(他人上传)、好友申请、群内戳一戳通知、撤回他人消息。",
"群文件通知已单独排除『等待时间不足』:upload_group_file 后连续观测 20s 收到 0 条事件。"
]
},
{
"id": "LINK-forward-ws",
"name": "正向 WebSocket 入站链路",
"kind": "transport",
"api": [],
"supports": ["inbound"],
"sendStatus": "verified",
"eventStatus": "verified",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "本轮全部采样经此链路完成",
"realEnvTest": "verified",
"regressionProbe": { "probe": "any", "case": "connect", "expect": { "required": true } },
"limitations": [
"心跳 status 为嵌套对象 {online,good},间隔 3000ms。",
"2026-11-07:发送已改为同一 WS 连接上的 echo 动作帧(ActionChannel),并由 SendTransportRouter 按 connection_type 分发;仅 get_login_info 动作在实机验证,真实 send_* 发送未执行(用户要求只到 prepare)。",
"动作超时/连接中断一律记为 RESULT_UNKNOWN,禁止自动重试;上游非 0 retcode 记 UPSTREAM_ERROR。",
"2026-11-11 实测真实发送:经 QLinker 统一发送服务(二次确认)对 2161656029 发送一条私聊文本,动作通道同一 WS 返回 status=ok/retcode=0、echo=qlinker-1-1 与请求匹配,data.message_id=451199300;send_operation.status=SUCCEEDED、attempt_count=1,send_attempt.response_summary 保存完整上游响应,随后 message_sent 事件回推并按 OUTBOUND/private/conversation_id=2161656029 落库(message_uid=msg_038a5574bb5e18cd747d5b9a45762418)。get_msg 回读 message_id 一致。结论:正向 WS 动作通道发送与 echo 匹配可用。",
"⚠️ 本轮未触发结果未知路径(UNKNOWN),故『已发出但无响应』的真实语义仍只有代码与单测证据。",
"2026-11-11 编码复测(第一条 snd_epCm6VIugE7W32d7 的乱码已定性):改用 Node fetch 以 UTF-8 JSON 字符串体请求同一 /send/text,正文含中文,结果为——请求体 UTF-8 十六进制、send_operation.message_payload 十六进制、message.raw_summary 十六进制三者逐字节一致;prepare 回显与 NapCat get_msg 回读(message_id=2006466404)中文均正常。HTTP 解码、payload 构造、动作通道均无编码问题。",
"⚠️ 第一条乱码根因 = 验证脚本自身:send-once.ps1 为无 BOM 的 UTF-8 文件,Windows PowerShell 5.1 按系统 ANSI(GBK) 读取脚本,中文在进入 HTTP 前已变成乱码字符(已用本地 sink 复现:无 BOM 脚本体发出 鑴氭湰鏂囦欢…;同一中文在控制台内联字符串或 Node fetch 均正确)。与 QLinker 业务代码无关,无需修复。",
"证据:send_operation/send_attempt/message/raw_event 可按 operation_uid=snd_epCm6VIugE7W32d7(乱码)/ snd_3pMeCuXbJ3sAN69i(正常)或 message_id=451199300 / 2006466404 检索;原始响应为临时文件,未落 local/(任务限定只写本文件)。"
],
"todo": ["HTTP API 发送仍未验证(该实例未开 HTTP Server)。"]
},
{
"id": "LINK-http-server",
"name": "HTTP Server 入站链路",
"kind": "transport",
"api": [],
"supports": [],
"sendStatus": "blocked",
"eventStatus": "blocked",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "未通过",
"realEnvTest": "blocked",
"regressionProbe": null,
"limitations": [
"实测 3000 端口 timeout。受阻不等于不支持。",
"2026-11-07:已实现 http_api 发送适配(独立 http_base_url + Authorization: Bearer,不推导自 WS),但该实例 HTTP 请求返回 426/405(未开 HTTP Server),实机未验证。",
"http_api 仅支持发送;事件接收仍需 HTTP 回调或反向 WS。"
],
"todo": [
"用户已授权临时改 OB11 通道配置 + 自动重启补采(采完必须回滚并逐字段校验一致)。本轮未执行,留待下一轮。",
"开放 HTTP Server 后实机验证 http_api 发送;在此之前不得宣称该类型可用。"
]
},
{
"id": "LINK-http-callback",
"name": "HTTP 回调入站链路",
"kind": "transport",
"api": [],
"supports": [],
"sendStatus": "not_applicable",
"eventStatus": "untested",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "已实现并通过自动化测试(HttpCallbackServiceTests 9 项:鉴权/类型不符/去重/超限/非法 JSON/空体/落库失败语义)",
"realEnvTest": "not_tested",
"regressionProbe": null,
"limitations": [
"⚠️ 状态曾误标 blocked,依据不完整(第 23 章纠正):本链路的 TCP 连接由 NapCat 主动发起,受阻应查路由可达性与开发机自身防火墙入站规则,与 HTTP Server 的端口映射/宿主 DROP 无关。",
"已实测不可达的仅 3 个隧道地址:10.66.0.5(Laptop-WG) / 10.66.0.4(映射地址,本机不持有) / 100.121.146.35(Tailscale)。本机另有 192.168.200.3(以太网) 与 192.168.43.173(WLAN) 两个局域网地址【从未实测】⇒ 不能宣称拓扑受限。",
"NapCat WebUI 的 GetClientIP 返回 10.66.0.4 是映射地址、本机不持有,不能当回调地址使用。",
"改网络配置必须重启 NapCat(约 10-20s),期间存在事件缺口;但只读预检(proxy 探端口 + 本机 sink 监听)不需要改配置也不需要重启。",
"⚠️ 第 24 章实测:本机 Windows 防火墙对 node.exe 在【公用】网络配置下显式【阻止】入站 TCP(专用配置才是允许)。本机以太网 192.168.200.3 与 WLAN 192.168.43.173 的 NetworkCategory 实测均为 Public ⇒ 即便路由可达、sink 正常监听,回调包仍会被本机丢弃。原第 17.3 把失败归因于『NapCat 宿主机防火墙』属归因错对象。",
"⇒ 本链路是双环节未打通:路由可达性未实测(缺 NAPCAT_WEBUI_PASSWORD),本机防火墙已确认会阻止。已定位的一半本地可解,但改本机防火墙入站规则属改变本机安全配置,超出『临时改 NapCat 配置并回滚』的既有授权,需单独确认。",
"2026-11-07:QLinker 侧 HTTP 回调接收端点已实现(POST ${qlinker.napcat.http-callback.path}/{bindingUid},绑定 access token 鉴权、复用 EventIngestService 去重、请求体上限、只有落库成功才返回 200);代码完成但未做真实 NapCat 推送验证,realEnvTest=not_tested。"
],
"todo": [
"真实环境验证前需放行本机入站 TCP(主 HTTP 端口,默认 8080)并允许 /napcat/callback/{bindingUid};受 GC-014 防火墙阻塞,未验证。",
"先做零副作用只读预检:NapCat GET /api/base/proxy 探 192.168.200.3:18080 与 192.168.43.173:18080,按 refused=路由可达 / timeout=无可达路由 区分。需 NAPCAT_WEBUI_PASSWORD。",
"经用户确认后,加一条限定端口+限定远程 IP 的临时入站允许规则(采完即删),再临时写 httpClients 采集,采完 restore 回滚并逐字段校验。",
"备选:走唯一 Private 网络 Tailscale(100.121.146.35),但第 23 章实测 NapCat 侧到该地址不可达,除非拓扑有变。"
]
},
{
"id": "LINK-reverse-ws",
"name": "反向 WebSocket 入站链路",
"kind": "transport",
"api": [],
"supports": [],
"sendStatus": "untested",
"eventStatus": "untested",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "已实现并通过自动化测试(ReverseWebSocketRegistryTests 7 项:握手鉴权/重复连入替换/动作超时/断线降级/未上线拒绝/昵称回填/动作响应不入库)",
"realEnvTest": "not_tested",
"regressionProbe": null,
"limitations": [
"本轮未尝试,无任何结论。",
"⚠️ 不得沿用『与 HTTP Server 同为入站故预期不可达』的推断(第 23 章):本链路 TCP 由 NapCat 主动发起,与 HTTP Server 的端口映射/宿主 DROP 无关,本机局域网地址从未实测。",
"但受第 24 章同一阻塞点约束:本机防火墙在公用网络配置下阻止 node.exe 入站 TCP,反向 WS 同样连的是本机 node 进程,不解决防火墙则配置也收不到连接。",
"2026-11-07:QLinker 侧反向 WS 服务端已实现(WS_UPGRADE 到 ${qlinker.napcat.reverse-ws.path}/{bindingUid},绑定 access token 握手鉴权、同一连接收事件与发动作、同一绑定新连接替换旧连接、断线降级 DISCONNECTED);代码完成但未做真实 NapCat websocketClients 连接验证,realEnvTest=not_tested。"
],
"todo": [
"真实环境验证前需放行本机入站 TCP(主 HTTP 端口,默认 8080)并允许 /napcat/reverse-ws/{bindingUid};受 GC-014 防火墙阻塞,未验证。",
"先按 LINK-http-callback 的零副作用 proxy 预检判定可达性,再授权配置 websocketClients 采集。"
]
},
{
"id": "REL-dedup",
"name": "重复投递来源与去重键",
"kind": "reliability",
"api": [],
"supports": ["inbound"],
"sendStatus": "not_applicable",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "已采集",
"realEnvTest": "verified",
"regressionProbe": {
"probe": "reliability",
"case": "C-summary",
"expect": { "fields": { "total_events": ">=1", "distinct": ">=1", "duplicated": "empty" } }
},
"limitations": [
"实测服务端【按连接扇出】:同一账号同时开两条正向 WS,同一条消息每条连接各收 1 份(C1-fanout,seq=3165 与 seq=3217 两轮复现)。⇒ 重复投递的唯一已知根因是连接泄漏或同 token 多实例,不是上游重发。",
"单连接内未观测到重复:两轮分别 12/12、21/21 事件按 (连接代数, real_seq) 归并后无重复(C-summary)。",
"并发连接数无上限:依次建 6 条正向 WS 全部收到 lifecycle,全部关闭后立即重连亦成功 ⇒ 多实例复用同一 token 会静默互收全量事件,不会报错。",
"快速重连未复现失败:断开后 0/150/500/2000ms 重连各 3 轮共 12 次全部成功。上一轮 R3 的 error + close 1006 属未再现的偶发现象,不得当作已确认的上游行为写入设计。",
"去重键 (bindingUid, group_id, real_seq) 仍【不得定稿】:群内与私聊内 real_seq 各自唯一(122/122、14/14,两轮复现),但本批样本跨会话取值重叠 0 个只是巧合,群号与 QQ 号同为无符号 64 位整数可撞号 ⇒ 键必须含会话标识与会话类型判别式,不能只用 group_id 一列混装群号与 QQ 号。"
],
"todo": [
"在数据库设计中把去重键的会话维度定为「会话类型 + 会话 ID」二元组,并验证私聊双向(对方发送)场景下 user_id 取值语义。",
"QQ 端手动场景(多端同时在线、手机与 NapCat 同账号)下的重复投递仍属待验证。"
]
},
{
"id": "REL-order",
"name": "事件到达顺序与 real_seq 顺序的一致性",
"kind": "reliability",
"api": [],
"supports": ["inbound"],
"sendStatus": "not_applicable",
"eventStatus": "verified",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "已采集",
"realEnvTest": "verified",
"regressionProbe": {
"probe": "reliability",
"case": "A",
"expect": { "fields": { "arrived": ">=1", "duplicate_arrivals": "==0" } }
},
"limitations": [
"实测乱序确实发生:16 条并发发送全部 retcode=0,事件到达顺序出现 3 个逆序对(3198,3199,3200,3201,3203,3202,3205,3204,3206,3207,3208,3210,3209,3211,3212,3213);8 条批次亦出现过 1 个逆序对 ⇒ 两轮独立复现。",
"乱序与 API 响应顺序不同源:并发 API 返回顺序本身即与 real_seq 不同序,事件顺序又与 API 顺序不同序 ⇒ 任何一层都不能推断顺序。",
"⇒ 禁止按事件到达顺序赋本地序号或作为会话内时序依据,必须以 real_seq 排序,且允许短暂乱序到达需要缓冲(乱序窗口本轮观测上限在数百毫秒量级,不得当作保证)。"
],
"todo": ["确认跨发送者并发场景下的乱序幅度,为入库缓冲窗口取值提供依据。"]
},
{
"id": "REL-replay",
"name": "断线期间事件的补推能力",
"kind": "reliability",
"api": [],
"supports": ["inbound"],
"sendStatus": "not_applicable",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "已采集",
"realEnvTest": "verified",
"regressionProbe": {
"probe": "reliability",
"case": "B",
"expect": { "fields": { "history_grew": ">=1", "replayed_after_reconnect": "==0" } }
},
"limitations": [
"实测【无任何补推】:接收连接离线期间发出 3 条,history 侧确认新增 3 条,重连并收到 lifecycle 后 8s 内补推 0 条(两轮复现,replay_seqs 为空)。",
"叠加 GC-015(history 不可翻页、可读起点随窗口滑动)⇒ 断线缺口无法完整回填,事件流实时落库是唯一完整来源,属硬约束而非优化建议。",
"必须显式记录连接离线区间并在恢复后做有限窗口对账 + 缺口告警,不得静默接受缺口。"
],
"todo": [
"测量正向 WS 可读窗口实际保留时长,用于确定断线后可对账的最大时间跨度。",
"NapCat 进程重启场景下的事件缺口尚未采集(用户已授权自动重启,本轮未执行)。"
]
},
{
"id": "REL-id-consistency",
"name": "同一消息在事件与 history 中标识的一致性",
"kind": "reliability",
"api": [],
"supports": ["inbound"],
"sendStatus": "not_applicable",
"eventStatus": "verified",
"historyStatus": "verified",
"parseStatus": "pending",
"automationTest": "已采集",
"realEnvTest": "verified",
"regressionProbe": {
"probe": "reliability",
"case": "D",
"expect": { "fields": { "comparable": ">=1", "seq_mismatch": "==0" } }
},
"limitations": [
"可比对 21 条中 real_seq 数值不一致 0 条 ⇒ 两侧指向同一消息时 real_seq 值可作等值关联。",
"⚠️ 类型不保证一致:上游原始类型为 event:string / history:string / message_id:number ⇒ 边界层必须显式统一类型后再入库,否则等值比较与唯一索引都会失效(GC-010)。",
"message_id == message_seq == real_id,为随机大整数且不递增,不可用作排序键。"
],
"todo": ["补齐私聊场景与通知类事件的标识类型普查(本轮仅覆盖群/私聊 message 事件)。"]
},
{
"id": "CONTACT-friends-with-category",
"name": "好友列表(含 QQ 分组)get_friends_with_category",
"kind": "api",
"api": ["get_friends_with_category"],
"supports": ["contact"],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "ContactSyncService 解析与 upsert 已由联系人同步单元测试覆盖;动作成功但结构不可解析时降级 get_friend_list 并标记 PARTIAL。",
"realEnvTest": "verified",
"limitations": [
"只读能力:仅用于联系人同步,不产生 QQ 侧副作用。",
"离线、上游错误、结果未知或结构不可解析时不使用返回值,且不得标记联系人缺失或清空既有数据。",
"enums.parseStatus 当前只有 pending 文案,本项沿用 pending 以免破坏离线门禁;实际解析代码与单测已完成,待真实环境验证后仍需按版本补充证据。",
"2026-11-11 实测(NapCat 4.18.41,正向 WS,QQ 3575608514):返回 7 个分组,分组字段为 categoryId(number)/categorySortId(number)/categoryName(string)/categoryMbCount(number)/onlineCount(number)/buddyList(array);buddyList 项字段与 get_friend_list 完全一致(user_id/nickname/remark/category_id/sex/age/level/phone_num/email/birthday_*)。",
"⚠️ 不一致:分组人数真实键名为 categoryMbCount,ContactSyncService.parseFriendsWithCategory 读取 memberCount/member_count ⇒ 本实例 contact_group.member_count 7 条全为 NULL,联系人中心分组条目的人数显示为「—」(ContactsView.vue 仅在有值时展示「N 人」)。",
"证据:本轮实测原始响应为临时文件,未落 local/(本次任务限定只允许写本文件);按 send/DB 记录无法回溯,重跑可用 tools/probe 同类脚本复现。"
],
"todo": ["修复分组人数解析(改读 categoryMbCount 并保留 memberCount 兼容),修复后回归真实环境;补充分组为空、同一好友属于多个分组的真实结构用例。"]
},
{
"id": "CONTACT-friend-list",
"name": "好友列表 get_friend_list",
"kind": "api",
"api": ["get_friend_list"],
"supports": ["contact"],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "ContactSyncService 解析与 upsert 已由联系人同步单元测试覆盖;作为 get_friends_with_category 不可用时的降级来源。",
"realEnvTest": "verified",
"limitations": [
"只读能力:降级调用时无法取得 QQ 分组,联系人既有 group_uid 必须保留而不是被空值覆盖。",
"仅当返回 ACCEPTED 且解析为完整数组时才允许把未出现的联系人标记为 REMOVED_BY_PEER。",
"2026-11-11 实测:返回 19 条,字段 user_id(number)/nickname(string)/remark(string)/category_id(number)/sex(string)/age(number)/level(number)/phone_num(string)/email(string)/birthday_year|month|day(number),均存在且非 null;remark 可能为空字符串(空白→解析为 null)。",
"2026-11-11 实测:无分页参数、一次返回全量;空好友列表与超大规模(>100)未验证。",
"⚠️ 语义风险:解析对 remark/card 空白值返回 null,upsert 侧用 COALESCE 保留旧值 ⇒ QQ 侧删除备注后本地 qq_remark 不会被清空。"
],
"todo": ["验证空好友列表与大量好友(>100)的返回形态;确认备注被清空时应同步为空的语义。"]
},
{
"id": "CONTACT-group-list",
"name": "群列表 get_group_list",
"kind": "api",
"api": ["get_group_list"],
"supports": ["contact"],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "ContactSyncService 解析与 upsert 已由联系人同步单元测试覆盖;完整列表才标记群为 DISMISSED。",
"realEnvTest": "verified",
"limitations": [
"只读能力:失败或结果未知时不标记缺失、不清空既有群名与成员数。",
"群成员列表按需单独同步(GROUP_MEMBERS),不会自动级联。",
"2026-11-11 实测:返回 12 条,字段 group_id(number)/group_name(string)/member_count(number)/max_member_count(number)/group_remark(string)/group_all_shut(number),均存在且非 null;示例 group_id=955875231、member_count=43、max_member_count=200。",
"2026-11-11 实测:无分页参数、一次返回全量;group_remark/group_all_shut 当前未被 ContactSyncService 使用。"
],
"todo": ["验证空群列表(0 个群)返回形态;确认是否需要展示群备注(group_remark)。"]
},
{
"id": "CONTACT-group-member-list",
"name": "群成员列表 get_group_member_list",
"kind": "api",
"api": ["get_group_member_list"],
"supports": ["contact"],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "ContactSyncService 解析、成员 upsert 与 LEFT 标记已由联系人同步单元测试覆盖。",
"realEnvTest": "verified",
"limitations": [
"只读能力:需要指定群号;不提供全量群成员自动跟踪。",
"完整列表才标记未出现成员 LEFT;失败或结果未知不改变既有成员状态。",
"2026-11-11 实测:group_id=955875231 返回 43 条,等于 get_group_list 的 member_count,说明该规模下无截断;字段 group_id/user_id(number)、nickname/card/sex/area/role/title(string)、age/qq_level/join_time/last_sent_time/title_expire_time/shut_up_timestamp(number)、level(string)、unfriendly/card_changeable/is_robot(boolean),均存在且非 null,card 可能为空字符串。",
"⚠️ 语义风险:对未加入/不存在的群(如 123456789)返回 retcode=0 且 data=[],ContactSyncService.syncMembers 会把空数组当作完整列表并调用 markMembersMissing(seen 为空时不加 NOT IN 条件)⇒ 该群既有 ACTIVE 成员会被全部置为 LEFT,且任务记为成功。缺 group_id 时返回 retcode=1400(Schema compilation error: Expected required property)。",
"证据:本轮实测为临时响应文件,未落 local/(任务限定只写本文件);数据库侧可用 contact_group_membership 现状复核。"
],
"todo": ["大群(成员数接近或超过 200)是否分页/截断未验证;修复空数组误判(区分『非群成员』与『群内确实无人』,如以 get_group_list 是否包含该群为前置条件)。"]
},
{
"id": "CONTACT-stranger-info",
"name": "陌生人/非好友资料 get_stranger_info",
"kind": "api",
"api": ["get_stranger_info"],
"supports": ["contact"],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "无自动化测试:QLinker 当前代码未调用该动作。",
"realEnvTest": "not_tested",
"limitations": [
"只读能力:用于按 QQ 号查询非好友/陌生人资料,不产生 QQ 侧副作用。",
"⚠️ 此前能力目录漏登记,本项为补登记(2026-11-11),不代表已适配或已实测;QLinker 侧无解析、无调用点。",
"归属联系人中心资料补全场景,需先确认是否引入(可能涉及隐私与调用频控),再补真实环境结构采集。"
],
"todo": ["确认是否用于联系人/会话资料补全;若启用,补真实环境字段结构、频控与隐私边界验证。"]
},
{
"id": "CONTACT-group-info",
"name": "群资料 get_group_info",
"kind": "api",
"api": ["get_group_info"],
"supports": ["contact"],
"sendStatus": "not_applicable",
"eventStatus": "not_applicable",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "无自动化测试:QLinker 联系人同步使用 get_group_list 全量列表,未调用单群 get_group_info。",
"realEnvTest": "not_tested",
"limitations": [
"只读能力:按群号查询单个群资料,用于补全群名/人数等展示字段。",
"⚠️ 此前能力目录漏登记,本项为补登记(2026-11-11),不代表已适配或已实测;QLinker 侧无解析、无调用点。",
"未加入/不存在的群返回形态未采集,需与 get_group_member_list 的空数组语义一并验证后再决定是否用于缺失群判定。"
],
"todo": ["采集单群查询的真实响应结构与未加入群的返回形态;确认是否用于群资料增量补全。"]
}
]
}