Files
QLinker/docs/capability-baseline.json
T
xiaowang b6401116cb 采样第 25 章:纠正 history 窗口误判,补齐私聊 record 与转发节点形态
推翻本轮前一结论:history 单次返回条数不存在「私聊 10 / 群 46」的接口
硬上限。count 实际生效,语义为 min(count, 该会话可读总量);此前把「可读
总量恰好等于返回条数」误判为上限,补发消息后私聊由 10 条增至 14 条即证伪。
单次返回上限至今未测到,对 count 设上限的理由须改为「防止响应过大」。

分页结论维持但证据加强:start_id/end_id/message_id/msg_id 在窗口边界与
窗口中部两种取值下均返回同一页,12 个候选参数名穷举无效,连续翻页推进 0 页。
固化为 GC-015:history 只是本地滑动窗口,事件流实时落库是唯一完整来源。

补齐私聊 record 独立取证(base64://AMR 与新鲜 CDN 直链均三证据通过,本地
路径 1200),MSG-record 的 supports 扩为 group+private。

新增关键约束:node.content 传段数组时 news 降级为「[图片]」
「[该消息类型暂不支持查看]」等占位串、资源标识完全丢失;传 JSON 字符串时
段结构全保留但客户端按字面文本渲染,属语义损坏,发送侧禁止采用。
另记 GC-016(node 段不得与其他段混发,retcode=1400)、
GC-017(占位串禁止当用户正文入库)。

get_forward_msg 对本连接刚发出的 seq=3124/3125 立即调用仍 1200,
排除「消息已过期」的替代解释。

新增 6 个探针(默认 dry-run,写操作需 --yes),修正
history-page-alias-probe 与 seg-census 中会误导复跑的过期定性,
env-local.md 对应条目就地标注作废并给出更正结论。

门禁 capability-check:30 项能力,结构校验 0 错误 0 警告,PASS。

未执行:NAPCAT_WEBUI_PASSWORD 相关路由预检;HTTP 回调与反向 WS 的
NapCat 真实入站采集(按用户决定跳过本机防火墙改动);QQ 端 6 项手动
验证项仍全部待人工;REL-dedup 的重复投递/乱序/断线补推仍未采到。
2026-10-29 17:59:09 +08:00

759 lines
52 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/decision-baseline.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"
}
},
"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) 仍待验证。",
"evidence": ["docs/decision-baseline.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/decision-baseline.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/decision-baseline.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/decision-baseline.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/decision-baseline.md#24"]
},
{
"id": "GC-015",
"title": "history 只能读回 NapCat 本地的一段滑动窗口且【不可翻页】,事件流实时落库是唯一完整来源",
"detail": "实测 count 语义为『返回该会话最近的 min(count, 可读总量) 条』:群 count=10/20/30 精确返回 10/20/30,私聊 count=5/10/13/14 精确返回 5/10/13/14,超过可读总量后不再增长(群 50 条 seq=3076..3125、私聊 14 条 seq=1231..1244),不传 count 时默认 20 条,messages 为升序数组。⚠️ 前一轮『私聊硬上限 10 条 / 群 46 条』的结论错误并已作废:当时把『可读总量恰好等于返回条数』误判为接口上限,补发消息后私聊条数即由 10 增至 14,直接证伪,故单次返回条数上限本轮未测到。翻页方面,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",
"docs/decision-baseline.md#25"
]
},
{
"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/decision-baseline.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/decision-baseline.md#25"]
}
],
"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/NapcatOpenAPI.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。"],
"todo": []
},
{
"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。受阻不等于不支持。"],
"todo": ["用户已授权临时改 OB11 通道配置 + 自动重启补采(采完必须回滚并逐字段校验一致)。本轮未执行,留待下一轮。"]
},
{
"id": "LINK-http-callback",
"name": "HTTP 回调入站链路",
"kind": "transport",
"api": [],
"supports": [],
"sendStatus": "untested",
"eventStatus": "untested",
"historyStatus": "not_applicable",
"parseStatus": "pending",
"automationTest": "未通过",
"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 配置并回滚』的既有授权,需单独确认。"
],
"todo": [
"先做零副作用只读预检: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": "未尝试",
"realEnvTest": "not_tested",
"regressionProbe": null,
"limitations": [
"本轮未尝试,无任何结论。",
"⚠️ 不得沿用『与 HTTP Server 同为入站故预期不可达』的推断(第 23 章):本链路 TCP 由 NapCat 主动发起,与 HTTP Server 的端口映射/宿主 DROP 无关,本机局域网地址从未实测。",
"但受第 24 章同一阻塞点约束:本机防火墙在公用网络配置下阻止 node.exe 入站 TCP,反向 WS 同样连的是本机 node 进程,不解决防火墙则配置也收不到连接。"
],
"todo": ["先按 LINK-http-callback 的零副作用 proxy 预检判定可达性,再授权配置 websocketClients 采集。"]
},
{
"id": "REL-dedup",
"name": "重复投递 / 断线重连补推 / 乱序",
"kind": "reliability",
"api": [],
"supports": [],
"sendStatus": "untested",
"eventStatus": "untested",
"historyStatus": "untested",
"parseStatus": "pending",
"automationTest": "未采集",
"realEnvTest": "not_tested",
"regressionProbe": null,
"limitations": [
"去重键候选 (bindingUid, group_id, real_seq) 仍待验证,不得写入设计为已确认。",
"观测工具已就绪:tools/probe/event-listener.mjs 记录 ws_open/ws_close/reconnect_scheduled 与 conn 序号。"
],
"todo": ["用户已授权自动重启 NapCat 采集断线重连补推、重复投递与乱序。本轮未执行,属下一轮任务。"]
}
]
}