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

Introduce wechat/ channel package; never send stub HTML links to service-account users.
This commit was merged in pull request #2.
This commit is contained in:
2026-07-04 05:21:13 +00:00
parent f36e8b9292
commit 2a3579c73a
8 changed files with 413 additions and 24 deletions
+2 -2
View File
@@ -329,7 +329,7 @@ test('wechat mp service rejects blocked publish claims that did not use the H5 p
const sendCall = wechatCalls.find(([url]) => String(url).includes('/cgi-bin/message/custom/send'));
const payload = JSON.parse(sendCall[2]);
assert.doesNotMatch(payload.text.content, /成功发布|主题页面已发布/);
assert.match(payload.text.content, /没有按 H5 里的页面技能真正生成成功/);
assert.match(payload.text.content, /服务号页面技能|没有按 H5 里的页面技能/);
assert.doesNotMatch(payload.text.content, /summer-breeze-journal\.html/);
});
@@ -2576,7 +2576,7 @@ test('wechat mp service does not trust unrelated recent html artifacts when repl
const payload = JSON.parse(sendCall[2]);
assert.doesNotMatch(payload.text.content, /https:\/\/m\.tkmind\.cn\/MindSpace\/.+\/public\/hello\.html/);
assert.doesNotMatch(payload.text.content, /summer-breeze-journal\.html/);
assert.match(payload.text.content, /没有按 H5 里的页面技能真正生成成功|页面生成未完成/);
assert.match(payload.text.content, /服务号页面技能|没有按 H5 里的页面技能|页面生成未完成/);
});
test('wechat mp service forwards H5 agent text when page generation produced no file or fake link', async () => {