fix: 修复微信历史图片会话污染和页面链接误追加 #25

Merged
tkmind merged 1 commits from codex/fix-wechat-session-page-links into main 2026-07-22 06:16:27 +00:00
Owner

问题

  • 微信专属会话历史 image_url 触发上游 400,导致同一用户持续失败。
  • 换新会话未被识别为重置指令。
  • 布局同步重复覆盖历史 HTML 并刷新 mtime,普通聊天会误追加查看页面链接。

修复

  • 微信提交前隔离历史图片;上游不支持会话更新时自动轮换新会话并重试。
  • 扩展会话重置指令。
  • 页面产物判定仅使用本轮消息;普通聊天不再扫描历史 HTML。
  • 工作区资源同步改为只补缺,不覆盖已有 Agent 编辑。
  • H5 默认代理行为不变,页面生成仍交付本轮有效页面。

验证

  • npm test
  • npm run build
  • npm run verify:mindspace-publish-guards:full
  • npm run verify:mindspace-page-sync-guards
  • npm run verify:h5-session-patches
  • npm run verify:wechat-channel-isolation
  • npm run verify:page-data
  • 新增历史 image_url、换新会话、普通聊天误链接、405 自动换会话等回归测试。

已知主线基线

  • tkmind-proxy.test.mjs 的 runtimeControl 契约断言在干净 main 已存在失败,与本 PR 无关;本 PR 新增代理专项测试通过。
## 问题 - 微信专属会话历史 image_url 触发上游 400,导致同一用户持续失败。 - 换新会话未被识别为重置指令。 - 布局同步重复覆盖历史 HTML 并刷新 mtime,普通聊天会误追加查看页面链接。 ## 修复 - 微信提交前隔离历史图片;上游不支持会话更新时自动轮换新会话并重试。 - 扩展会话重置指令。 - 页面产物判定仅使用本轮消息;普通聊天不再扫描历史 HTML。 - 工作区资源同步改为只补缺,不覆盖已有 Agent 编辑。 - H5 默认代理行为不变,页面生成仍交付本轮有效页面。 ## 验证 - npm test - npm run build - npm run verify:mindspace-publish-guards:full - npm run verify:mindspace-page-sync-guards - npm run verify:h5-session-patches - npm run verify:wechat-channel-isolation - npm run verify:page-data - 新增历史 image_url、换新会话、普通聊天误链接、405 自动换会话等回归测试。 ## 已知主线基线 - tkmind-proxy.test.mjs 的 runtimeControl 契约断言在干净 main 已存在失败,与本 PR 无关;本 PR 新增代理专项测试通过。
tkmind added 1 commit 2026-07-22 06:10:21 +00:00
fix(wechat): isolate stale images and page links
Memind CI / Test, build, and release guards (pull_request) Successful in 2m36s
db225b784e
tkmind merged commit d81e798b28 into main 2026-07-22 06:16:27 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tkmind/memind#25