Skip to content

feat(n6): rich @/reply, image boundaries, and SILK encoder - #22

Merged
Eternal-Wanderer-Vegetable merged 41 commits into
mainfrom
codex/feat-008-n6
Dec 5, 2026
Merged

Eternal-Wanderer-Vegetable merged 41 commits into
mainfrom
codex/feat-008-n6

Conversation

@Eternal-Wanderer-Vegetable

@Eternal-Wanderer-Vegetable Eternal-Wanderer-Vegetable commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

目标

闭合 issue #17 在本测试范围内的 @/reply、图片与语音能力边界;未支持的媒体显式拒绝,不假成功。

已包含

  • 入站/出站 mention/reply:群/私聊 reply、普通成员 @、admin 群 @ALL,add/update + getMsgsByMsgId 精确回执;
  • 本地 message_id 与原生 replayMsgId 映射;跨会话 1400、非成员 1440、未知段 1404;
  • 图片上传引用、私聊/群发送、持久媒体 ID、不可用显式失败;
  • 语音 SILK 收发与 silk/wav/ogg 下载转码;新增可选 silk_encoder、wav-silk/ogg-silk(真实 187 KB WAV→470 B SILK,14 KB OGG→581 B SILK);
  • 文件/视频/合并转发/卡片/表情/markdown 统一显式 1404,不回退文本;
  • 放弃不可证的 native SSO/OIDB 上传(sendSsoCmdReqByContend 均 145)。

边界

feat-008 仍为 in-progress;native 上传 hook、视频/文件、结构化段、非 PNG、native 资源寿命、WAV/OGG 自动发送拆分为 #23–#29,未验项不外推。

验证

  • init.ps1 -Mode default(CI 同命令)
  • cargo test -p caligo-core --test media_tool_lab → 8 passed / 1 ignored
  • node scripts/check-docs.mjs → PASS

CI 修复后请手动合并。

- add ordered reply/mention segments, local<->native id mapping, pilot GroupMemberUid lookup and capability advertisement
- build qq_rich_send for group/private reply and @/@ALL, confirm via add/update plus getMsgsByMsgId readback, reject unknown/cross-conversation/unsupported explicitly
- preserve inbound at/reply segments in store, events and get_msg; accept reply textElement and @ALL shapes in D8
- record field matrix: self/he-fa, group/private, restart, @ALL, and 1400/1440/1404 rejections; default 526 / research 586
- map an empty getMsgsByMsgId result to rejected 404 for image/voice queries instead of invalid_response
- add image/voice empty-readback regressions
- record cross-generation media-lifetime boundary: get_msg persists, old image get_image still 1440 without bytes; release7 field remains an identity/readback gap
- file element type 3 was explicitly rejected with no private event or store record
- no distinct video element type was captured; video evidence remains open
- private elementType 5 was observed and rejected with no event or store record
- file and video rejection now have independent field evidence; send/upload/lifetime remain open
- record file/video explicit rejection and cross-restart get_image boundary
- keep feat-008 in-progress pending real send/upload/transcode/recovery
- add upload_image/delete_image_upload actions and a daemon-scoped upload store (8 resources, 1 MiB, 10 min TTL)
- accept caligo-upload ids in image sends; unknown, expired, cross-account or deleted ids are explicit 1404
- keep native QQ upload/media id inside send; document this slice as Caligo resource upload/lifetime only
- add store, action, daemon-sink and upload-to-send lab regressions; default 532 / research 592
- upload/delete work over the standalone daemon HTTP API; send without a session is explicit 1404
- release hashes and default 532 / research 592 recorded; native QQ field remains pending
- upload/delete and upload-id resolution worked in the real daemon
- both upload-id and base64 image sends failed with native code 3; no fake success
- record the scope overrun and stop retrying; native failure needs a text/private control
- distinguish missing process.getBuiltinModule and native image APIs in the image script
- emit a bounded image_send_error stage instead of collapsing every preparation failure to code 3
- targeted bridge lib 110 and image lab 7 pass; full suite hit an unrelated websocket test hang
- accept object filePath/path returns and normalize string paths
- use canonical realpath(parent) for the cache write instead of rejecting short/normalized path differences
- keep absolute/drive/md5 basename checks and add bounded parent/type labels
- field: upload id sent a 4,592 B PNG to private B; message_id 3 and get_msg/store image identity match
- wrapper_image_contract 5/5 and image lab 7 passed; full suite hit an unrelated websocket hang
- group 629933025 accepted the uploaded 320x160 PNG; message_id 2 and get_msg/store identity match
- private and group image send by upload id now have field evidence
- add a bounded image_receipt stage for fileUuid/fileSubId/fileName/sourcePath/thumb/original/summary
- sanitizer allows only missing/empty/nonempty/string/number/boolean/object labels
- field shows a non-empty fileUuid and empty fileSubId; values are not persisted or exposed yet
- sanitizer regression and wrapper_media_result 2/2 pass
- add optional ImageInfo.file_uuid, populated from query and send receipt picElement.fileUuid
- keep private path fields out; same_media tolerates old stores without a media id
- expose file_id in get_msg image data when present
- field: private 320x160 image message_id 2 carries the native fileUuid in get_msg and store
- wrapper_image_contract 5/5 and image lab 7/7 pass
- get_msg keeps the persisted file_id across a QQ restart
- get_image on the same token returns 1440 with no bytes; fileUuid does not provide independent refetch
- no retry or fake success; the generic failure still needs an explicit unavailable mapping
- bridge maps image readback semantic failures to rejected 404 image message unavailable
- core maps image query InvalidResponse to 1440 picture resource unavailable or expired
- malformed protocol responses keep the original invalid contract
- field: expired private image now returns 1440 picture resource unavailable or expired with no bytes
- capability_query_lab 14/14 and wrapper_image_contract 5/5 pass
- add --media-config to n5 soak and pass it to the daemon
- enables get_record wav/ogg field verification with the pinned rust-silk/ffmpeg config
- daemon_args returned before appending --media-config; the field daemon started without media tools
- get_record wav/ogg returned 1404 not configured even though the pinned config exists
- assign args first and append the absolute media config; py_compile passes
- media tools loaded successfully with the private work root
- get_record silk timed out with a null-chat, unregistered voice callback path
- wav/ogg were blocked by 409 in-flight; no bytes or transcode evidence
- accept incoming voice callbacks under account/nt_qq/nt_data/Ptt/YYYY-MM/Ori with the matching md5 and extension
- add bounded path shape fields to media diagnostics
- field: registered_path_matches=true but output validation still fails; get_record remains 1440 with no bytes
- wrapper_query_contract 8/8 passes
- record size_matches, silk_header, amr_header and extension before voice output validation
- keep the labels pilot-only and value-free; sanitizer accepts only bounded labels
- wrapper_query_contract 8/8 passes; field shape sample still pending
- accept the canonical realpath for voice callbacks after PTT path/md5/size/header checks
- field: 7,202 B TEN SILK returned; WAV RIFF and OggS outputs verified immediately after
- no resend or fake success; wrapper_query_contract 8/8
- forward/json/face/video/file/markdown outbound segments return 1404 and never fall back to text
- record the N6c capability matrix: voice/transcode/image passed; video/file/forward/card/emoji await native protocol evidence
- report only boolean presence of session RichMediaService and MsgService/RichMediaService sendFile/uploadFile
- field: session_rich_service=true, all five file send/upload probes false
- keep video/file/forward/card/emoji on explicit 1404; do not guess a native route
- expose bounded rich_methods/msg_methods labels from the live wrapper services
- field finds RichMediaService.uploadRMFileWithoutMsg (one argument) plus file/video download helpers
- MsgService has no sendFile/uploadFile; do not call or guess the upload schema
- keep video/file/forward/card/emoji on explicit 1404
- document uploadRMFileWithoutMsg({bizType,filePath,peerUid,transferId,useNTV2}) from the pinned reference
- record RMBizTypeEnum C2C/group file/video/ptt values
- state no call was made; transferId/useNTV2/result shape lack field evidence
- uploadRMFileWithoutMsg accepted the five fields and returned undefined
- no promise, no exception, no message; no upload result or file ID
- temporary probe reverted; video/file send remains explicit 1404
- 0x11E9 file and 0x11C5 image both return 145 request packet parse failure
- getSsoBufferOfOidbReq returns a 721/722-byte Uint8Array, not OidbSvcTrpcTcpBase
- Buffer, base64, and hex through sendSsoCmdReqByContend all return 145
- temporary probes reverted; next requires a native sendPacket hook, video/file stay 1404
- abandon native SSO/OIDB upload for this generation
- retain the verified wrapper image/voice path
- keep file/video/forward/card/emoji on explicit 1404, no fake success
- feat-008 remains in-progress; unsupported media not extrapolated
- configure an explicit silk_encoder with hash/version/license checks
- decode WAV/OGG to 24 kHz mono PCM with ffmpeg, then encode Tencent SILK v3
- add wav-silk/ogg-silk CLI operations; no automatic QQ send
- real tools: 187 KB WAV -> 470 B SILK, 14 KB OGG -> 581 B SILK
- media_tool_lab 8 passed / 1 ignored
@Eternal-Wanderer-Vegetable Eternal-Wanderer-Vegetable changed the title feat(n6a): rich @/reply send, receipts, and field matrix feat(n6): rich @/reply, image boundaries, and SILK encoder Dec 5, 2026
- expect the specific invalid_image_storage_basename_other_png label
- include segmentShapes/mediaCapabilities in the poll-budget size estimate
- local targeted tests: wrapper_image_send 3 passed; wrapper_poll_budget 3 passed
- use a media token for fileUuid, which is the intended observable media ID
- still assert filePath/sourcePath private markers never reach the D8 poll wire
- wrapper_image_chain passes locally
@Eternal-Wanderer-Vegetable
Eternal-Wanderer-Vegetable marked this pull request as ready for review December 5, 2026 08:22
@Eternal-Wanderer-Vegetable
Eternal-Wanderer-Vegetable merged commit 9eced71 into main Dec 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant