fix(news): repair instead of block in daily news generation and push
Memind CI / Test, build, and release guards (push) Successful in 4m43s
Memind CI / Test, build, and release guards (push) Successful in 4m43s
- news002 image/structure audit no longer throws: prune empty sections and publish a best-effort page with a warning - WeChat push strips images that failed to upload instead of refusing the draft - forceGenerateOnce is cleared before running, so a failed run cannot loop; the archived page is restored when generation fails - degraded-page regeneration runs at most once per day - content safety rules cover vulgar sexual terms and gossip/adult sites Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -39,7 +39,7 @@ DB 值优先于环境变量。非法值一律回落到 `news001`。
|
||||
- 每张卡片必须带 `data-event-key="{事件指纹}"`,指纹 = 核心主体 + 核心动作,
|
||||
中英文报道共用同一指纹,全页不得重复。
|
||||
|
||||
### 2. 运行时去重闸门
|
||||
### 2. 运行时去重
|
||||
|
||||
prompt 层的「禁止重复」无法验证,所以在落盘后再做一次程序化清理:
|
||||
[`wechat-news-morning-dedup.mjs`](../wechat-news-morning-dedup.mjs),由 worker 在生成成功后调用。
|
||||
@@ -102,9 +102,15 @@ news002 的卡片图会先上传到微信正文素材接口,再由 inline 渲
|
||||
静态页与微信草稿均使用 **左上角 72~92px 小图**(`.card` / `.lead-card` 左侧缩略图),不再用全宽大图。
|
||||
能拿到真实配图的卡片必须显示并上传;没有真实图就只保留文字卡,不放默认小图。
|
||||
远程配图会先下载到当日 MindSpace `public/`,改写成本站相对 URL,避免海外图源在国内打不开。
|
||||
推送前不再删除无图故事卡(微信草稿保留纯文字卡);有图卡必须成功上传微信 CDN。
|
||||
生成闸门会拦截:配图上传失败、头条不是 3~4 条、事件卡超过 30 条,或页面仍混有 news001 DOM,
|
||||
才会由生成/推送闸门阻断,不允许进入草稿箱。
|
||||
推送前不再删除无图故事卡(微信草稿保留纯文字卡);有图卡未能上传微信 CDN 时只去掉该图,卡片保留文字。
|
||||
|
||||
配图 / 结构 / 写满检查**只引导修复、不阻断生成和推送**:
|
||||
检查不过时依次做 SearXNG 补位、补图、头条规整;仍不满足就删掉完全空的栏目,
|
||||
以现有内容出稿并照常推草稿,同时记 `news002 audit incomplete, publishing best-effort page` 告警。
|
||||
|
||||
强制重生成(`forceGenerateOnce`)在执行前就清掉标记,只跑一次、失败不重试;
|
||||
生成失败时把归档的原稿放回原位,当日页面不会因重生成失败而 404。
|
||||
降级页自动重生成每天最多一次。
|
||||
|
||||
真实图片来源按优先级取 SearXNG 结果里的 `img_src`/`thumbnail`,以及文章来源的
|
||||
`og:image:secure_url`、`og:image`、`twitter:image`;不使用与事件无法核验关系的泛图片搜索结果。
|
||||
|
||||
Reference in New Issue
Block a user