From 3d2ef1b5b928383521c517e22fe7f742eaa7742b Mon Sep 17 00:00:00 2001 From: Vegetable <3089665724@qq.com> Date: Tue, 24 Nov 2026 20:58:11 +0800 Subject: [PATCH 1/7] feat(onebot): close N4 text transport evidence gaps - audit issue #15 blockers: D8 wrapper identity replaces the general UID resolver, core derives the durable projection from the wrapper envelope, and the historical Crashpad path stays research-only - add forward WS auth/path/role/arbitrary-echo and reverse WS reconnect protocol regressions on real loopback sockets - add deterministic stalled-writer isolation and HTTP POST failure tests; bounded queue loss is now counted and logged for each transport - record acceptance evidence, update the OneBot entry guide, and move feat-006 from blocked to in-progress with the remaining field gate --- crates/caligo-core/src/daemon.rs | 8 + crates/caligo-core/src/onebot_transport.rs | 358 +++++++++++++++++- docs/README.md | 1 + .../2026-11-24-feat-006-text-mvp.md | 106 ++++++ docs/guides/onebot-app-entries.md | 18 +- feature_list.json | 10 +- progress.md | 2 + session-handoff.md | 2 + 8 files changed, 496 insertions(+), 9 deletions(-) create mode 100644 docs/acceptance/2026-11-24-feat-006-text-mvp.md diff --git a/crates/caligo-core/src/daemon.rs b/crates/caligo-core/src/daemon.rs index 51056c24..aa0035d7 100644 --- a/crates/caligo-core/src/daemon.rs +++ b/crates/caligo-core/src/daemon.rs @@ -649,6 +649,14 @@ impl Daemon { self.onebot_events.lock().unwrap().subscriber_dropped(id) } + /// Same observation for the HTTP POST transport's independent queue. + pub fn onebot_http_post_event_subscriber_dropped(&self, id: u64) -> Option { + self.onebot_http_post_events + .lock() + .unwrap() + .subscriber_dropped(id) + } + pub(crate) fn publish_onebot_event_json(&self, event_json: &str) { if self.onebot_http_post_ordered.load(Ordering::Relaxed) { let _ = self diff --git a/crates/caligo-core/src/onebot_transport.rs b/crates/caligo-core/src/onebot_transport.rs index 413ca22e..3be7b243 100644 --- a/crates/caligo-core/src/onebot_transport.rs +++ b/crates/caligo-core/src/onebot_transport.rs @@ -71,6 +71,7 @@ fn run_http_post_inner( let handler = action_handler(Arc::clone(&daemon)); let stop = daemon.stop_flag(); let mut delivered = 0usize; + let mut failed = 0usize; while !stop.load(Ordering::Relaxed) { match events.recv_timeout(Duration::from_millis(100)) { Ok(event) => { @@ -80,7 +81,10 @@ fn run_http_post_inner( delivered += 1; } Ok(None) => delivered += 1, - Err(_) => eprintln!("[onebot] HTTP POST event delivery failed"), + Err(_) => { + failed += 1; + eprintln!("[onebot] HTTP POST event delivery failed"); + } } // OneBot V11 specifies POST handling before forwarding the // same event to connected forward/reverse WebSocket clients. @@ -90,7 +94,15 @@ fn run_http_post_inner( Err(RecvTimeoutError::Disconnected) => break, } } + let dropped = daemon + .onebot_http_post_event_subscriber_dropped(subscription) + .unwrap_or(0); daemon.unsubscribe_onebot_http_post_events(subscription); + if failed > 0 || dropped > 0 { + eprintln!( + "[onebot] HTTP POST transport stopped with loss: delivered={delivered} failed={failed} dropped={dropped}" + ); + } delivered } @@ -380,7 +392,7 @@ fn serve_forward_connection(stream: TcpStream, daemon: Arc, token: Optio let _ = stream.set_read_timeout(Some(WS_READ_POLL)); let _ = stream.set_write_timeout(Some(WS_WRITE_TIMEOUT)); let handler = action_handler(Arc::clone(&daemon)); - let _ = serve_ws_socket( + let outcome = serve_ws_socket( &mut socket, role, events.as_ref(), @@ -388,6 +400,18 @@ fn serve_forward_connection(stream: TcpStream, daemon: Arc, token: Optio daemon.stop_flag(), ); if let Some(subscription) = subscription { + let dropped = daemon + .onebot_event_subscriber_dropped(subscription) + .unwrap_or(0); + match outcome { + Err(error) => eprintln!( + "[onebot] forward WebSocket disconnected ({role:?}): {error}; dropped events={dropped}" + ), + Ok(()) if dropped > 0 => eprintln!( + "[onebot] forward WebSocket closed with queue loss ({role:?}): dropped events={dropped}" + ), + Ok(()) => {} + } daemon.unsubscribe_onebot_events(subscription); } } @@ -467,13 +491,21 @@ pub fn run_reverse_ws(daemon: Arc, config: ReverseWsConfig) -> usize { Ok(mut socket) => { connected += 1; set_reverse_timeouts(socket.get_mut()); - let _ = serve_ws_socket( + let outcome = serve_ws_socket( &mut socket, WsRole::Universal, Some(&events), &handler, Arc::clone(&stop), ); + if let Err(error) = outcome { + let dropped = daemon + .onebot_event_subscriber_dropped(subscription) + .unwrap_or(0); + eprintln!( + "[onebot] reverse WebSocket delivery failed: {error}; dropped events={dropped}; reconnecting" + ); + } } Err(_) => eprintln!("[onebot] reverse WebSocket connection failed"), } @@ -841,4 +873,324 @@ mod tests { execute_http_quick_operation(&handler, event, serde_json::json!({"reply":"hello"})); assert!(captured.lock().unwrap().is_none(), "at_sender defaults true for group events and unsupported mention replies must not be sent as plain text"); } + + /// Deterministic T17 stand-in for a stalled network client. Windows + /// loopback absorbs real socket backpressure (see the SSE lab record), so + /// the "slow client" is a transport writer that blocks after accepting the + /// first frame. The publish path must stay non-blocking and the loss must + /// stay observable instead of being silently retried. + struct BlockingWriter { + release: std::sync::mpsc::Receiver<()>, + blocked_once: bool, + } + + impl Read for BlockingWriter { + fn read(&mut self, _buffer: &mut [u8]) -> Result { + Err(std::io::Error::new( + std::io::ErrorKind::WouldBlock, + "no inbound application data", + )) + } + } + + impl Write for BlockingWriter { + fn write(&mut self, buffer: &[u8]) -> Result { + if !self.blocked_once { + self.blocked_once = true; + let _ = self.release.recv(); + } + Ok(buffer.len()) + } + + fn flush(&mut self) -> Result<(), std::io::Error> { + Ok(()) + } + } + + #[test] + fn stalled_websocket_writer_does_not_block_publish_and_drop_count_is_visible() { + use crate::onebot_events::SUBSCRIBER_QUEUE_CAP; + + let daemon = test_daemon("slow-ws"); + let (subscription, events) = daemon.subscribe_onebot_events("slow-ws"); + let (release_tx, release_rx) = std::sync::mpsc::channel::<()>(); + let mut socket = WebSocket::from_raw_socket( + BlockingWriter { + release: release_rx, + blocked_once: false, + }, + tungstenite::protocol::Role::Server, + None, + ); + let worker_daemon = Arc::clone(&daemon); + let worker_stop = daemon.stop_flag(); + let worker = thread::spawn(move || { + let handler = action_handler(worker_daemon); + serve_ws_socket( + &mut socket, + WsRole::Event, + Some(&events), + &handler, + worker_stop, + ) + }); + + let started = std::time::Instant::now(); + for index in 0..(SUBSCRIBER_QUEUE_CAP * 2) { + daemon.publish_onebot_ws_event_json(&format!(r#"{{"seq":{index}}}"#)); + } + assert!( + started.elapsed() < Duration::from_secs(2), + "a stalled transport writer must not block the fanout" + ); + let dropped = daemon + .onebot_event_subscriber_dropped(subscription) + .expect("subscription is still registered while the writer is stalled"); + assert!( + dropped > 0, + "queue overflow behind a stalled writer must be counted" + ); + + release_tx.send(()).unwrap(); + // Let the released writer drain one bounded batch before shutdown. + thread::sleep(Duration::from_millis(50)); + daemon.stop_flag().store(true, Ordering::Relaxed); + assert!(worker.join().unwrap().is_ok()); + } + + #[test] + fn http_post_failure_still_forwards_the_event_and_reports_loss() { + let daemon = test_daemon("post-failure"); + let listener = TcpListener::bind("127.0.0.1:0").unwrap(); + let address = listener.local_addr().unwrap(); + let receiver = thread::spawn(move || { + let (stream, _) = listener.accept().unwrap(); + let mut reader = BufReader::new(stream); + let mut content_length = 0usize; + loop { + let mut line = String::new(); + reader.read_line(&mut line).unwrap(); + if line == "\r\n" || line.is_empty() { + break; + } + if let Some((key, value)) = line.split_once(':') { + if key.eq_ignore_ascii_case("content-length") { + content_length = value.trim().parse().unwrap(); + } + } + } + let mut body = vec![0; content_length]; + std::io::Read::read_exact(&mut reader, &mut body).unwrap(); + let mut stream = reader.into_inner(); + stream + .write_all( + b"HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\nConnection: close\r\n\r\n", + ) + .unwrap(); + }); + let (ready_tx, ready_rx) = std::sync::mpsc::sync_channel(0); + let worker_daemon = Arc::clone(&daemon); + let worker = thread::spawn(move || { + run_http_post_ready( + worker_daemon, + HttpPostConfig { + url: format!("http://{address}/events"), + secret: None, + timeout: Duration::from_millis(500), + }, + ready_tx, + ) + }); + ready_rx.recv_timeout(Duration::from_secs(2)).unwrap(); + let (_subscription, ws_events) = daemon.subscribe_onebot_events("post-failure-ws"); + let event = r#"{"self_id":10001,"post_type":"message","message_id":21}"#; + daemon.publish_onebot_event_json(event); + assert_eq!( + ws_events.recv_timeout(Duration::from_secs(2)).unwrap(), + event, + "a failed POST must not suppress the same event for WebSocket clients" + ); + daemon.stop_flag().store(true, Ordering::Relaxed); + receiver.join().unwrap(); + assert_eq!(worker.join().unwrap(), 0, "failed POST is not a delivery"); + } + + fn ws_request(url: &str, token: Option<&str>) -> tungstenite::handshake::client::Request { + let mut request = url.into_client_request().unwrap(); + if let Some(token) = token { + request + .headers_mut() + .insert("authorization", format!("Bearer {token}").parse().unwrap()); + } + request + } + + /// Assert that a control-plane client receives no frame within a short + /// bounded wait; a timed-out read is tungstenite's no-message state. + fn expect_no_message(socket: &mut WebSocket>) { + if let tungstenite::stream::MaybeTlsStream::Plain(stream) = socket.get_mut() { + stream + .set_read_timeout(Some(Duration::from_millis(250))) + .unwrap(); + } + let result = socket.read(); + assert!( + matches!(&result, Err(WsError::Io(error)) if matches!( + error.kind(), + std::io::ErrorKind::WouldBlock | std::io::ErrorKind::TimedOut + )), + "role must not receive this frame: {result:?}" + ); + if let tungstenite::stream::MaybeTlsStream::Plain(stream) = socket.get_mut() { + stream.set_read_timeout(None).unwrap(); + } + } + + #[test] + fn forward_websocket_enforces_auth_paths_roles_and_echo() { + let daemon = test_daemon("forward-matrix"); + let listener = crate::onebot_server::bind_loopback("127.0.0.1:0").unwrap(); + let address = listener.local_addr().unwrap(); + let server_daemon = Arc::clone(&daemon); + let server = + thread::spawn(move || serve_forward_ws(server_daemon, listener, Some("token".into()))); + + // Unauthorized and unknown paths fail before a session exists. + match tungstenite::connect(ws_request(&format!("ws://{address}/"), Some("wrong"))) { + Err(WsError::Http(response)) => assert_eq!(response.status().as_u16(), 401), + other => panic!("expected 401 handshake rejection, got {other:?}"), + } + match tungstenite::connect(ws_request(&format!("ws://{address}/nope"), Some("token"))) { + Err(WsError::Http(response)) => assert_eq!(response.status().as_u16(), 404), + other => panic!("expected 404 handshake rejection, got {other:?}"), + } + + // /api: shared action layer with opaque echo, never events. + let (mut api, _) = + tungstenite::connect(ws_request(&format!("ws://{address}/api"), Some("token"))) + .unwrap(); + api.send(Message::Text( + r#"{"action":"get_version_info","params":{},"echo":{"id":7,"nested":{"a":[1,2]}}}"# + .into(), + )) + .unwrap(); + let response: Value = + serde_json::from_str(api.read().unwrap().into_text().unwrap().as_str()).unwrap(); + assert_eq!(response["status"], "ok"); + assert_eq!(response["retcode"], 0); + assert_eq!(response["data"]["protocol_version"], "v11"); + assert_eq!( + response["echo"], + serde_json::json!({"id":7,"nested":{"a":[1,2]}}) + ); + daemon.publish_onebot_event_json(r#"{"post_type":"message","message_id":31}"#); + expect_no_message(&mut api); + + // /event: events only; an action frame earns no reply. + let (mut event, _) = + tungstenite::connect(ws_request(&format!("ws://{address}/event"), Some("token"))) + .unwrap(); + daemon.publish_onebot_event_json(r#"{"post_type":"message","message_id":32}"#); + assert_eq!( + serde_json::from_str::(event.read().unwrap().into_text().unwrap().as_str()) + .unwrap()["message_id"], + 32 + ); + event + .send(Message::Text( + r#"{"action":"get_version_info","params":{},"echo":1}"#.into(), + )) + .unwrap(); + expect_no_message(&mut event); + + // /: Universal carries both directions. + let (mut universal, _) = + tungstenite::connect(ws_request(&format!("ws://{address}/"), Some("token"))).unwrap(); + universal + .send(Message::Text( + r#"{"action":"get_version_info","params":{},"echo":"universal"}"#.into(), + )) + .unwrap(); + let reply: Value = + serde_json::from_str(universal.read().unwrap().into_text().unwrap().as_str()).unwrap(); + assert_eq!(reply["echo"], "universal"); + daemon.publish_onebot_event_json(r#"{"post_type":"message","message_id":33}"#); + assert_eq!( + serde_json::from_str::(universal.read().unwrap().into_text().unwrap().as_str()) + .unwrap()["message_id"], + 33 + ); + + let _ = api.close(None); + let _ = event.close(None); + let _ = universal.close(None); + daemon.stop_flag().store(true, Ordering::Relaxed); + assert!(server.join().unwrap() >= 3); + } + + #[test] + fn reverse_websocket_reconnects_after_application_close_and_delivers_again() { + let daemon = test_daemon("reverse-reconnect"); + let listener = TcpListener::bind("127.0.0.1:0").unwrap(); + let address = listener.local_addr().unwrap(); + let server_daemon = Arc::clone(&daemon); + let server = thread::spawn(move || { + for attempt in 0..2 { + let (stream, _) = listener.accept().unwrap(); + let mut socket = + tungstenite::accept_hdr(stream, |request: &Request, response: Response| { + assert_eq!(request.headers()["x-self-id"], "10001"); + assert_eq!(request.headers()["x-client-role"], "Universal"); + assert_eq!(request.headers()["authorization"], "Bearer app-token"); + assert_eq!(request.headers()["user-agent"], "OneBot/11 Caligo"); + Ok(response) + }) + .unwrap(); + socket + .send(Message::Text( + format!( + r#"{{"action":"get_version_info","params":{{}},"echo":"conn-{attempt}"}}"# + ) + .into(), + )) + .unwrap(); + let reply: Value = + serde_json::from_str(socket.read().unwrap().into_text().unwrap().as_str()) + .unwrap(); + assert_eq!(reply["status"], "ok"); + assert_eq!(reply["echo"], format!("conn-{attempt}")); + server_daemon.publish_onebot_event_json(&format!( + r#"{{"post_type":"message","message_id":{}}}"#, + 40 + attempt + )); + let event: Value = + serde_json::from_str(socket.read().unwrap().into_text().unwrap().as_str()) + .unwrap(); + assert_eq!(event["message_id"], 40 + attempt); + if attempt == 0 { + // Application-side graceful close must be retried, not + // treated as a permanent transport failure. + let _ = socket.close(None); + } + } + server_daemon.stop_flag().store(true, Ordering::Relaxed); + }); + let client_daemon = Arc::clone(&daemon); + let client = thread::spawn(move || { + run_reverse_ws( + client_daemon, + ReverseWsConfig { + url: format!("ws://{address}/reverse"), + access_token: Some("app-token".into()), + self_id: 10001, + reconnect_interval: Duration::from_millis(100), + }, + ) + }); + server.join().unwrap(); + assert!( + client.join().unwrap() >= 2, + "reverse client must reconnect after the application closes the socket" + ); + } } diff --git a/docs/README.md b/docs/README.md index c0f22293..a45e8329 100644 --- a/docs/README.md +++ b/docs/README.md @@ -65,6 +65,7 @@ - 发送实验合同:[send-probe-design](research/qq-native-send-probe-design.md)。 - feat-004 后续观测判定:[回调线程与停止观测合同](acceptance/2026-11-15-feat-004-observation.md)。 - feat-005 当前范围:[正式/历史路线判定与剩余证据](acceptance/2026-11-21-feat-005-scope.md);历史原生 MSF/G3 路线为研究资产,不作正式链路完成门。 +- feat-006 文本 MVP:[阻塞点判定、传输协议与慢连接证据](acceptance/2026-11-24-feat-006-text-mvp.md);真实外部应用与现场慢连接仍待验收。 - 响应消费者历史起点:[response-consumer-scope](research/response-consumer-scope.md)。 “实现未开始”等旧结论以 N 台账后续接线记录补充;scope 原文保留。 - 详细样本与负结果:从 P/N 执行台账进入对应 `evidence/`,按样本定位, diff --git a/docs/acceptance/2026-11-24-feat-006-text-mvp.md b/docs/acceptance/2026-11-24-feat-006-text-mvp.md new file mode 100644 index 00000000..108ce4d3 --- /dev/null +++ b/docs/acceptance/2026-11-24-feat-006-text-mvp.md @@ -0,0 +1,106 @@ +# feat-006 N4 文本 MVP:阻塞点判定与传输证据(2026-11-24) + +本文判定 issue #15 列出的三个阻塞点在当前 `main` 是否仍阻塞 feat-006,并补上可在离线完成的 +传输协议与慢连接证据。**本文不是现场准入,也不是 feat-006 完成声明**;本轮没有启动或操作 QQ。 +固定构建、现场样本与边界仍以 [progress](../../progress.md#current-state) 和各执行台账为准。 + +## 1. 三个阻塞点的当前判定 + +issue #15 的“当前状态”写于 SnowCat 正式链路接线之前,三个阻塞点均已由后续实现或证据取代。 +逐项判定如下;判定不改变历史 unknown 的原始含义。 + +| issue #15 阻塞点 | 当前事实 | 是否仍阻塞 feat-006 | +|---|---|---| +| 通用 UIN↔UID 映射、resolver 未取得结果 | 正式文本收发不经过 `ProfileService`/`GroupService` resolver。D8 wrapper 记录直接携带并校验 `sender_uin`/`peer_uin`,core 用该字段生成 OneBot `user_id`/`peer_id`;通用 resolver 仍是 research-only 研究资产 | 否 | +| Crashpad AV(PID 48980/48768/8976) | 三份 dump 属旧 V8 uid-map 探针路径;正式文本链路使用 wrapper listener/D8,不走该探针。历史根因仍未闭合,保留为研究 unknown,未重放、未热卸载 | 否(研究未知保留) | +| 真实 `daemon_client` projection 仍为 None | wire 上仍显式为 `None`,但同一条 payload 携带 `wrapper_message`;core 在受理时由 wrapper 记录派生持久投影(`insert_wrapper_event`/`wrapper_message_projection`),再分配 OneBot ID 并 fanout | 否 | + +### 1.1 身份来源(对应第 1、3 行) + +正式接收链路的身份不是从 CPB/response UID 猜出来的,也不是 resolver 映射的: + +- bridge 只发送已通过 `WrapperMessageEnvelope::validate` 且绑定匹配的 wrapper 记录,wire 投影字段保持 + `None`([daemon_client.rs](../../crates/caligo-bridge/src/daemon_client.rs) 的 `event_payload`)。 +- core 用 wrapper 记录的 `peer_uin`/`sender_uin`/`msg_id`/`msg_time` 建立持久身份与 + OneBot 兼容投影([message_store.rs](../../crates/caligo-core/src/message_store.rs) 的 + `insert_wrapper_event`、`projection_for_event`),再由 + [daemon.rs](../../crates/caligo-core/src/daemon.rs) 的 `publish_onebot_message` 生成标准事件。 +- 离线回归 `wrapper_message_chain::d8_owned_records_reach_journal_and_only_current_incoming_messages_fan_out` + 同时断言三件事:`event_payload` 的 `onebot_projection` 为 `None`、`get_msg` 能按持久 ID 读回同一正文、 + 两个 SSE/WS 订阅者收到同一份带 `self_id`/`user_id`/`time`/`font` 的标准事件。 +- 现场侧,2026-11-14 的私聊与登记群文本样本已经用同一链路取得 SSE、持久账本和 HTTP `get_msg`, + `get_msg` 的消息 ID、类型、发送者与正文和事件一致;双账号 LoginInfo 的账号/昵称与独立资料卡一致。 + 见[登记测试群回读](../execution/2026-11-13-snowcat-capability-integration-continued.md#2026-11-14-登记测试群现场-http-回读通过)、 + [普通文本入站修复](../execution/2026-11-13-snowcat-capability-integration-continued.md#2026-11-14-普通文本入站现场与空提及字段适配) + 与[双账号 LoginInfo](../execution/2026-11-13-snowcat-capability-integration-continued.md#2026-11-14-新代次双账号-logininfo-现场)。 + +因此“身份与持久 OneBot ID 查询一致”在指定固定构建样本上已有现场证据;本文不把它外推到任意 +QQ 版本、任意账号或 CPB/native 响应身份。 + +### 1.2 Crashpad 的适用边界(对应第 2 行) + +三份 dump 的调用栈都包含旧 research uid-map/V8 探针的 bridge 帧,和正式文本链路不是同一代码路径。 +`feature_list.json` 的 feat-006 历史 evidence 已记录该结论;事故入口见 +[K4 incident register](../research/k4-incident-register.md)。该未知不因本文、也不因正式链路样本而关闭: +不重放崩溃进程、不热卸载已映射 bridge、不把旧 dump 当已修复。 + +## 2. 完成条件对照 + +| 完成条件 | 现有证据 | 仍缺 | +|---|---|---| +| 身份与持久 OneBot ID 查询一致 | §1.1 的离线链回归与 2026-11-14 私聊/群文本 `get_msg`、双账号 LoginInfo | 更多账号/版本样本;换号与重连身份由 feat-005 的 R2/R3 跟踪 | +| 目标 HTTP/WS transport 有标准协议测试 | §3 的 HTTP 解析/鉴权、HTTP POST 签名与顺序、正向 WS 路径/角色/鉴权/echo、反向 WS 头/重连,均在本轮或既有回归中 | 与真实第三方 OneBot 应用(NoneBot/Koishi 等)的互通 | +| 真实应用普通文本收发、`get_msg` 及慢连接有同链证据 | 真实 QQ 的私聊/群文本收发、SSE、账本、`get_msg` 已有样本;慢连接有确定性 transport 证据(§3.2) | **真实外部应用**未接入;真实 TCP 背压样本仍不可复现(见 §3.2 边界) | + +## 3. 本轮补充的传输证据 + +### 3.1 协议矩阵 + +新增于 [onebot_transport.rs](../../crates/caligo-core/src/onebot_transport.rs) 的单元测试(真实回环 socket): + +- `forward_websocket_enforces_auth_paths_roles_and_echo`:错误 token 握手 401、未知路径 404; + `/api` 只返回动作响应且不接收事件;`/event` 只推事件且不回复动作;`/` 双向; + `echo` 为任意 JSON(对象/嵌套数组)时原样返回;`get_version_info` 的 `protocol_version=v11`。 +- `reverse_websocket_reconnects_after_application_close_and_delivers_again`:两次连接的 + `X-Self-ID`/`X-Client-Role: Universal`/Bearer/User-Agent 头均匹配;应用侧正常 close 后客户端按间隔重连, + 第二连接的动作 echo 与事件继续可用。 +- 既有回归继续覆盖 HMAC-SHA1 签名与 204、POST→WS 的顺序、快速回复只走共享动作层、 + 非法路径/角色不复制动作逻辑。 + +### 3.2 慢连接与丢失可见性 + +- `stalled_websocket_writer_does_not_block_publish_and_drop_count_is_visible`:用一个首帧即阻塞的 + transport writer 替代真实慢客户端,向有界队列发布 512 条事件。发布路径保持非阻塞 + (断言小于 2 秒),该订阅者的丢弃计数大于 0;释放 writer 后可正常停止。这补的是 + “写端阻塞时 fanout 不被拖住、丢失被计数”的确定性合同。 +- `http_post_failure_still_forwards_the_event_and_reports_loss`:POST 端返回 500 时, + 事件仍向 WS 订阅者 fanout,worker 的 `delivered` 不把失败计为成功。 +- 运行期可观测性:正向/反向 WS 断开或关闭时输出 `dropped events=N`;HTTP POST 停止时若有 + 失败或队列丢失,输出 `delivered/failed/dropped`。计数来自每个 transport 独立的 + `EventBus::subscriber_dropped`,不消费事件,也不阻塞 native 事件受理路径。 +- 边界:Windows loopback 会吸收真实 socket 背压(2026-11-13 SSE 实验记录:32 MiB 与 4 KiB + socket buffer 尝试都未在期限内制造溢出),因此本轮**不**把“真实 TCP 慢客户端”记为已通过。 + 真实慢客户端与第三方应用的现场矩阵仍需单独准入。 + +## 4. 剩余现场最小包 + +以下步骤需要新鲜指定 QQ、真实 OneBot 应用和用户授权;未执行前 feat-006 保持 `blocked`: + +1. 按[原生研究指南](../guides/native-research.md)重新准入一个新的 QQ 主根,核对 PID/创建时间、 + 固定 manifest、已加载模块 hash、PE/backend 与唯一 Environment,接入前无 Caligo bridge。 +2. 用真实 OneBot V11 应用分别经 HTTP(含 POST)与正向/反向 WS 收到一条对端私聊/群文本, + 并调用一次 `get_msg` 与一次发送;核对同一消息的 request/native/event/store 链。 +3. 慢连接矩阵:应用停止读取或断开 WS,确认其他 transport 仍可用、丢失计数/断开日志可读, + 恢复后不重发 unknown 请求。 +4. 停止与清理按现有合同执行;任何 unknown 不重发、不热卸载,原始材料只进 ignored + `local-evidence/`。 + +## 5. 状态 + +本轮只新增传输协议/慢连接回归与可观测日志,没有 QQ 现场动作,也没有提升 feat-006 状态。 +issue #15 的三个阻塞点已由当前实现和现场文本样本取代;剩余完成门是“真实外部应用 + 慢连接” +的现场证据。feat-006 与产品状态保持不变,历史 Crashpad 根因仍为研究 unknown。 + +本轮验证:`cargo test -p caligo-core --lib onebot_transport` 10/10;`init.ps1 -Mode all` PASS +(docs 15 live docs / 690 local links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。 +QQ 现场验收另行进行。 diff --git a/docs/guides/onebot-app-entries.md b/docs/guides/onebot-app-entries.md index 613a5931..f162f4c0 100644 --- a/docs/guides/onebot-app-entries.md +++ b/docs/guides/onebot-app-entries.md @@ -22,8 +22,24 @@ handler 分派和工具发现;注册元数据不证明 native backend 已就 读写标签不替代鉴权。只有强回执和持久 OneBot ID 同时具备才返回标准发送成功。 超时、unknown 与未支持保持原有结果,客户端不能自动重发未知请求。 -## SSE +## HTTP、HTTP POST 与 WebSocket + +`caligod` 的 OneBot 入口共用同一动作层:HTTP `POST /` 为同步动作;可选 HTTP POST 事件推送使用 +`X-Self-ID` 与可选 HMAC-SHA1 `X-Signature`;正向 WS 提供 `/api`(仅动作)、`/event`(仅事件)与 +`/`(双向),握手接受 `Authorization: Bearer ` 或 `?access_token=`;反向 WS 作为 Universal +客户端携带 `X-Self-ID`、`X-Client-Role: Universal` 与可选 Bearer,按配置间隔重连。 + +每个事件订阅者(每个 WS 连接、HTTP POST worker、SSE)各有一条有界队列;队列满时丢弃并计数, +不阻塞 native 事件受理线程。慢写端达到写超时后该连接被关闭,日志记录 `dropped events`; +HTTP POST 停止时若发生失败或丢失,日志记录 `delivered/failed/dropped`。事件不提供重放游标, +断线重连只接收后续事件;需要历史消息时用 `get_msg`。 +协议回归在 [onebot_transport.rs](../../crates/caligo-core/src/onebot_transport.rs) 与 +[onebot_http_lab.rs](../../crates/caligo-core/tests/onebot_http_lab.rs);慢连接只做确定性 +transport 证据,真实 TCP 背压与第三方应用互通属现场验收,见 +[feat-006 证据](../acceptance/2026-11-24-feat-006-text-mvp.md#32-慢连接与丢失可见性)。 + +## SSE `GET /_events` 返回 `text/event-stream`,事件为 `data: \n\n`, 复用 HTTP POST quick operation 之后的 general/WS fanout。 每个客户端独立有界队列;队列丢失时断开,并在统计中记录 overflow/dropped。 diff --git a/feature_list.json b/feature_list.json index a211cbd7..4058764c 100644 --- a/feature_list.json +++ b/feature_list.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/walkinglabs/learn-harness-engineering/main/skills/harness-creator/templates/feature-list.schema.json", - "updated": "2026-11-15", + "updated": "2026-11-24", "baseline_commit": "0f5b483", "active_feature": null, "status_basis": "产品 status 反映完成门,implemented/wired/lab/field 分开描述。历史执行台账是证据,状态更新不能替代现场验收。", @@ -95,12 +95,12 @@ { "id": "feat-006", "name": "N4 OneBot V11 文本 MVP", - "description": "动作解析、事件转换、HTTP/HTTP POST/正向与反向 WS transports 已共用动作层并完成离线合同;真实下游互通与 native 投影待验收。", + "description": "动作解析、事件转换、HTTP/HTTP POST/正向与反向 WS transports 已共用动作层并完成离线合同;身份由 D8 wrapper 记录派生,真实外部应用互通与现场慢连接待验收。", "plan_steps": ["N4"], "dependencies": ["feat-005"], - "status": "blocked", - "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending.", - "evidence_paths": ["crates/caligo-bridge/tests/query_revocation.rs", "docs/acceptance/2026-11-14-session-revocation.md", "docs/plans/2026-10-11-gitnexus-plan-caligo-n4-response-recovery.md", "docs/execution/2026-10-11-n4-response-recovery.md", "docs/execution/2026-11-13-snowcat-capability-integration-continued.md", "crates/caligo-core/tests/onebot_http_lab.rs", "crates/caligo-core/tests/daemon_chain.rs", "crates/caligo-core/tests/recovery_contract.rs", "crates/caligo-core/src/commands/daemon.rs", "crates/caligo-core/src/onebot_server.rs", "crates/caligo-core/src/onebot_transport.rs", "crates/caligo-core/src/onebot_events.rs", "crates/caligo-core/src/daemon.rs", "crates/caligo-core/src/runtime.rs", "crates/caligo-core/src/onebot.rs", "crates/caligo-model/src/capability.rs", "crates/caligo-bridge/src/qq_entry.rs", "crates/caligo-bridge/src/qq_v8.rs", "crates/caligo-bridge/tests/fixtures/scoped-self-profile-contract.cjs", "crates/caligo-core/tests/onebot_query_lab.rs", "crates/caligo-core/tests/daemon_client_lab.rs", "crates/caligo-core/src/onebot_http.rs", "crates/caligo-core/src/message_store.rs", "docs/plans/2026-10-09-gitnexus-plan-caligo-snowluma-capability-parity.md"], + "status": "in-progress", + "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending. 2026-11-24 issue #15 blocker audit: the general UIN/UID resolver, the historical Crashpad path and the explicit wire projection=None are no longer text-MVP blockers. D8 wrapper records carry validated sender/peer UINs and core derives the durable OneBot projection from the wrapper envelope; wrapper_message_chain asserts wire projection=None while get_msg and standard events expose the same identity. The three Crashpad dumps belong to the old research V8 uid-map probe path and remain an unresolved research unknown. New offline transport regressions cover forward WS auth/path/role/arbitrary echo, reverse WS reconnect after application close, a stalled transport writer that cannot block fanout and reports queue loss, and HTTP POST failure that still fans the event out to WS; transport disconnect/loss logs were added. Real third-party OneBot applications and a field slow-client matrix are still pending, so feat-006 stays open and is tracked as in-progress. Details: docs/acceptance/2026-11-24-feat-006-text-mvp.md.", + "evidence_paths": ["crates/caligo-bridge/tests/query_revocation.rs", "docs/acceptance/2026-11-14-session-revocation.md", "docs/acceptance/2026-11-24-feat-006-text-mvp.md", "docs/plans/2026-10-11-gitnexus-plan-caligo-n4-response-recovery.md", "docs/execution/2026-10-11-n4-response-recovery.md", "docs/execution/2026-11-13-snowcat-capability-integration-continued.md", "crates/caligo-core/tests/onebot_http_lab.rs", "crates/caligo-core/tests/daemon_chain.rs", "crates/caligo-core/tests/recovery_contract.rs", "crates/caligo-core/src/commands/daemon.rs", "crates/caligo-core/src/onebot_server.rs", "crates/caligo-core/src/onebot_transport.rs", "crates/caligo-core/src/onebot_events.rs", "crates/caligo-core/src/daemon.rs", "crates/caligo-core/src/runtime.rs", "crates/caligo-core/src/onebot.rs", "crates/caligo-model/src/capability.rs", "crates/caligo-bridge/src/qq_entry.rs", "crates/caligo-bridge/src/qq_v8.rs", "crates/caligo-bridge/tests/fixtures/scoped-self-profile-contract.cjs", "crates/caligo-core/tests/onebot_query_lab.rs", "crates/caligo-core/tests/daemon_client_lab.rs", "crates/caligo-core/src/onebot_http.rs", "crates/caligo-core/src/message_store.rs", "docs/plans/2026-10-09-gitnexus-plan-caligo-snowluma-capability-parity.md"], "done_criteria": ["身份与持久 OneBot ID 查询一致", "目标 HTTP/WS transport 有标准协议测试", "真实应用普通文本收发/get_msg 及慢连接有同链证据"] }, { diff --git a/progress.md b/progress.md index 54a9c1ac..9e324fe4 100644 --- a/progress.md +++ b/progress.md @@ -2,6 +2,8 @@ ## Current State +2026-11-24 feat-006 文本 MVP 解阻(issue #15):逐项核对 issue 列出的三个阻塞点,确认均不再是正式文本链路阻塞。D8 wrapper 记录直接携带并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 回归同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 uid-map 探针路径,保留为研究 unknown。离线补强传输证据:正向 WS 鉴权/路径/角色/任意 JSON echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍向 WS fanout;运行期新增 transport 断开/丢失日志与 HTTP POST 停止统计。`onebot_transport` 定向 10/10,`init.ps1 -Mode all` PASS(docs 15 live docs / 690 links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 由 blocked 调整为 in-progress,产品状态不变。[证据与剩余最小现场包](docs/acceptance/2026-11-24-feat-006-text-mvp.md) + 2026-11-24 feat-005 缺口转 issue:生产链路已打通,R2(网络撤权现场)与 R3(身份切换现场)按项目决定暂不补齐,转 issue #13/#14 跟踪;feat-006–feat-010 拆为 issue #15–#19,避免 PR #12 过大。本 PR 保持已交付范围。 2026-11-24 feat-005 R3 跨进程新代次现场(部分):`21844`(创建 `2026-11-24T11:33:24.5363966Z`)preflight PASS,以显式 `session_generation=2` 完成一次 attach(观察者、self 查询、1000 ms 观察停止通过、零发送);新 journal 只含 gen2 事件,旧 gen1 journal(SHA-256 `87B4E8A9…D6D6A`)未变、native ID 无交集。另一账号实例 `20304` 因多登录标记被 preflight 拒绝,无法形成第二个可 attach 主根;“旧身份失效”仍只由旧实例停止 + 新代次绑定间接体现,R3 不宣称通过。现场包 `feat005-r3-rebind-20261124-unbound/`(清单 `74190B92…CE31`)。 [研究记录](docs/research/2026-11-21-login-network-notification-surface.md#620-r3-跨进程现场显式新代次与账本隔离2026-11-24) diff --git a/session-handoff.md b/session-handoff.md index 0b884428..8e4700ab 100644 --- a/session-handoff.md +++ b/session-handoff.md @@ -1,5 +1,7 @@ # Session handoff +2026-11-24 feat-006 文本 MVP 解阻(issue #15):以 `origin/main` `acc4fb7` 为基线新建 `codex/feat-006-text-mvp`(未推送)。判定 issue 三个阻塞点已被当前正式链路取代:D8 wrapper 记录直接提供并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 探针路径,保留为 unknown。补离线传输证据与丢失日志:正向 WS 鉴权/路径/角色/任意 echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍 fanout。`onebot_transport` 10/10,core 全仓全绿;真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 保持 in-progress。下一步按 [acceptance §4](docs/acceptance/2026-11-24-feat-006-text-mvp.md#4-剩余现场最小包) 需要新鲜指定 QQ、真实 OneBot 应用和单次授权;未取得前不启动 QQ、不重发、不热卸载。改动文件:`crates/caligo-core/src/onebot_transport.rs`、`crates/caligo-core/src/daemon.rs`、`docs/acceptance/2026-11-24-feat-006-text-mvp.md`、`docs/guides/onebot-app-entries.md`、`docs/README.md`、`progress.md`、`feature_list.json`、`session-handoff.md`。 + 2026-11-24 feat-005 缺口转 issue:生产链路已打通,R2(网络撤权现场)与 R3(身份切换现场)按项目决定暂不补齐,转 issue #13/#14 跟踪;feat-006–feat-010 拆为 issue #15–#19,避免 PR #12 过大。本 PR 保持已交付范围。 2026-11-24 feat-005 R3 跨进程新代次现场(部分):`21844`(创建 `2026-11-24T11:33:24.5363966Z`)preflight PASS,以显式 `session_generation=2` 完成一次 attach(观察者、self 查询、1000 ms 观察停止通过、零发送);新 journal 只含 gen2 事件,旧 gen1 journal(SHA-256 `87B4E8A9…D6D6A`)未变、native ID 无交集。另一账号实例 `20304` 因多登录标记被 preflight 拒绝,无法形成第二个可 attach 主根;“旧身份失效”仍只由旧实例停止 + 新代次绑定间接体现,R3 不宣称通过。现场包 `feat005-r3-rebind-20261124-unbound/`(清单 `74190B92…CE31`)。 [研究记录](docs/research/2026-11-21-login-network-notification-surface.md#620-r3-跨进程现场显式新代次与账本隔离2026-11-24) From cfc916866fada9d558ab1c72777c52513f0f3346 Mon Sep 17 00:00:00 2001 From: Vegetable <3089665724@qq.com> Date: Tue, 24 Nov 2026 21:00:57 +0800 Subject: [PATCH 2/7] docs(feat-006): record post-refresh GitNexus impact review --- docs/acceptance/2026-11-24-feat-006-text-mvp.md | 13 ++++++++++++- progress.md | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/acceptance/2026-11-24-feat-006-text-mvp.md b/docs/acceptance/2026-11-24-feat-006-text-mvp.md index 108ce4d3..7f71ad45 100644 --- a/docs/acceptance/2026-11-24-feat-006-text-mvp.md +++ b/docs/acceptance/2026-11-24-feat-006-text-mvp.md @@ -95,7 +95,18 @@ QQ 版本、任意账号或 CPB/native 响应身份。 4. 停止与清理按现有合同执行;任何 unknown 不重发、不热卸载,原始材料只进 ignored `local-evidence/`。 -## 5. 状态 +## 5. 代码图分析(GitNexus) + +首次 `detect-changes --scope compare --base-ref origin/main` 跑在落后 168 个提交的旧索引上,返回 +low / 0 flows,不能作为影响面结论。刷新索引(`analyze --index-only`,9,044 nodes)后复跑: +8 files / 34 symbols / 14 affected processes / **high**;列出的流程都以新增测试函数为根 +(例如 `Forward_websocket_enforces_auth_paths_roles_and_echo → Acquire_slot`)。 +`impact serve_ws_socket --direction upstream` 报 **CRITICAL**,direct callers 为两个 production 调用点与 +一个测试调用点;实际改动只是记录 `serve_ws_socket` 的返回结果、读取订阅者丢弃计数并写一行日志, +不改变动作分派、事件字节、队列上限或停止语义。高风险标注按图轴保留,不视为可忽略,也不据此宣称 +无运行时影响。 + +## 6. 状态 本轮只新增传输协议/慢连接回归与可观测日志,没有 QQ 现场动作,也没有提升 feat-006 状态。 issue #15 的三个阻塞点已由当前实现和现场文本样本取代;剩余完成门是“真实外部应用 + 慢连接” diff --git a/progress.md b/progress.md index 9e324fe4..b2cc568c 100644 --- a/progress.md +++ b/progress.md @@ -2,7 +2,7 @@ ## Current State -2026-11-24 feat-006 文本 MVP 解阻(issue #15):逐项核对 issue 列出的三个阻塞点,确认均不再是正式文本链路阻塞。D8 wrapper 记录直接携带并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 回归同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 uid-map 探针路径,保留为研究 unknown。离线补强传输证据:正向 WS 鉴权/路径/角色/任意 JSON echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍向 WS fanout;运行期新增 transport 断开/丢失日志与 HTTP POST 停止统计。`onebot_transport` 定向 10/10,`init.ps1 -Mode all` PASS(docs 15 live docs / 690 links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 由 blocked 调整为 in-progress,产品状态不变。[证据与剩余最小现场包](docs/acceptance/2026-11-24-feat-006-text-mvp.md) +2026-11-24 feat-006 文本 MVP 解阻(issue #15):逐项核对 issue 列出的三个阻塞点,确认均不再是正式文本链路阻塞。D8 wrapper 记录直接携带并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 回归同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 uid-map 探针路径,保留为研究 unknown。离线补强传输证据:正向 WS 鉴权/路径/角色/任意 JSON echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍向 WS fanout;运行期新增 transport 断开/丢失日志与 HTTP POST 停止统计。`onebot_transport` 定向 10/10,`init.ps1 -Mode all` PASS(docs 15 live docs / 690 links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。GitNexus 刷新索引后 `detect-changes` 为 8 files / 34 symbols / 14 flows / high(流程均以新增测试函数为根),`impact serve_ws_socket` 为 CRITICAL、3 个 direct caller 已逐个核对;实际改动不涉及分派/事件字节/停止语义。真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 由 blocked 调整为 in-progress,产品状态不变。[证据与剩余最小现场包](docs/acceptance/2026-11-24-feat-006-text-mvp.md) 2026-11-24 feat-005 缺口转 issue:生产链路已打通,R2(网络撤权现场)与 R3(身份切换现场)按项目决定暂不补齐,转 issue #13/#14 跟踪;feat-006–feat-010 拆为 issue #15–#19,避免 PR #12 过大。本 PR 保持已交付范围。 From 109140e4dbb86d8692e758e0d0e75f04c814dfc3 Mon Sep 17 00:00:00 2001 From: Vegetable <3089665724@qq.com> Date: Tue, 24 Nov 2026 21:30:25 +0800 Subject: [PATCH 3/7] docs(feat-006): record the rehearsed field pack --- .../2026-11-24-feat-006-text-mvp.md | 21 ++++++++++++++++++- feature_list.json | 2 +- progress.md | 2 ++ session-handoff.md | 4 +++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/acceptance/2026-11-24-feat-006-text-mvp.md b/docs/acceptance/2026-11-24-feat-006-text-mvp.md index 7f71ad45..2cb8311f 100644 --- a/docs/acceptance/2026-11-24-feat-006-text-mvp.md +++ b/docs/acceptance/2026-11-24-feat-006-text-mvp.md @@ -106,7 +106,26 @@ low / 0 flows,不能作为影响面结论。刷新索引(`analyze --index-on 不改变动作分派、事件字节、队列上限或停止语义。高风险标注按图轴保留,不视为可忽略,也不据此宣称 无运行时影响。 -## 6. 状态 +## 7. 现场包准备(未绑定,2026-11-24) + +本机 ignored `local-evidence/feat006-field-20261124-unbound/` 已准备现场包:preflight +(固定 manifest/三个模块 hash/PE backend/唯一 Environment/端口唯一)、`caligo.exe daemon` +四类 listener(HTTP、正向 WS、HTTP POST、反向 WS)、`cli qq-entry` 单次接入、NoneBot2 +2.5.0 + nonebot-adapter-onebot 2.4.6 应用(反向 WS 收事件、HTTP API 发送与 `get_msg`、 +每个入站 marker 只回复一次)、标准 HTTP POST 接收器(HMAC-SHA1 校验与慢应答开关)、 +正向 WS 记录器、非读取 WS 客户端、控制管道正常停止与 `qq-entry-stop`。 + +离线排练(`preflight.ps1 -Rehearse` + `run-field.py --rehearse`)通过:daemon 与四类 +listener 启动、NoneBot 反向 WS 连接并成功调用 `get_version_info`、正向 WS 动作与事件握手、 +HTTP POST HMAC 204、无 bridge 时 `get_login_info` 诚实失败、控制管道正常停止。打包清单 +aggregate SHA-256 为 `d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef3090598694` +(13 个文件,见包内 `pack-manifest.json`)。 + +排练不是现场证据。现场仍需:新鲜指定 QQ 的 PID/创建时间、操作者授权(每个入站 marker +恰一次回复)、对端 B 发送私聊与登记群 marker,以及慢阶段 marker。未执行前 feat-006 +完成条件 #3 保持未闭合。 + +## 8. 状态 本轮只新增传输协议/慢连接回归与可观测日志,没有 QQ 现场动作,也没有提升 feat-006 状态。 issue #15 的三个阻塞点已由当前实现和现场文本样本取代;剩余完成门是“真实外部应用 + 慢连接” diff --git a/feature_list.json b/feature_list.json index 4058764c..b7cd76b1 100644 --- a/feature_list.json +++ b/feature_list.json @@ -99,7 +99,7 @@ "plan_steps": ["N4"], "dependencies": ["feat-005"], "status": "in-progress", - "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending. 2026-11-24 issue #15 blocker audit: the general UIN/UID resolver, the historical Crashpad path and the explicit wire projection=None are no longer text-MVP blockers. D8 wrapper records carry validated sender/peer UINs and core derives the durable OneBot projection from the wrapper envelope; wrapper_message_chain asserts wire projection=None while get_msg and standard events expose the same identity. The three Crashpad dumps belong to the old research V8 uid-map probe path and remain an unresolved research unknown. New offline transport regressions cover forward WS auth/path/role/arbitrary echo, reverse WS reconnect after application close, a stalled transport writer that cannot block fanout and reports queue loss, and HTTP POST failure that still fans the event out to WS; transport disconnect/loss logs were added. Real third-party OneBot applications and a field slow-client matrix are still pending, so feat-006 stays open and is tracked as in-progress. Details: docs/acceptance/2026-11-24-feat-006-text-mvp.md.", + "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending. 2026-11-24 issue #15 blocker audit: the general UIN/UID resolver, the historical Crashpad path and the explicit wire projection=None are no longer text-MVP blockers. D8 wrapper records carry validated sender/peer UINs and core derives the durable OneBot projection from the wrapper envelope; wrapper_message_chain asserts wire projection=None while get_msg and standard events expose the same identity. The three Crashpad dumps belong to the old research V8 uid-map probe path and remain an unresolved research unknown. New offline transport regressions cover forward WS auth/path/role/arbitrary echo, reverse WS reconnect after application close, a stalled transport writer that cannot block fanout and reports queue loss, and HTTP POST failure that still fans the event out to WS; transport disconnect/loss logs were added. Real third-party OneBot applications and a field slow-client matrix are still pending, so feat-006 stays open and is tracked as in-progress. Details: docs/acceptance/2026-11-24-feat-006-text-mvp.md. 2026-11-24 field pack prepared offline in ignored local-evidence/feat006-field-20261124-unbound: preflight, standalone daemon with HTTP/forward-WS/HTTP-POST/reverse-WS, single qq-entry attach, real NoneBot2 2.5.0 app, HMAC POST receiver with slow mode, forward-WS logger, non-reading WS client, control-pipe stop and owner stop. Rehearsal passed (four listeners, reverse WS get_version_info, forward WS action, POST 204 signature, honest LoginInfo without bridge, graceful stop); pack aggregate d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef3090598694. It stays unbound/unauthorized/unexecuted pending a fresh designated QQ; no field claim.", "evidence_paths": ["crates/caligo-bridge/tests/query_revocation.rs", "docs/acceptance/2026-11-14-session-revocation.md", "docs/acceptance/2026-11-24-feat-006-text-mvp.md", "docs/plans/2026-10-11-gitnexus-plan-caligo-n4-response-recovery.md", "docs/execution/2026-10-11-n4-response-recovery.md", "docs/execution/2026-11-13-snowcat-capability-integration-continued.md", "crates/caligo-core/tests/onebot_http_lab.rs", "crates/caligo-core/tests/daemon_chain.rs", "crates/caligo-core/tests/recovery_contract.rs", "crates/caligo-core/src/commands/daemon.rs", "crates/caligo-core/src/onebot_server.rs", "crates/caligo-core/src/onebot_transport.rs", "crates/caligo-core/src/onebot_events.rs", "crates/caligo-core/src/daemon.rs", "crates/caligo-core/src/runtime.rs", "crates/caligo-core/src/onebot.rs", "crates/caligo-model/src/capability.rs", "crates/caligo-bridge/src/qq_entry.rs", "crates/caligo-bridge/src/qq_v8.rs", "crates/caligo-bridge/tests/fixtures/scoped-self-profile-contract.cjs", "crates/caligo-core/tests/onebot_query_lab.rs", "crates/caligo-core/tests/daemon_client_lab.rs", "crates/caligo-core/src/onebot_http.rs", "crates/caligo-core/src/message_store.rs", "docs/plans/2026-10-09-gitnexus-plan-caligo-snowluma-capability-parity.md"], "done_criteria": ["身份与持久 OneBot ID 查询一致", "目标 HTTP/WS transport 有标准协议测试", "真实应用普通文本收发/get_msg 及慢连接有同链证据"] }, diff --git a/progress.md b/progress.md index b2cc568c..0046fd23 100644 --- a/progress.md +++ b/progress.md @@ -2,6 +2,8 @@ ## Current State +2026-11-24 feat-006 现场包准备(离线,issue #15):本机 ignored `local-evidence/feat006-field-20261124-unbound/` 已准备未绑定现场包——preflight(固定 manifest/模块/PE/Environment/端口唯一)、`caligo.exe daemon` 四类 listener、`cli qq-entry` 单次接入、NoneBot2 2.5.0 应用(反向 WS 收事件、HTTP 发送/`get_msg`、每个入站 marker 恰一次回复)、标准 HTTP POST 接收器(HMAC + 慢应答)、正向 WS 记录器、非读取 WS 客户端、控制管道正常停止与 owner stop。离线排练通过:四类 listener、NoneBot 反向 WS 与 `get_version_info`、正向 WS 动作、POST HMAC 204、无 bridge 时 LoginInfo 诚实失败、控制停止;打包清单 aggregate `d95f22b0…598694`(13 文件)。现场仍需新鲜指定 QQ 的 PID/创建时间、操作者单次回复授权与 B 的两条入站 marker,未执行前不构成现场证据。[准备记录](docs/acceptance/2026-11-24-feat-006-text-mvp.md#7-现场包准备未绑定2026-11-24) + 2026-11-24 feat-006 文本 MVP 解阻(issue #15):逐项核对 issue 列出的三个阻塞点,确认均不再是正式文本链路阻塞。D8 wrapper 记录直接携带并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 回归同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 uid-map 探针路径,保留为研究 unknown。离线补强传输证据:正向 WS 鉴权/路径/角色/任意 JSON echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍向 WS fanout;运行期新增 transport 断开/丢失日志与 HTTP POST 停止统计。`onebot_transport` 定向 10/10,`init.ps1 -Mode all` PASS(docs 15 live docs / 690 links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。GitNexus 刷新索引后 `detect-changes` 为 8 files / 34 symbols / 14 flows / high(流程均以新增测试函数为根),`impact serve_ws_socket` 为 CRITICAL、3 个 direct caller 已逐个核对;实际改动不涉及分派/事件字节/停止语义。真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 由 blocked 调整为 in-progress,产品状态不变。[证据与剩余最小现场包](docs/acceptance/2026-11-24-feat-006-text-mvp.md) 2026-11-24 feat-005 缺口转 issue:生产链路已打通,R2(网络撤权现场)与 R3(身份切换现场)按项目决定暂不补齐,转 issue #13/#14 跟踪;feat-006–feat-010 拆为 issue #15–#19,避免 PR #12 过大。本 PR 保持已交付范围。 diff --git a/session-handoff.md b/session-handoff.md index 8e4700ab..18f4f1fc 100644 --- a/session-handoff.md +++ b/session-handoff.md @@ -1,6 +1,8 @@ # Session handoff -2026-11-24 feat-006 文本 MVP 解阻(issue #15):以 `origin/main` `acc4fb7` 为基线新建 `codex/feat-006-text-mvp`(未推送)。判定 issue 三个阻塞点已被当前正式链路取代:D8 wrapper 记录直接提供并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 探针路径,保留为 unknown。补离线传输证据与丢失日志:正向 WS 鉴权/路径/角色/任意 echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍 fanout。`onebot_transport` 10/10,core 全仓全绿;真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 保持 in-progress。下一步按 [acceptance §4](docs/acceptance/2026-11-24-feat-006-text-mvp.md#4-剩余现场最小包) 需要新鲜指定 QQ、真实 OneBot 应用和单次授权;未取得前不启动 QQ、不重发、不热卸载。改动文件:`crates/caligo-core/src/onebot_transport.rs`、`crates/caligo-core/src/daemon.rs`、`docs/acceptance/2026-11-24-feat-006-text-mvp.md`、`docs/guides/onebot-app-entries.md`、`docs/README.md`、`progress.md`、`feature_list.json`、`session-handoff.md`。 +2026-11-24 feat-006 现场包已准备(issue #15):本机 ignored `local-evidence/feat006-field-20261124-unbound/` 为未绑定现场包(preflight、`caligo.exe daemon` 四类 listener、`cli qq-entry` 单次接入、NoneBot2 真实应用、HTTP POST HMAC/慢应答、正向 WS 记录器、非读取 WS、控制停止与 owner stop)。离线排练 PASS,aggregate `d95f22b0…598694`(13 文件)。下一块只等新鲜指定 QQ:记录 PID/创建时间 → `preflight.ps1 -TargetPid … -ExpectedCreated …` → 用户填 `authorization.private.json` → `run-field.py --field`;B 依次发私聊/群/慢阶段 marker。未取得新实例和授权前不启动 QQ、不重发、不热卸载。证据记录见 [acceptance §7](docs/acceptance/2026-11-24-feat-006-text-mvp.md#7-现场包准备未绑定2026-11-24)。 + +2026-11-24 feat-006 文本 MVP 解阻(issue #15):以 `origin/main` `acc4fb7` 为基线新建 `codex/feat-006-text-mvp` 并已推送、开 PR #20。判定 issue 三个阻塞点已被当前正式链路取代:D8 wrapper 记录直接提供并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 探针路径,保留为 unknown。补离线传输证据与丢失日志:正向 WS 鉴权/路径/角色/任意 echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍 fanout。`onebot_transport` 10/10,全仓 default 506 / research 566,0 failed;真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 保持 in-progress。 2026-11-24 feat-005 缺口转 issue:生产链路已打通,R2(网络撤权现场)与 R3(身份切换现场)按项目决定暂不补齐,转 issue #13/#14 跟踪;feat-006–feat-010 拆为 issue #15–#19,避免 PR #12 过大。本 PR 保持已交付范围。 From 6983f777332762aa97c7fedff9bc3bf63cf4b902 Mon Sep 17 00:00:00 2001 From: Vegetable <3089665724@qq.com> Date: Tue, 24 Nov 2026 21:42:21 +0800 Subject: [PATCH 4/7] docs(feat-006): record the stopped first field attempt --- docs/acceptance/2026-11-24-feat-006-text-mvp.md | 15 +++++++++++++++ progress.md | 2 ++ 2 files changed, 17 insertions(+) diff --git a/docs/acceptance/2026-11-24-feat-006-text-mvp.md b/docs/acceptance/2026-11-24-feat-006-text-mvp.md index 2cb8311f..fddd97dd 100644 --- a/docs/acceptance/2026-11-24-feat-006-text-mvp.md +++ b/docs/acceptance/2026-11-24-feat-006-text-mvp.md @@ -125,6 +125,21 @@ aggregate SHA-256 为 `d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef309 恰一次回复)、对端 B 发送私聊与登记群 marker,以及慢阶段 marker。未执行前 feat-006 完成条件 #3 保持未闭合。 +### 7.1 现场 attempt 1 停止(零发送) + +新 QQ `34608` 通过 preflight,且 `cli qq-entry` 实际接入成功(bridge 映射、`listener_armed`、 +daemon 客户端启动)。但 `attach.ps1` 在 attach 后用 attach 前的进程模块快照复查映射,误报 +“Bridge mapping not observed”,runner 因此按失败路径正常停止 core。正常 core Stop 会让 +bridge 的 daemon worker 收到 `CoreStopped` 并退出,同 pipe 重启 core 60 秒内无 Hello, +该实例不能继续。默认生产 bridge 不提供 research owner-stop(退出码 `0xe0`),所以 bridge +保留在 QQ 内、未热卸载,QQ 仍响应。全程零发送、零入站、零账本业务记录。 + +已修:attach 后 `Refresh()` 进程快照再查映射;attach 非零退出但 bridge 已映射时记录 +`attach_script_warning` 并继续;owner-stop 在默认 bridge 上归类为 +`unavailable_default_bridge`,不重试。细节只在本机 ignored +`local-evidence/feat006-field-20261124-unbound/attempt-1.private.md`;下一轮必须使用新的 +QQ 主根。 + ## 8. 状态 本轮只新增传输协议/慢连接回归与可观测日志,没有 QQ 现场动作,也没有提升 feat-006 状态。 diff --git a/progress.md b/progress.md index 0046fd23..fb579a84 100644 --- a/progress.md +++ b/progress.md @@ -2,6 +2,8 @@ ## Current State +2026-11-24 feat-006 现场 attempt 1(失败,零发送):新 QQ `34608` preflight PASS,`cli qq-entry` 实际接入成功(bridge 映射、`listener_armed`、daemon 客户端启动),但 `attach.ps1` 用 attach 前缓存的进程模块快照复查映射而误报失败;runner 按失败路径正常停止 core。正常 Stop 使 bridge 的 daemon worker 收到 `CoreStopped` 后退出,同 pipe 重启 core 60 秒无 Hello,实例消耗。默认生产 bridge 不提供 research owner-stop(退出码 `0xe0`),按边界保留映射、未热卸载,QQ 仍响应;全程零发送、零入站、零账本业务记录。已修:attach 后刷新进程快照;attach 非零但 bridge 已映射时记录 `attach_script_warning` 并继续;owner-stop 在默认 bridge 上归类为 `unavailable_default_bridge`,不作为重试理由。细节在 ignored `local-evidence/feat006-field-20261124-unbound/attempt-1.private.md`;下一轮使用重新登录的新实例,不复用 `34608`。 + 2026-11-24 feat-006 现场包准备(离线,issue #15):本机 ignored `local-evidence/feat006-field-20261124-unbound/` 已准备未绑定现场包——preflight(固定 manifest/模块/PE/Environment/端口唯一)、`caligo.exe daemon` 四类 listener、`cli qq-entry` 单次接入、NoneBot2 2.5.0 应用(反向 WS 收事件、HTTP 发送/`get_msg`、每个入站 marker 恰一次回复)、标准 HTTP POST 接收器(HMAC + 慢应答)、正向 WS 记录器、非读取 WS 客户端、控制管道正常停止与 owner stop。离线排练通过:四类 listener、NoneBot 反向 WS 与 `get_version_info`、正向 WS 动作、POST HMAC 204、无 bridge 时 LoginInfo 诚实失败、控制停止;打包清单 aggregate `d95f22b0…598694`(13 文件)。现场仍需新鲜指定 QQ 的 PID/创建时间、操作者单次回复授权与 B 的两条入站 marker,未执行前不构成现场证据。[准备记录](docs/acceptance/2026-11-24-feat-006-text-mvp.md#7-现场包准备未绑定2026-11-24) 2026-11-24 feat-006 文本 MVP 解阻(issue #15):逐项核对 issue 列出的三个阻塞点,确认均不再是正式文本链路阻塞。D8 wrapper 记录直接携带并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 回归同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 uid-map 探针路径,保留为研究 unknown。离线补强传输证据:正向 WS 鉴权/路径/角色/任意 JSON echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍向 WS fanout;运行期新增 transport 断开/丢失日志与 HTTP POST 停止统计。`onebot_transport` 定向 10/10,`init.ps1 -Mode all` PASS(docs 15 live docs / 690 links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。GitNexus 刷新索引后 `detect-changes` 为 8 files / 34 symbols / 14 flows / high(流程均以新增测试函数为根),`impact serve_ws_socket` 为 CRITICAL、3 个 direct caller 已逐个核对;实际改动不涉及分派/事件字节/停止语义。真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 由 blocked 调整为 in-progress,产品状态不变。[证据与剩余最小现场包](docs/acceptance/2026-11-24-feat-006-text-mvp.md) From a7b62d606d88c631cce79a24d0d6cfc047c58a25 Mon Sep 17 00:00:00 2001 From: Vegetable <3089665724@qq.com> Date: Tue, 24 Nov 2026 21:42:40 +0800 Subject: [PATCH 5/7] docs(feat-006): record fresh-instance admission for the field retry --- progress.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/progress.md b/progress.md index fb579a84..163d179b 100644 --- a/progress.md +++ b/progress.md @@ -2,6 +2,8 @@ ## Current State +2026-11-24 feat-006 现场 attempt 2 准入:重新登录的 QQ `31584`(创建 `2026-11-24T13:40:42.5671257Z`,登记账号 B `1694717255`)通过固定 manifest、三个已加载模块 hash、PE/backend 审计与唯一 Environment,接入前无 bridge,四类 OneBot 端口空闲。preflight PASS,已生成新 marker/auth 模板与打包状态;现场执行进行中,结果未定。 + 2026-11-24 feat-006 现场 attempt 1(失败,零发送):新 QQ `34608` preflight PASS,`cli qq-entry` 实际接入成功(bridge 映射、`listener_armed`、daemon 客户端启动),但 `attach.ps1` 用 attach 前缓存的进程模块快照复查映射而误报失败;runner 按失败路径正常停止 core。正常 Stop 使 bridge 的 daemon worker 收到 `CoreStopped` 后退出,同 pipe 重启 core 60 秒无 Hello,实例消耗。默认生产 bridge 不提供 research owner-stop(退出码 `0xe0`),按边界保留映射、未热卸载,QQ 仍响应;全程零发送、零入站、零账本业务记录。已修:attach 后刷新进程快照;attach 非零但 bridge 已映射时记录 `attach_script_warning` 并继续;owner-stop 在默认 bridge 上归类为 `unavailable_default_bridge`,不作为重试理由。细节在 ignored `local-evidence/feat006-field-20261124-unbound/attempt-1.private.md`;下一轮使用重新登录的新实例,不复用 `34608`。 2026-11-24 feat-006 现场包准备(离线,issue #15):本机 ignored `local-evidence/feat006-field-20261124-unbound/` 已准备未绑定现场包——preflight(固定 manifest/模块/PE/Environment/端口唯一)、`caligo.exe daemon` 四类 listener、`cli qq-entry` 单次接入、NoneBot2 2.5.0 应用(反向 WS 收事件、HTTP 发送/`get_msg`、每个入站 marker 恰一次回复)、标准 HTTP POST 接收器(HMAC + 慢应答)、正向 WS 记录器、非读取 WS 客户端、控制管道正常停止与 owner stop。离线排练通过:四类 listener、NoneBot 反向 WS 与 `get_version_info`、正向 WS 动作、POST HMAC 204、无 bridge 时 LoginInfo 诚实失败、控制停止;打包清单 aggregate `d95f22b0…598694`(13 文件)。现场仍需新鲜指定 QQ 的 PID/创建时间、操作者单次回复授权与 B 的两条入站 marker,未执行前不构成现场证据。[准备记录](docs/acceptance/2026-11-24-feat-006-text-mvp.md#7-现场包准备未绑定2026-11-24) From 225a61a7a761fc8712f8c7fa3074f9a3507d035f Mon Sep 17 00:00:00 2001 From: Vegetable <3089665724@qq.com> Date: Tue, 24 Nov 2026 21:53:49 +0800 Subject: [PATCH 6/7] docs(feat-006): record the passed field session and corrected readback check --- .../2026-11-24-feat-006-text-mvp.md | 60 +++++++++++++++---- feature_list.json | 2 +- progress.md | 4 +- session-handoff.md | 4 +- 4 files changed, 54 insertions(+), 16 deletions(-) diff --git a/docs/acceptance/2026-11-24-feat-006-text-mvp.md b/docs/acceptance/2026-11-24-feat-006-text-mvp.md index fddd97dd..ff594ae9 100644 --- a/docs/acceptance/2026-11-24-feat-006-text-mvp.md +++ b/docs/acceptance/2026-11-24-feat-006-text-mvp.md @@ -84,7 +84,7 @@ QQ 版本、任意账号或 CPB/native 响应身份。 ## 4. 剩余现场最小包 -以下步骤需要新鲜指定 QQ、真实 OneBot 应用和用户授权;未执行前 feat-006 保持 `blocked`: +以下步骤需要新鲜指定 QQ、真实 OneBot 应用和用户授权;未执行前 feat-006 的完成条件 #3 保持开放: 1. 按[原生研究指南](../guides/native-research.md)重新准入一个新的 QQ 主根,核对 PID/创建时间、 固定 manifest、已加载模块 hash、PE/backend 与唯一 Environment,接入前无 Caligo bridge。 @@ -106,7 +106,7 @@ low / 0 flows,不能作为影响面结论。刷新索引(`analyze --index-on 不改变动作分派、事件字节、队列上限或停止语义。高风险标注按图轴保留,不视为可忽略,也不据此宣称 无运行时影响。 -## 7. 现场包准备(未绑定,2026-11-24) +## 6. 现场包准备(未绑定,2026-11-24) 本机 ignored `local-evidence/feat006-field-20261124-unbound/` 已准备现场包:preflight (固定 manifest/三个模块 hash/PE backend/唯一 Environment/端口唯一)、`caligo.exe daemon` @@ -118,14 +118,14 @@ low / 0 flows,不能作为影响面结论。刷新索引(`analyze --index-on 离线排练(`preflight.ps1 -Rehearse` + `run-field.py --rehearse`)通过:daemon 与四类 listener 启动、NoneBot 反向 WS 连接并成功调用 `get_version_info`、正向 WS 动作与事件握手、 HTTP POST HMAC 204、无 bridge 时 `get_login_info` 诚实失败、控制管道正常停止。打包清单 -aggregate SHA-256 为 `d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef3090598694` -(13 个文件,见包内 `pack-manifest.json`)。 +aggregate SHA-256 为 `275d5f2d5aff527c0919f66c410884841746b7e5362ed98a7ccb5e0da35fbd07` +(14 个文件,见包内 `pack-manifest.json`;attempt 1 后修订脚本并加入离线复核)。 排练不是现场证据。现场仍需:新鲜指定 QQ 的 PID/创建时间、操作者授权(每个入站 marker 恰一次回复)、对端 B 发送私聊与登记群 marker,以及慢阶段 marker。未执行前 feat-006 完成条件 #3 保持未闭合。 -### 7.1 现场 attempt 1 停止(零发送) +### 6.1 现场 attempt 1 停止(零发送) 新 QQ `34608` 通过 preflight,且 `cli qq-entry` 实际接入成功(bridge 映射、`listener_armed`、 daemon 客户端启动)。但 `attach.ps1` 在 attach 后用 attach 前的进程模块快照复查映射,误报 @@ -140,12 +140,50 @@ bridge 的 daemon worker 收到 `CoreStopped` 并退出,同 pipe 重启 core 6 `local-evidence/feat006-field-20261124-unbound/attempt-1.private.md`;下一轮必须使用新的 QQ 主根。 -## 8. 状态 - -本轮只新增传输协议/慢连接回归与可观测日志,没有 QQ 现场动作,也没有提升 feat-006 状态。 -issue #15 的三个阻塞点已由当前实现和现场文本样本取代;剩余完成门是“真实外部应用 + 慢连接” -的现场证据。feat-006 与产品状态保持不变,历史 Crashpad 根因仍为研究 unknown。 +### 6.2 现场 attempt 2(通过,单构建) + +新 QQ 主根 `31584`(创建 `2026-11-24T13:40:42.5671257Z`,登记账号 B +`1694717255`)通过 preflight;一次 `cli qq-entry` attach,`get_login_info` 返回同一账号, +昵称与登记账号一致。对端 A `3089665724` 发送两个入站 marker,NoneBot 对每个 marker +只回复一次: + +| 场景 | 入站 message_id | 应用回复 id | 应用 get_msg | Caligo get_msg | +|---|---|---|---|---| +| 私聊 | 36 | 37 | 37 成功 | 36、37 均成功 | +| 登记群 `263402786` | 41 | 42 | 42 成功 | 41、42 均成功 | + +- 入站事件 `self_id=1694717255`、sender=`3089665724`,类型/群号/正文与 marker 一致; + Caligo `get_msg` 返回同一持久 ID、类型、发送者与正文;账本保存 36/37/41/42, + 发送方分别为 A / B。 +- 同一入站 36/41 同时出现在 HTTP POST(`X-Signature` HMAC 校验通过)与正向 WS 日志, + 到达顺序符合 POST → WS。NoneBot 通过反向 WS 收到同一事件并通过 HTTP API 发送。 +- 慢阶段:A 发送私聊 90(`…-SLOW`)。POST 接收器延迟 8 秒,daemon 记录 23 次 + POST 投递失败、66 次送达、0 次队列丢弃;NoneBot 仍收到 90(在慢 POST 积压后约 38 秒 + 到达),非读取 WS 客户端连接 25 秒后关闭,不影响应用连接。慢阶段的自动回复请求 + `onebot-85939363ae79fe15-4` 在 `NativeStarted` 后以 `DeliveryUnknown` 结束, + OneBot API 向应用返回失败,未重发;账本另保存该自发消息 106(sender B), + 其发送回执与对端可见性保持 unknown。 +- 停止:控制管道正常停止 daemon;默认生产 bridge 不提供 research owner-stop(`0xe0`), + bridge 保留、QQ 仍响应、未热卸载。 +- 复核:原始 runner 的 `app_get_msg` 检查把入站 source ID 当作 get_msg ID,导致 + `summary.json` 两项 false negative;原始 bot 日志已含 37/42 的成功回读。 + `verify-evidence.py` 在不修改原 summary、不重发消息的前提下离线重算,9 项 criteria + 全部为 true,`verification-corrected.json` 的 overall 为 pass。 +- 边界与遗留风险:单构建/单代次;未强制真实 TCP 背压;慢阶段自动回复 unknown; + 默认 bridge owner-stop 不可用;HTTP POST 的有序 fanout 会在慢 POST 积压时按事件 + 延后 WS 投递(本样本约 38 秒),属于已观测的有界退化,后续应在 N5 评估解耦或更明确的 + 积压上限。 + +## 7. 状态 + +issue #15 的三个阻塞点已由当前实现与现场样本取代,三条完成条件现在都有固定构建的现场或 +离线证据:身份与持久 OneBot ID 一致;HTTP/HTTP POST/双向 WS 有标准协议回归与现场记录; +真实 NoneBot2 应用完成私聊/群文本收发、双方 `get_msg` 与慢连接退化观测。 + +feat-006 仍保持 `in-progress`:其依赖 feat-005 尚未 `done`(项目文档检查要求依赖完成才能 +把本项标为 done),且产品整体仍 NOT READY。历史 Crashpad 根因仍为研究 unknown; +慢 POST 积压导致 WS 延迟与慢阶段回复 unknown 已列入后续风险。 本轮验证:`cargo test -p caligo-core --lib onebot_transport` 10/10;`init.ps1 -Mode all` PASS (docs 15 live docs / 690 local links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。 -QQ 现场验收另行进行。 +现场样本的原始材料只在本机 ignored `local-evidence/feat006-field-20261124-unbound/`。 diff --git a/feature_list.json b/feature_list.json index b7cd76b1..4fe41998 100644 --- a/feature_list.json +++ b/feature_list.json @@ -99,7 +99,7 @@ "plan_steps": ["N4"], "dependencies": ["feat-005"], "status": "in-progress", - "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending. 2026-11-24 issue #15 blocker audit: the general UIN/UID resolver, the historical Crashpad path and the explicit wire projection=None are no longer text-MVP blockers. D8 wrapper records carry validated sender/peer UINs and core derives the durable OneBot projection from the wrapper envelope; wrapper_message_chain asserts wire projection=None while get_msg and standard events expose the same identity. The three Crashpad dumps belong to the old research V8 uid-map probe path and remain an unresolved research unknown. New offline transport regressions cover forward WS auth/path/role/arbitrary echo, reverse WS reconnect after application close, a stalled transport writer that cannot block fanout and reports queue loss, and HTTP POST failure that still fans the event out to WS; transport disconnect/loss logs were added. Real third-party OneBot applications and a field slow-client matrix are still pending, so feat-006 stays open and is tracked as in-progress. Details: docs/acceptance/2026-11-24-feat-006-text-mvp.md. 2026-11-24 field pack prepared offline in ignored local-evidence/feat006-field-20261124-unbound: preflight, standalone daemon with HTTP/forward-WS/HTTP-POST/reverse-WS, single qq-entry attach, real NoneBot2 2.5.0 app, HMAC POST receiver with slow mode, forward-WS logger, non-reading WS client, control-pipe stop and owner stop. Rehearsal passed (four listeners, reverse WS get_version_info, forward WS action, POST 204 signature, honest LoginInfo without bridge, graceful stop); pack aggregate d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef3090598694. It stays unbound/unauthorized/unexecuted pending a fresh designated QQ; no field claim.", + "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending. 2026-11-24 issue #15 blocker audit: the general UIN/UID resolver, the historical Crashpad path and the explicit wire projection=None are no longer text-MVP blockers. D8 wrapper records carry validated sender/peer UINs and core derives the durable OneBot projection from the wrapper envelope; wrapper_message_chain asserts wire projection=None while get_msg and standard events expose the same identity. The three Crashpad dumps belong to the old research V8 uid-map probe path and remain an unresolved research unknown. New offline transport regressions cover forward WS auth/path/role/arbitrary echo, reverse WS reconnect after application close, a stalled transport writer that cannot block fanout and reports queue loss, and HTTP POST failure that still fans the event out to WS; transport disconnect/loss logs were added. Real third-party OneBot applications and a field slow-client matrix are still pending, so feat-006 stays open and is tracked as in-progress. Details: docs/acceptance/2026-11-24-feat-006-text-mvp.md. 2026-11-24 field pack prepared offline in ignored local-evidence/feat006-field-20261124-unbound: preflight, standalone daemon with HTTP/forward-WS/HTTP-POST/reverse-WS, single qq-entry attach, real NoneBot2 2.5.0 app, HMAC POST receiver with slow mode, forward-WS logger, non-reading WS client, control-pipe stop and owner stop. Rehearsal passed (four listeners, reverse WS get_version_info, forward WS action, POST 204 signature, honest LoginInfo without bridge, graceful stop); pack aggregate d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef3090598694. It stays unbound/unauthorized/unexecuted pending a fresh designated QQ; no field claim. 2026-11-24 attempt 2 then ran on a fresh QQ generation with the real NoneBot2 app: private/group inbound events (IDs 36/41) reached the app over reverse WS, it replied once each (37/42), app-side and Caligo get_msg both succeeded, the same messages appeared in signed HTTP POST and forward WS, and the ledger matched senders. A delayed POST endpoint plus a non-reading WS client still delivered the slow marker (90) to the app (23 POST failures, 66 delivered, 0 dropped); the slow-phase automatic reply ended DeliveryUnknown and was not replayed. The runner app_get_msg check had a source/outbound ID bug; verify-evidence.py recomputed all nine criteria as true offline without changing the original summary. All three done_criteria now have fixed-build evidence; feat-006 stays in-progress because dependency feat-005 is not done and the product stays NOT READY. Resealed pack aggregate 275d5f2d5aff527c0919f66c410884841746b7e5362ed98a7ccb5e0da35fbd07.", "evidence_paths": ["crates/caligo-bridge/tests/query_revocation.rs", "docs/acceptance/2026-11-14-session-revocation.md", "docs/acceptance/2026-11-24-feat-006-text-mvp.md", "docs/plans/2026-10-11-gitnexus-plan-caligo-n4-response-recovery.md", "docs/execution/2026-10-11-n4-response-recovery.md", "docs/execution/2026-11-13-snowcat-capability-integration-continued.md", "crates/caligo-core/tests/onebot_http_lab.rs", "crates/caligo-core/tests/daemon_chain.rs", "crates/caligo-core/tests/recovery_contract.rs", "crates/caligo-core/src/commands/daemon.rs", "crates/caligo-core/src/onebot_server.rs", "crates/caligo-core/src/onebot_transport.rs", "crates/caligo-core/src/onebot_events.rs", "crates/caligo-core/src/daemon.rs", "crates/caligo-core/src/runtime.rs", "crates/caligo-core/src/onebot.rs", "crates/caligo-model/src/capability.rs", "crates/caligo-bridge/src/qq_entry.rs", "crates/caligo-bridge/src/qq_v8.rs", "crates/caligo-bridge/tests/fixtures/scoped-self-profile-contract.cjs", "crates/caligo-core/tests/onebot_query_lab.rs", "crates/caligo-core/tests/daemon_client_lab.rs", "crates/caligo-core/src/onebot_http.rs", "crates/caligo-core/src/message_store.rs", "docs/plans/2026-10-09-gitnexus-plan-caligo-snowluma-capability-parity.md"], "done_criteria": ["身份与持久 OneBot ID 查询一致", "目标 HTTP/WS transport 有标准协议测试", "真实应用普通文本收发/get_msg 及慢连接有同链证据"] }, diff --git a/progress.md b/progress.md index 163d179b..5b5cd685 100644 --- a/progress.md +++ b/progress.md @@ -2,11 +2,11 @@ ## Current State -2026-11-24 feat-006 现场 attempt 2 准入:重新登录的 QQ `31584`(创建 `2026-11-24T13:40:42.5671257Z`,登记账号 B `1694717255`)通过固定 manifest、三个已加载模块 hash、PE/backend 审计与唯一 Environment,接入前无 bridge,四类 OneBot 端口空闲。preflight PASS,已生成新 marker/auth 模板与打包状态;现场执行进行中,结果未定。 +2026-11-24 feat-006 现场 attempt 2(通过,单构建,issue #15):新 QQ `31584`(创建 `2026-11-24T13:40:42.5671257Z`,登记账号 B)通过 preflight,一次 attach,`get_login_info` 返回同一账号。对端 A 发送私聊 36 与群 41,NoneBot 反向 WS 收到并各回复一次(37/42),应用与 Caligo `get_msg` 均成功;账本保存 36/37/41/42,发送方 A/B 正确;同一 36/41 同时有签名通过的 HTTP POST 与正向 WS 证据。慢阶段 90 在 8 秒慢 POST、5 秒超时下仍到达应用(慢 POST 积压后约 38 秒),daemon 记录 23 次 POST 失败、66 次送达、0 丢弃,非读取 WS 客户端不影响应用连接;该阶段自动回复请求 `onebot-85939363ae79fe15-4` 以 `DeliveryUnknown` 结束(账本另存自发消息 106),未重发。控制管道正常停止 daemon;默认生产 bridge 无 research owner-stop(`0xe0`),bridge 保留、QQ 仍响应、未热卸载。原始 runner 的 `app_get_msg` 检查存在 source/outbound ID 比较缺陷,导致 `summary.json` 两项 false negative;`verify-evidence.py` 在不改原 summary、不重发的前提下离线重算,9 项 criteria 全 true、overall pass。feat-006 保持 in-progress(依赖 feat-005 未 done),产品 NOT READY;慢 POST 积压延迟 WS 与慢阶段回复 unknown 列入后续风险。原始材料只在 ignored `local-evidence/feat006-field-20261124-unbound/`。 2026-11-24 feat-006 现场 attempt 1(失败,零发送):新 QQ `34608` preflight PASS,`cli qq-entry` 实际接入成功(bridge 映射、`listener_armed`、daemon 客户端启动),但 `attach.ps1` 用 attach 前缓存的进程模块快照复查映射而误报失败;runner 按失败路径正常停止 core。正常 Stop 使 bridge 的 daemon worker 收到 `CoreStopped` 后退出,同 pipe 重启 core 60 秒无 Hello,实例消耗。默认生产 bridge 不提供 research owner-stop(退出码 `0xe0`),按边界保留映射、未热卸载,QQ 仍响应;全程零发送、零入站、零账本业务记录。已修:attach 后刷新进程快照;attach 非零但 bridge 已映射时记录 `attach_script_warning` 并继续;owner-stop 在默认 bridge 上归类为 `unavailable_default_bridge`,不作为重试理由。细节在 ignored `local-evidence/feat006-field-20261124-unbound/attempt-1.private.md`;下一轮使用重新登录的新实例,不复用 `34608`。 -2026-11-24 feat-006 现场包准备(离线,issue #15):本机 ignored `local-evidence/feat006-field-20261124-unbound/` 已准备未绑定现场包——preflight(固定 manifest/模块/PE/Environment/端口唯一)、`caligo.exe daemon` 四类 listener、`cli qq-entry` 单次接入、NoneBot2 2.5.0 应用(反向 WS 收事件、HTTP 发送/`get_msg`、每个入站 marker 恰一次回复)、标准 HTTP POST 接收器(HMAC + 慢应答)、正向 WS 记录器、非读取 WS 客户端、控制管道正常停止与 owner stop。离线排练通过:四类 listener、NoneBot 反向 WS 与 `get_version_info`、正向 WS 动作、POST HMAC 204、无 bridge 时 LoginInfo 诚实失败、控制停止;打包清单 aggregate `d95f22b0…598694`(13 文件)。现场仍需新鲜指定 QQ 的 PID/创建时间、操作者单次回复授权与 B 的两条入站 marker,未执行前不构成现场证据。[准备记录](docs/acceptance/2026-11-24-feat-006-text-mvp.md#7-现场包准备未绑定2026-11-24) +2026-11-24 feat-006 现场包准备(离线,issue #15):本机 ignored `local-evidence/feat006-field-20261124-unbound/` 已准备未绑定现场包——preflight(固定 manifest/模块/PE/Environment/端口唯一)、`caligo.exe daemon` 四类 listener、`cli qq-entry` 单次接入、NoneBot2 2.5.0 应用(反向 WS 收事件、HTTP 发送/`get_msg`、每个入站 marker 恰一次回复)、标准 HTTP POST 接收器(HMAC + 慢应答)、正向 WS 记录器、非读取 WS 客户端、控制管道正常停止与 owner stop。离线排练通过:四类 listener、NoneBot 反向 WS 与 `get_version_info`、正向 WS 动作、POST HMAC 204、无 bridge 时 LoginInfo 诚实失败、控制停止;打包清单 aggregate `d95f22b0…598694`(13 文件)。现场仍需新鲜指定 QQ 的 PID/创建时间、操作者单次回复授权与 B 的两条入站 marker,未执行前不构成现场证据。[准备记录](docs/acceptance/2026-11-24-feat-006-text-mvp.md#6-现场包准备未绑定2026-11-24) 2026-11-24 feat-006 文本 MVP 解阻(issue #15):逐项核对 issue 列出的三个阻塞点,确认均不再是正式文本链路阻塞。D8 wrapper 记录直接携带并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 回归同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 uid-map 探针路径,保留为研究 unknown。离线补强传输证据:正向 WS 鉴权/路径/角色/任意 JSON echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍向 WS fanout;运行期新增 transport 断开/丢失日志与 HTTP POST 停止统计。`onebot_transport` 定向 10/10,`init.ps1 -Mode all` PASS(docs 15 live docs / 690 links;default 506 passed、research 566 passed,各 69 个 test binary、0 failed)。GitNexus 刷新索引后 `detect-changes` 为 8 files / 34 symbols / 14 flows / high(流程均以新增测试函数为根),`impact serve_ws_socket` 为 CRITICAL、3 个 direct caller 已逐个核对;实际改动不涉及分派/事件字节/停止语义。真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 由 blocked 调整为 in-progress,产品状态不变。[证据与剩余最小现场包](docs/acceptance/2026-11-24-feat-006-text-mvp.md) diff --git a/session-handoff.md b/session-handoff.md index 18f4f1fc..135faf44 100644 --- a/session-handoff.md +++ b/session-handoff.md @@ -1,8 +1,8 @@ # Session handoff -2026-11-24 feat-006 现场包已准备(issue #15):本机 ignored `local-evidence/feat006-field-20261124-unbound/` 为未绑定现场包(preflight、`caligo.exe daemon` 四类 listener、`cli qq-entry` 单次接入、NoneBot2 真实应用、HTTP POST HMAC/慢应答、正向 WS 记录器、非读取 WS、控制停止与 owner stop)。离线排练 PASS,aggregate `d95f22b0…598694`(13 文件)。下一块只等新鲜指定 QQ:记录 PID/创建时间 → `preflight.ps1 -TargetPid … -ExpectedCreated …` → 用户填 `authorization.private.json` → `run-field.py --field`;B 依次发私聊/群/慢阶段 marker。未取得新实例和授权前不启动 QQ、不重发、不热卸载。证据记录见 [acceptance §7](docs/acceptance/2026-11-24-feat-006-text-mvp.md#7-现场包准备未绑定2026-11-24)。 +2026-11-24 feat-006 现场 attempt 2 通过(issue #15):新 QQ `31584` 一次 attach,NoneBot2 经反向 WS 收到私聊 36 / 群 41,各回复一次(37/42);应用与 Caligo `get_msg` 均成功,账本与发送方一致;同一消息有签名 HTTP POST 与正向 WS 证据。慢阶段 90 在慢 POST/超时下仍到达应用(积压后约 38 秒),daemon 记录 23 failed / 66 delivered / 0 dropped;该阶段自动回复请求 `onebot-85939363ae79fe15-4` 为 `DeliveryUnknown`(账本另存自发消息 106),未重发。控制停止 daemon;默认 bridge 无 research owner-stop(0xe0),bridge 保留、QQ 响应。runner 的 `app_get_msg` 误报已由 `verify-evidence.py` 离线更正,9/9 criteria true。待操作者确认对端可见性后关闭 issue #15;feat-006 保持 in-progress(依赖 feat-005 未 done),慢 POST 积压延迟 WS 投递列为后续风险。证据见 [acceptance §6.2](docs/acceptance/2026-11-24-feat-006-text-mvp.md#62-现场-attempt-2通过单构建)。 -2026-11-24 feat-006 文本 MVP 解阻(issue #15):以 `origin/main` `acc4fb7` 为基线新建 `codex/feat-006-text-mvp` 并已推送、开 PR #20。判定 issue 三个阻塞点已被当前正式链路取代:D8 wrapper 记录直接提供并校验 sender/peer UIN,core 由 wrapper envelope 派生持久 OneBot 投影(`wrapper_message_chain` 同时断言 wire `projection=None`、`get_msg` 与标准事件身份一致);三份 Crashpad 属旧 research V8 探针路径,保留为 unknown。补离线传输证据与丢失日志:正向 WS 鉴权/路径/角色/任意 echo、反向 WS 应用关闭后重连、阻塞写端不拖住 fanout 且丢弃计数可见、HTTP POST 失败仍 fanout。`onebot_transport` 10/10,全仓 default 506 / research 566,0 failed;真实第三方 OneBot 应用与现场慢连接仍未验收,feat-006 保持 in-progress。 +2026-11-24 PR #20(`codex/feat-006-text-mvp` → `main`):issue #15 阻塞点判定、传输协议/慢连接回归与可观测日志、现场包与 attempt 记录已提交推送;分支含 `3d2ef1b`/`cfc9168`/`109140e`/`6983f77`/`a7b62d6` 及现场记录提交。GitNexus 刷新索引后 detect 8 files / 34 symbols / 14 flows / high、`impact serve_ws_socket` CRITICAL 已核对(改动为日志/测试路径)。全仓 default 506 / research 566,0 failed。 2026-11-24 feat-005 缺口转 issue:生产链路已打通,R2(网络撤权现场)与 R3(身份切换现场)按项目决定暂不补齐,转 issue #13/#14 跟踪;feat-006–feat-010 拆为 issue #15–#19,避免 PR #12 过大。本 PR 保持已交付范围。 From 81fd8f6f955ea59333b4aa3d4f34c42bfc94df25 Mon Sep 17 00:00:00 2001 From: Vegetable <3089665724@qq.com> Date: Tue, 24 Nov 2026 21:57:03 +0800 Subject: [PATCH 7/7] docs(feat-006): record peer confirmation of the three replies --- docs/acceptance/2026-11-24-feat-006-text-mvp.md | 11 +++++++---- feature_list.json | 2 +- progress.md | 2 +- session-handoff.md | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/acceptance/2026-11-24-feat-006-text-mvp.md b/docs/acceptance/2026-11-24-feat-006-text-mvp.md index ff594ae9..af013b82 100644 --- a/docs/acceptance/2026-11-24-feat-006-text-mvp.md +++ b/docs/acceptance/2026-11-24-feat-006-text-mvp.md @@ -163,16 +163,19 @@ QQ 主根。 `onebot-85939363ae79fe15-4` 在 `NativeStarted` 后以 `DeliveryUnknown` 结束, OneBot API 向应用返回失败,未重发;账本另保存该自发消息 106(sender B), 其发送回执与对端可见性保持 unknown。 +- 对端确认:操作者确认 A 收到私聊 37、群 42,以及慢阶段的 106(正文与主回复相同)。 + 因此慢阶段自动回复的内部结果仍是 `DeliveryUnknown`,但外部可见性已由操作者确认; + 该消息未重发。 - 停止:控制管道正常停止 daemon;默认生产 bridge 不提供 research owner-stop(`0xe0`), bridge 保留、QQ 仍响应、未热卸载。 - 复核:原始 runner 的 `app_get_msg` 检查把入站 source ID 当作 get_msg ID,导致 `summary.json` 两项 false negative;原始 bot 日志已含 37/42 的成功回读。 `verify-evidence.py` 在不修改原 summary、不重发消息的前提下离线重算,9 项 criteria 全部为 true,`verification-corrected.json` 的 overall 为 pass。 -- 边界与遗留风险:单构建/单代次;未强制真实 TCP 背压;慢阶段自动回复 unknown; - 默认 bridge owner-stop 不可用;HTTP POST 的有序 fanout 会在慢 POST 积压时按事件 - 延后 WS 投递(本样本约 38 秒),属于已观测的有界退化,后续应在 N5 评估解耦或更明确的 - 积压上限。 +- 边界与遗留风险:单构建/单代次;未强制真实 TCP 背压;慢阶段回复的内部结果为 + unknown(对端已确认收到);默认 bridge owner-stop 不可用;HTTP POST 的有序 fanout + 会在慢 POST 积压时按事件延后 WS 投递(本样本约 38 秒),属于已观测的有界退化, + 后续应在 N5 评估解耦或更明确的积压上限。 ## 7. 状态 diff --git a/feature_list.json b/feature_list.json index 4fe41998..7b007fe3 100644 --- a/feature_list.json +++ b/feature_list.json @@ -99,7 +99,7 @@ "plan_steps": ["N4"], "dependencies": ["feat-005"], "status": "in-progress", - "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending. 2026-11-24 issue #15 blocker audit: the general UIN/UID resolver, the historical Crashpad path and the explicit wire projection=None are no longer text-MVP blockers. D8 wrapper records carry validated sender/peer UINs and core derives the durable OneBot projection from the wrapper envelope; wrapper_message_chain asserts wire projection=None while get_msg and standard events expose the same identity. The three Crashpad dumps belong to the old research V8 uid-map probe path and remain an unresolved research unknown. New offline transport regressions cover forward WS auth/path/role/arbitrary echo, reverse WS reconnect after application close, a stalled transport writer that cannot block fanout and reports queue loss, and HTTP POST failure that still fans the event out to WS; transport disconnect/loss logs were added. Real third-party OneBot applications and a field slow-client matrix are still pending, so feat-006 stays open and is tracked as in-progress. Details: docs/acceptance/2026-11-24-feat-006-text-mvp.md. 2026-11-24 field pack prepared offline in ignored local-evidence/feat006-field-20261124-unbound: preflight, standalone daemon with HTTP/forward-WS/HTTP-POST/reverse-WS, single qq-entry attach, real NoneBot2 2.5.0 app, HMAC POST receiver with slow mode, forward-WS logger, non-reading WS client, control-pipe stop and owner stop. Rehearsal passed (four listeners, reverse WS get_version_info, forward WS action, POST 204 signature, honest LoginInfo without bridge, graceful stop); pack aggregate d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef3090598694. It stays unbound/unauthorized/unexecuted pending a fresh designated QQ; no field claim. 2026-11-24 attempt 2 then ran on a fresh QQ generation with the real NoneBot2 app: private/group inbound events (IDs 36/41) reached the app over reverse WS, it replied once each (37/42), app-side and Caligo get_msg both succeeded, the same messages appeared in signed HTTP POST and forward WS, and the ledger matched senders. A delayed POST endpoint plus a non-reading WS client still delivered the slow marker (90) to the app (23 POST failures, 66 delivered, 0 dropped); the slow-phase automatic reply ended DeliveryUnknown and was not replayed. The runner app_get_msg check had a source/outbound ID bug; verify-evidence.py recomputed all nine criteria as true offline without changing the original summary. All three done_criteria now have fixed-build evidence; feat-006 stays in-progress because dependency feat-005 is not done and the product stays NOT READY. Resealed pack aggregate 275d5f2d5aff527c0919f66c410884841746b7e5362ed98a7ccb5e0da35fbd07.", + "evidence": "N4-R5 typed target、拒绝假成功动作层、有界分片 HTTP parser 与 durable MessageStore 已实现;core 将 MessageStore 装配进数值 account 的 Daemon/AccountActor,显式 projection 在 journal 与 ACK 之间落盘、恢复幂等重建,pipe 集成测试经 Daemon StoreReader 验证 OneBot get_msg 完整字段。普通 caligod 的 HTTP、HTTP POST、正向 WS、反向 WS 共用动作层;POST quick operation 结束后才扇出 WebSocket 事件。群 send 只有强 native 回执且匹配的持久 OneBot ID 可读时才返回成功。K3-D/K3-F 历史 receive 证据共包含 21 个不同的 UIN↔UID 对,样本内无冲突,其中仅一个联系人对有独立 profile UIN 交叉核对。固定版本 major.node 静态登记 `GroupService/getUidByUins(uinList)->uids` 与逆向方法 `getUinByUids`;已在两次用户授权的目标实例上启动 K4 owner-thread 只读样本:PID 48980 在 first_entry 后退出,无法判断 resolver API 是否到达;PID 48768 在组合式 QQNT session/GroupService 表面脚本期间变为无响应并退出。两次均无 resolver 结果,且无证据表明 API 已派发。修复了 bootstrap 将报告路径指向临时远程缓冲的生命周期缺陷,并将新探针分阶段;新 build 尚未现场验证。PID 48768 及后续新 root PID 8976 均已退出;PID 8976 的阶段日志止于 uid_map_binding_entered,结果文件为空,未证明 resolver API 派发。 Crashpad 三份 dump 现确认 PID 48980/48768/8976 均为 QQNT.dll+0x1F2AB8 读取 0x230 的 0xC0000005,三份栈均含 bridge 帧;PID8976 崩溃线程与 binding 阶段 owner TID 一致,但 resolver 未派发。无匹配 bridge PDB,且保存寄存器与紧邻 test/branch 不一致,根因未定;崩溃后没有重放。Crashpad 路径及脱敏摘要见事故台账与执行记录。报告路径生命周期缺陷已修复;探针继续细分为 no-op V8、状态初始化、linkedBinding、wrapper 读取。当前只见未选定的旧 root PID 47560,不得替代。新 build 尚待现场验证;通用私聊映射仍未建立,feat-006 保持 blocked。`getUserDetailInfoByUin` 返回掩码 UID;此前 `ProfileService/getUidByUin` 探针无可用响应。 固定构建 `wrapper.node` 静态断言 `ProfileService/getUidByUin` 与逆向方法各需 2 个 JavaScript 参数,`GroupService/getUidByUins`/`getUinByUids` 各需 1 个 JavaScript 列表参数;其 C++ callback RTTI 给出 UIN→UID 与 UID→UIN unordered-map 结果形状;ProfileService 第二参数语义未解析,三份 Crashpad dump 均定位到 V8 HandleScope 析构 AV;现有阶段记录未确认 resolver 派发或结果。Ghidra 定点反汇编支持清理路径定位但根因未闭合,通用映射未动态证明。HTTP→actor→fake bridge strong receipt→projection→get_msg 集成测试、慢头隔离及三类事件 transport 协议合同通过。真实 daemon_client projection 当前仍是 None;真实应用互通、通用私聊映射与 native receive/query 未验收,继续 blocked。 Turn 40: exact-build static metadata suggests ProfileService second argument is a caller/source string (`callFrom`; observed labels `node/BaseSearchAll` and `AvatarRenderer`); RTTI argument order is `(uint64_t,string)` forward and `(string,uint64_t)` reverse. N-API extraction and return encoding remain unconfirmed; the earlier one-argument probe was under-specified. HandleScope constructor/destructor ABI/layout matches current caller; null-isolate fail-closed guard and injected-symbol LAB tests pass 3/3, but do not reproduce the Crashpad register/branch inconsistency. No new mapping; R3/R4 remain open. 2026-11-07 UID-map V8 sanity prerequisite follow-up: exact-hash analysis ties the new pilot's HandleScope AV to the undersized TryCatch backing store, and the source correction plus isolated research release build are recorded in the execution ledger. The corrected bridge has no QQ runtime result; no resolver dispatch/result or UID mapping was observed, so feat-006 remains blocked. 2026-11-07 source audit confirms the callback response UID is diagnostic-only and current CPB receive events fail closed without mapped native_id and resolved sender_uin. No stable send/receive identity join was found; feature remains blocked. 2026-11-07 surface-only pilot on designated PID 31156 confirmed GroupService missing with api_call_attempted=false and no resolver stages. No UID result or response UID-to-CPB/native-ID relation was observed; remain blocked. 2026-11-13 SnowCat fixed-build evidence supplies the ProfileService call shape. The Caligo research CLI now has a 9.9.36-53644 hash-bound read-only mode with offline exact-key round-trip and rejection coverage. Caligo field validation and the response UID-to-CPB/native-ID join remain open. 2026-11-13 GroupMembers scoped snapshot and shared member-list/member-info routes have offline wrapper/real-pipe evidence; rich profile fetch and QQ field acceptance remain open. 2026-11-14 dual-account QQ probe reached owner bootstrap and clean shutdown in both instances; the reacquired wrapper returned profile_service_missing and dispatched neither resolver. The research probe now selects nt_1 from the exact-hash loaded wrapper module, with offline fixture coverage. Field retest on one restarted QQ root obtained ProfileService through nt_1, matched the exact UIN-to-UID-to-UIN round trip, and closed the owner pump cleanly. A subsequent no-UIN research probe obtained UIN and UID from the nt_1 ProfileService self-status notification on one fresh QQ root and matched both against independent evidence. A later fresh-root research probe verified the exact current-profile nickname and recorded the wrapper session ID with the host process nonce. Normal OneBot get_login_info returned the independently verified account and nickname through the exact-hash QQ 9.9.36-53644 owner and authenticated named pipe on one restarted root. Offline real-pipe regression covers revocation of an in-flight query and rejection of its stale epoch. Live account switching, reconnect and dual-account query isolation remain open. 2026-11-14 authorized continuation preflight found both existing QQ roots responsive with prior bridge builds still mapped and no running caligod/manager; both module audits rejected reattachment. Await fresh logged-in process generations before the dual-account query test; no new host API call or message submission occurred. After the user restarted both QQ instances, normal daemon/IPC LoginInfo queries on fresh A/B roots using the same pinned release matched independent QQ account/nickname evidence. Each endpoint rejected the other token with HTTP 403 and no token with 401; B still returned the same identity after A daemon/owner shutdown. Both daemon/owner pairs closed normally, both HTTP listeners closed, and both QQ roots remained responsive with bridges retained. This sequential-query sample does not cover account switching, reconnect, simultaneous in-flight replies, event/journal isolation or long-term quiescence. A separate research-only current-profile refresh probe now verifies host identity before one server-source fetch, joins the per-request Promise source/detail Map with a matching notification, and refuses timeout/drift or unverified listener cleanup. Exact-hash native static evidence and 22 synthetic scenarios exist; this is not a public get_stranger_info capability or QQ field acceptance. 2026-11-14 follow-up field evidence on a user-restarted A root returned profile_refresh_match for one current-self KSERVER request: per-request Promise source/detail and matching UID notification agreed with the independently checked QQ identity/nickname; listener removal returned, owner shutdown succeeded, and both QQ roots remained responsive. No message was sent. Public profile actions, other targets/fields, reconnect/account switch and long-term callback quiescence remain unverified. The subsequent self-only SelfProfile path is wired to get_login_info(no_cache=true), with distinct typed responses, no LoginInfo fallback, scoped owner cancellation and late-callback isolation. Final default/research workspace tests and isolated release build pass; a subsequent fresh A process passed one authenticated normal-entry get_login_info(no_cache=true) field sample on the exact pilot, with user_id/nickname matching an independent QQ card. The daemon and owner shut down, HTTP closed and both QQ roots remained responsive; DLLs remain mapped. Other targets/fields, real account switch/reconnect and long-term callback quiescence remain unverified, so blocked status is unchanged. A subsequent offline revocation audit passed 42 existing regressions and documented separate IPC/core/QQ identity lifetimes. A subsequent deterministic LAB reproduced old-query resumption and duplicate Disconnected results across same-scope rebind. Resident revocation now irreversibly marks pending queries, reports once and cancels on the owner; five new regressions and final default/research workspace tests pass. Real core-restart recovery and continuous QQ identity loss to global revocation remain open; no new field result or release was produced. On 2026-11-14 after the pinned wrapper text normalization fix, live B-to-A private and designated-group text reached SSE and the durable message store, and authenticated HTTP get_msg returned the same OneBot ID and message fields in both scenarios. A subsequent authenticated OneBot HTTP A-to-B private send returned success, the same persisted message ID was readable through get_msg, and the user observed one message on B. The designated-group OneBot HTTP sample also succeeded, matched sender get_msg and the persisted group identity, and became visible on A and B after B initially did not see it. Other transports and recovery criteria remain pending. 2026-11-24 issue #15 blocker audit: the general UIN/UID resolver, the historical Crashpad path and the explicit wire projection=None are no longer text-MVP blockers. D8 wrapper records carry validated sender/peer UINs and core derives the durable OneBot projection from the wrapper envelope; wrapper_message_chain asserts wire projection=None while get_msg and standard events expose the same identity. The three Crashpad dumps belong to the old research V8 uid-map probe path and remain an unresolved research unknown. New offline transport regressions cover forward WS auth/path/role/arbitrary echo, reverse WS reconnect after application close, a stalled transport writer that cannot block fanout and reports queue loss, and HTTP POST failure that still fans the event out to WS; transport disconnect/loss logs were added. Real third-party OneBot applications and a field slow-client matrix are still pending, so feat-006 stays open and is tracked as in-progress. Details: docs/acceptance/2026-11-24-feat-006-text-mvp.md. 2026-11-24 field pack prepared offline in ignored local-evidence/feat006-field-20261124-unbound: preflight, standalone daemon with HTTP/forward-WS/HTTP-POST/reverse-WS, single qq-entry attach, real NoneBot2 2.5.0 app, HMAC POST receiver with slow mode, forward-WS logger, non-reading WS client, control-pipe stop and owner stop. Rehearsal passed (four listeners, reverse WS get_version_info, forward WS action, POST 204 signature, honest LoginInfo without bridge, graceful stop); pack aggregate d95f22b031783ada31a90b286d3bc842855ca23b881c95f0ef58ef3090598694. It stays unbound/unauthorized/unexecuted pending a fresh designated QQ; no field claim. 2026-11-24 attempt 2 then ran on a fresh QQ generation with the real NoneBot2 app: private/group inbound events (IDs 36/41) reached the app over reverse WS, it replied once each (37/42), app-side and Caligo get_msg both succeeded, the same messages appeared in signed HTTP POST and forward WS, and the ledger matched senders. A delayed POST endpoint plus a non-reading WS client still delivered the slow marker (90) to the app (23 POST failures, 66 delivered, 0 dropped); the slow-phase automatic reply ended DeliveryUnknown and was not replayed. The runner app_get_msg check had a source/outbound ID bug; verify-evidence.py recomputed all nine criteria as true offline without changing the original summary. All three done_criteria now have fixed-build evidence; feat-006 stays in-progress because dependency feat-005 is not done and the product stays NOT READY. Resealed pack aggregate 275d5f2d5aff527c0919f66c410884841746b7e5362ed98a7ccb5e0da35fbd07. Operator confirmed that A received replies 37 (private), 42 (group) and 106 (the slow-phase reply whose internal state stayed DeliveryUnknown); the slow message was not replayed.", "evidence_paths": ["crates/caligo-bridge/tests/query_revocation.rs", "docs/acceptance/2026-11-14-session-revocation.md", "docs/acceptance/2026-11-24-feat-006-text-mvp.md", "docs/plans/2026-10-11-gitnexus-plan-caligo-n4-response-recovery.md", "docs/execution/2026-10-11-n4-response-recovery.md", "docs/execution/2026-11-13-snowcat-capability-integration-continued.md", "crates/caligo-core/tests/onebot_http_lab.rs", "crates/caligo-core/tests/daemon_chain.rs", "crates/caligo-core/tests/recovery_contract.rs", "crates/caligo-core/src/commands/daemon.rs", "crates/caligo-core/src/onebot_server.rs", "crates/caligo-core/src/onebot_transport.rs", "crates/caligo-core/src/onebot_events.rs", "crates/caligo-core/src/daemon.rs", "crates/caligo-core/src/runtime.rs", "crates/caligo-core/src/onebot.rs", "crates/caligo-model/src/capability.rs", "crates/caligo-bridge/src/qq_entry.rs", "crates/caligo-bridge/src/qq_v8.rs", "crates/caligo-bridge/tests/fixtures/scoped-self-profile-contract.cjs", "crates/caligo-core/tests/onebot_query_lab.rs", "crates/caligo-core/tests/daemon_client_lab.rs", "crates/caligo-core/src/onebot_http.rs", "crates/caligo-core/src/message_store.rs", "docs/plans/2026-10-09-gitnexus-plan-caligo-snowluma-capability-parity.md"], "done_criteria": ["身份与持久 OneBot ID 查询一致", "目标 HTTP/WS transport 有标准协议测试", "真实应用普通文本收发/get_msg 及慢连接有同链证据"] }, diff --git a/progress.md b/progress.md index 5b5cd685..e9c5daa9 100644 --- a/progress.md +++ b/progress.md @@ -2,7 +2,7 @@ ## Current State -2026-11-24 feat-006 现场 attempt 2(通过,单构建,issue #15):新 QQ `31584`(创建 `2026-11-24T13:40:42.5671257Z`,登记账号 B)通过 preflight,一次 attach,`get_login_info` 返回同一账号。对端 A 发送私聊 36 与群 41,NoneBot 反向 WS 收到并各回复一次(37/42),应用与 Caligo `get_msg` 均成功;账本保存 36/37/41/42,发送方 A/B 正确;同一 36/41 同时有签名通过的 HTTP POST 与正向 WS 证据。慢阶段 90 在 8 秒慢 POST、5 秒超时下仍到达应用(慢 POST 积压后约 38 秒),daemon 记录 23 次 POST 失败、66 次送达、0 丢弃,非读取 WS 客户端不影响应用连接;该阶段自动回复请求 `onebot-85939363ae79fe15-4` 以 `DeliveryUnknown` 结束(账本另存自发消息 106),未重发。控制管道正常停止 daemon;默认生产 bridge 无 research owner-stop(`0xe0`),bridge 保留、QQ 仍响应、未热卸载。原始 runner 的 `app_get_msg` 检查存在 source/outbound ID 比较缺陷,导致 `summary.json` 两项 false negative;`verify-evidence.py` 在不改原 summary、不重发的前提下离线重算,9 项 criteria 全 true、overall pass。feat-006 保持 in-progress(依赖 feat-005 未 done),产品 NOT READY;慢 POST 积压延迟 WS 与慢阶段回复 unknown 列入后续风险。原始材料只在 ignored `local-evidence/feat006-field-20261124-unbound/`。 +2026-11-24 feat-006 现场 attempt 2(通过,单构建,issue #15):新 QQ `31584`(创建 `2026-11-24T13:40:42.5671257Z`,登记账号 B)通过 preflight,一次 attach,`get_login_info` 返回同一账号。对端 A 发送私聊 36 与群 41,NoneBot 反向 WS 收到并各回复一次(37/42),应用与 Caligo `get_msg` 均成功;账本保存 36/37/41/42,发送方 A/B 正确;同一 36/41 同时有签名通过的 HTTP POST 与正向 WS 证据。慢阶段 90 在 8 秒慢 POST、5 秒超时下仍到达应用(慢 POST 积压后约 38 秒),daemon 记录 23 次 POST 失败、66 次送达、0 丢弃,非读取 WS 客户端不影响应用连接;该阶段自动回复请求 `onebot-85939363ae79fe15-4` 以 `DeliveryUnknown` 结束(账本另存自发消息 106),未重发;操作者确认 A 已收到该慢回复(106)。控制管道正常停止 daemon;默认生产 bridge 无 research owner-stop(`0xe0`),bridge 保留、QQ 仍响应、未热卸载。原始 runner 的 `app_get_msg` 检查存在 source/outbound ID 比较缺陷,导致 `summary.json` 两项 false negative;`verify-evidence.py` 在不改原 summary、不重发的前提下离线重算,9 项 criteria 全 true、overall pass。feat-006 保持 in-progress(依赖 feat-005 未 done),产品 NOT READY;慢 POST 积压延迟 WS 与慢阶段回复 unknown 列入后续风险。原始材料只在 ignored `local-evidence/feat006-field-20261124-unbound/`。 2026-11-24 feat-006 现场 attempt 1(失败,零发送):新 QQ `34608` preflight PASS,`cli qq-entry` 实际接入成功(bridge 映射、`listener_armed`、daemon 客户端启动),但 `attach.ps1` 用 attach 前缓存的进程模块快照复查映射而误报失败;runner 按失败路径正常停止 core。正常 Stop 使 bridge 的 daemon worker 收到 `CoreStopped` 后退出,同 pipe 重启 core 60 秒无 Hello,实例消耗。默认生产 bridge 不提供 research owner-stop(退出码 `0xe0`),按边界保留映射、未热卸载,QQ 仍响应;全程零发送、零入站、零账本业务记录。已修:attach 后刷新进程快照;attach 非零但 bridge 已映射时记录 `attach_script_warning` 并继续;owner-stop 在默认 bridge 上归类为 `unavailable_default_bridge`,不作为重试理由。细节在 ignored `local-evidence/feat006-field-20261124-unbound/attempt-1.private.md`;下一轮使用重新登录的新实例,不复用 `34608`。 diff --git a/session-handoff.md b/session-handoff.md index 135faf44..66a3e2f1 100644 --- a/session-handoff.md +++ b/session-handoff.md @@ -1,6 +1,6 @@ # Session handoff -2026-11-24 feat-006 现场 attempt 2 通过(issue #15):新 QQ `31584` 一次 attach,NoneBot2 经反向 WS 收到私聊 36 / 群 41,各回复一次(37/42);应用与 Caligo `get_msg` 均成功,账本与发送方一致;同一消息有签名 HTTP POST 与正向 WS 证据。慢阶段 90 在慢 POST/超时下仍到达应用(积压后约 38 秒),daemon 记录 23 failed / 66 delivered / 0 dropped;该阶段自动回复请求 `onebot-85939363ae79fe15-4` 为 `DeliveryUnknown`(账本另存自发消息 106),未重发。控制停止 daemon;默认 bridge 无 research owner-stop(0xe0),bridge 保留、QQ 响应。runner 的 `app_get_msg` 误报已由 `verify-evidence.py` 离线更正,9/9 criteria true。待操作者确认对端可见性后关闭 issue #15;feat-006 保持 in-progress(依赖 feat-005 未 done),慢 POST 积压延迟 WS 投递列为后续风险。证据见 [acceptance §6.2](docs/acceptance/2026-11-24-feat-006-text-mvp.md#62-现场-attempt-2通过单构建)。 +2026-11-24 feat-006 现场 attempt 2 通过(issue #15):新 QQ `31584` 一次 attach,NoneBot2 经反向 WS 收到私聊 36 / 群 41,各回复一次(37/42);应用与 Caligo `get_msg` 均成功,账本与发送方一致;同一消息有签名 HTTP POST 与正向 WS 证据。慢阶段 90 在慢 POST/超时下仍到达应用(积压后约 38 秒),daemon 记录 23 failed / 66 delivered / 0 dropped;该阶段自动回复请求 `onebot-85939363ae79fe15-4` 为 `DeliveryUnknown`(账本另存自发消息 106),未重发。控制停止 daemon;默认 bridge 无 research owner-stop(0xe0),bridge 保留、QQ 响应。runner 的 `app_get_msg` 误报已由 `verify-evidence.py` 离线更正,9/9 criteria true。操作者已确认 A 收到 37、42、106;issue #15 按证据关闭;feat-006 保持 in-progress(依赖 feat-005 未 done),慢 POST 积压延迟 WS 投递列为后续风险。证据见 [acceptance §6.2](docs/acceptance/2026-11-24-feat-006-text-mvp.md#62-现场-attempt-2通过单构建)。 2026-11-24 PR #20(`codex/feat-006-text-mvp` → `main`):issue #15 阻塞点判定、传输协议/慢连接回归与可观测日志、现场包与 attempt 记录已提交推送;分支含 `3d2ef1b`/`cfc9168`/`109140e`/`6983f77`/`a7b62d6` 及现场记录提交。GitNexus 刷新索引后 detect 8 files / 34 symbols / 14 flows / high、`impact serve_ws_socket` CRITICAL 已核对(改动为日志/测试路径)。全仓 default 506 / research 566,0 failed。