feat(wechat): channel split with stub-safe page delivery #2

Merged
tkmind merged 1 commits from feature/wechat-channel-split into main 2026-07-04 05:21:14 +00:00
Owner

Summary

  • Introduce independent wechat/ package for service-account logic (intent classifier, page-generate prompt/handler, artifact verify) without touching H5 chat/finish paths.
  • Route page.generate intents through dedicated prompt and resolvePageGenerateOutcome() instead of generic chat guards.
  • P0 fix: stub HTML (服务号自动补出简版页面 etc.) is never sent to users; page failures always notify via customer service text.
  • Wire wechat-mp.mjs to use channel modules; failure copy updated to service-account wording.

Test plan

  • node --test wechat/wechat-channel.test.mjs wechat-mp.test.mjs (65 pass)
  • After merge: bash scripts/deploy-wechat-mp-prod.sh to 103
  • Tang user: send「帮我生成一个唐诗页面,放一首诗」— expect real page link or explicit failure, never stub link

Follow-up (separate PR)

  • Migrate chat.general / schedule handlers out of wechat-mp.mjs
  • Further thin webhook adapter layer
## Summary - Introduce independent `wechat/` package for service-account logic (intent classifier, page-generate prompt/handler, artifact verify) without touching H5 chat/finish paths. - Route `page.generate` intents through dedicated prompt and `resolvePageGenerateOutcome()` instead of generic chat guards. - **P0 fix:** stub HTML (`服务号自动补出简版页面` etc.) is never sent to users; page failures always notify via customer service text. - Wire `wechat-mp.mjs` to use channel modules; failure copy updated to service-account wording. ## Test plan - [x] `node --test wechat/wechat-channel.test.mjs wechat-mp.test.mjs` (65 pass) - [ ] After merge: `bash scripts/deploy-wechat-mp-prod.sh` to 103 - [ ] Tang user: send「帮我生成一个唐诗页面,放一首诗」— expect real page link or explicit failure, never stub link ## Follow-up (separate PR) - Migrate `chat.general` / `schedule` handlers out of `wechat-mp.mjs` - Further thin webhook adapter layer
tkmind added 1 commit 2026-07-04 05:08:29 +00:00
Introduce wechat/ package (classifier, page-generate prompt/handler, artifact
verify) and wire page.generate intents through dedicated flow. Stub HTML
artifacts are never sent to users; page failures notify via customer service.

Co-authored-by: Cursor <cursoragent@cursor.com>
tkmind merged commit 2a3579c73a into main 2026-07-04 05:21:14 +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#2