Skip to content

修复 #3:以手动快照同步替代微信增量轮询 - #7

Merged
NytePlus merged 4 commits into
codex/wechat-integrationfrom
codex/issue-3-manual-sync
Sep 17, 2026
Merged

NytePlus merged 4 commits into
codex/wechat-integrationfrom
codex/issue-3-manual-sync

Conversation

@NytePlus

@NytePlus NytePlus commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Closes #3.

wechat_get_updates previously polled an archive that never imported new messages after the initial load. Replace that behavior with explicit wechat_sync(conversation) and a 手动同步 button on each approved conversation. Approval leaves a new conversation waiting for its first manual sync; query tools read the resulting archive without polling.

The pinned backend reads a finite snapshot from each source shard and resumes saved rowid positions, deferring subsequent arrivals until the next sync. It commits messages and cursors together, includes late/backdated newly appended rows and discovers new shards. Every archive read, including empty results and media tool responses, reports last_synced_at (null until first successful sync); lists/status carry the time per conversation. Failed syncs leave the time unchanged. Archive-only updates do not suggest a live source check. The obsolete session-index readiness error no longer blocks manual sync.

  • Backend dependency: Add manual snapshot sync for iMCP conversations wx-cli#1
  • Validation: native macOS Xcode Debug build succeeded; 132 Rust unit tests passed (including the latest 12 backend tests); diff whitespace checks passed. Docker daemon was unavailable. Signed release installed and process launch verified; real-account sync and full UI acceptance were not exercised.
  • Complexity: O(Δ) message visits/decoding, plus shard discovery and indexed seek/write/FTS overhead; no historical message scan. Full details are in Docs/WeChat/IMPLEMENTATION.md.
  • Boundaries: snapshots are per database file, not a globally atomic instant; first-observed append semantics do not detect in-place edits or reused rowids. Initial history imports have a 300-second client timeout and roll back on termination.

WeChat settings use the positive “图片配置可用” status (requiring a configured image key and no config error). Remove the “WeChat 自用构建 · 自动更新已关闭” text below Settings.

@NytePlus NytePlus added bug Something isn't working enhancement New feature or request labels Sep 16, 2026
@NytePlus NytePlus self-assigned this Sep 16, 2026
@NytePlus
NytePlus merged commit 8cbe28f into codex/wechat-integration Sep 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

增量接口失效

1 participant