fix(brand): require TKMind platform marker on wechat page delivery

Backfill missing platform-brand footer at serve time and block service-
account links when the HTML file omits data-mindspace-page-tag.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-04 14:15:42 +08:00
parent cd81c4b2bb
commit b5a88d9746
8 changed files with 79 additions and 14 deletions
+6
View File
@@ -1,5 +1,8 @@
import fs from 'node:fs';
import { artifactFileExists } from './page-artifact.mjs';
import { hasPlatformBrandMarker } from '../../mindspace-page-tag.mjs';
export { hasPlatformBrandMarker };
const RASTER_IMAGE_PATTERN = /\.(png|jpe?g|webp|gif)(?:[?#]|$)/i;
@@ -48,6 +51,9 @@ export function verifySharePreviewMeta(html) {
if (!hasShareDescription(html)) {
return { ok: false, reason: 'missing_description' };
}
if (!hasPlatformBrandMarker(html)) {
return { ok: false, reason: 'missing_platform_brand' };
}
return { ok: true, reason: null };
}