Skip to content

feat(sync): complete CDS-backed Wire 1.4 synchronization - #188

Merged
lioensky merged 60 commits into
lioensky:mainfrom
MRiecy:agent/vcpmobile-sync-error-contract-1-2
Aug 29, 2026
Merged

feat(sync): complete CDS-backed Wire 1.4 synchronization#188
lioensky merged 60 commits into
lioensky:mainfrom
MRiecy:agent/vcpmobile-sync-error-contract-1-2

Conversation

@MRiecy

@MRiecy MRiecy commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 将 VCPMobileSync 硬切到最终 Wire 1.4,并以 protocolVersion 作为唯一兼容性真源;插件版本仅保留为诊断信息。
  • 统一 Mobile、Legacy 与 VCP-CDS 的复合 Owner/Topic/Message 身份、UTF-8 canonical JSON、聚合 Hash、消息 LWW 与墓碑仲裁。
  • 将 CDS internal protocol/schema 对齐到 3,保证 reconcile、Manifest、流式 Pull/Push、物理 history.json 写回与索引提交视图一致。
  • 修复损坏 Owner 隔离、物理 Topic 恢复顺序、来源证据校验、默认 Topic 复用和 Desktop 扩展字段往返丢失。
  • 附件二进制继续只保留在两端本机 CAS;Wire 仅传输消息内附件元数据与 Hash。
  • 补齐跨语言 golden vectors、删除/恢复矩阵、失败合同、NDJSON 流式与 Electron 打包链路测试。

Integration boundaries

  • modules/services/chatDataService/{client,lifecycle}.js 对齐 CDS Protocol 3 / Schema 3 握手。
  • modules/renderer/messageContextMenu.js 在桌面消息编辑时推进 updatedAt,供消息级 LWW 使用并在保存失败时回滚。
  • modules/ipc/chatHandlers.js 删除最后一个 Topic 后创建唯一 topic_<timestamp>,避免复用已带墓碑的固定 default ID。
  • package.json 将新增 SQLite 删除与 degraded-mode 契约测试纳入 test:mobile-sync
  • 本 PR 同步提交 modules/services/chatDataService/bin/win32-x64/vcp_chat_data_service.exe,供无 Rust 环境的 Windows x64 源码用户直接使用;其他平台及正式 pack/dist 仍在目标平台执行 npm run build

Compatibility

  • 已发布 VCPMobile v1.1.5 使用 Wire 1.2,与本 PR 不兼容,这是预期的严格握手行为。
  • 本 PR 应与下一版 VCPMobile(计划为 1.1.6)的 Wire 1.4 实现配套发布或回滚。
  • 不提供 Wire 1.2/1.3 双栈、字段别名或迁移状态机。

Validation

  • npm run test:mobile-sync — 83 passed
  • cargo test --locked — 59 passed
  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo clippy --locked --target x86_64-pc-windows-gnu --all-targets -- -D warnings
  • cargo build --release --locked --target x86_64-pc-windows-gnu
  • Windows EXE:PE32+ x86-64,SHA-256 f6d4274faa21ae54a0d231c0e9b51b2a7cfaaaf1d184ec46b11257696d921e41
  • node --check:CDS build/runtime client/lifecycle/index 与 Central Adapter
  • git diff --check origin/main...HEAD
  • VCPMobile ↔ VCPChat/CDS Android 真机完整同步闭环人工验证通过

MRiecy added 30 commits August 22, 2026 00:49
MRiecy added 26 commits August 25, 2026 23:48
@MRiecy MRiecy closed this Aug 29, 2026
@MRiecy MRiecy reopened this Aug 29, 2026
@MRiecy

MRiecy commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

本地已在 61d9511d 的干净临时 worktree 复现并补跑 CI,补充证据如下:

  • npm ci --ignore-scriptsnpm run test:mobile-sync:83/83 通过。
  • CDS:cargo fmt --check、59/59 tests、Clippy -D warnings 通过。
  • Electron unpacked smoke:CDS Release build、native rebuild、electron-builder unpacked package、packaged runtime contract 全部通过。
  • Android 真机 Mobile ↔ VCPChat/CDS 完整同步闭环已人工验证通过。

当前 Node contract tests 红灯来自 workflow 在执行 npm run test:mobile-sync 前没有安装依赖,干净 checkout 报 Cannot find module 'express';安装锁定依赖后测试全绿。

Chat Kernel and UI gatesmodules/**tests/**package.json 的宽泛 paths 触发。干净本地复现还发现该 workflow 引用了已不存在的脚本及陈旧 UI/event-graph 基线;对应失败文件不在本 PR 差异中。同步/CDS 专项门禁与打包链路的结果见上。

@lioensky
lioensky merged commit 33b8fe1 into lioensky:main Aug 29, 2026
4 of 8 checks 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.

2 participants