From 000f9e4290b778306fbf00b94831e09cb6d61400 Mon Sep 17 00:00:00 2001 From: Joywayer Date: Thu, 27 Aug 2026 21:26:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(plan):=20=E4=BF=AE=E6=AD=A3=20Task=203=20?= =?UTF-8?q?=E7=BB=99=E5=AE=9A=E4=BB=A3=E7=A0=81=E9=87=8C=E6=81=92=E4=B8=BA?= =?UTF-8?q?=20false=20=E7=9A=84=E4=BE=8B=E5=A4=96=E9=80=9A=E9=81=93?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 计划里写的 !ovSet.has(`${rel}.meta`) 恒为 false —— ovSet 由 listAssets 构建, 而 listAssets 明确排除 .meta, 故「override 自带 meta 改尺寸」的例外通道永不生效。 改为 existsSync 查磁盘。该 bug 由 Task 3 的 TDD RED 信号暴露, 实现者已在代码中修正, 此处同步计划文档避免重跑时重新引入。 Co-Authored-By: Claude Opus 5 (1M context) --- docs/superpowers/plans/2026-08-27-ui-asset-and-skin.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/superpowers/plans/2026-08-27-ui-asset-and-skin.md b/docs/superpowers/plans/2026-08-27-ui-asset-and-skin.md index 72b6d43..c56beda 100644 --- a/docs/superpowers/plans/2026-08-27-ui-asset-and-skin.md +++ b/docs/superpowers/plans/2026-08-27-ui-asset-and-skin.md @@ -691,8 +691,11 @@ export function validateOverrides(frameworkUiDir, overrideDir) { } // Spine 贴图豁免尺寸校验(区域坐标在 .atlas 内,整套替换时自洽) + // 注意:override 是否自带 .meta 必须用 existsSync 查磁盘——listAssets 排除了 .meta, + // 故 ovSet 里永远没有 .meta 项,用 ovSet.has 会让例外通道永不生效。 + const metaPath = join(overrideDir, ...`${rel}.meta`.split(posix.sep)); const needSizeCheck = - isImage(rel) && !isSpine(rel) && !ovSet.has(`${rel}.meta`); + isImage(rel) && !isSpine(rel) && !existsSync(metaPath); if (needSizeCheck) { const a = readPngSize(join(frameworkUiDir, ...rel.split(posix.sep))); const b = readPngSize(join(overrideDir, ...rel.split(posix.sep)));