From 72c7135cf862cb7023d4b435e3999ff4d328f67d Mon Sep 17 00:00:00 2001 From: leether Date: Wed, 25 Nov 2026 15:45:47 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20Lint=20workflow=20=E5=8A=A0=E8=B7=91=20te?= =?UTF-8?q?st-css-declaration-count.mjs=EF=BC=8C=E5=B9=B6=E5=9C=A8?= =?UTF-8?q?=E8=87=AA=E8=BA=AB=E6=94=B9=E5=8A=A8=E6=97=B6=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #19 新增的 test-css-declaration-count.mjs 只接入了 npm run check, Lint workflow 的测试列表是写死的,CI 并不会跑到它。 - Run generated check tests 增加该测试 - push / pull_request 的 paths 增加 .github/workflows/lint.yml: 否则只改 workflow 时 CI 不会运行,这次改动也无法在合并前被验证 --- .github/workflows/lint.yml | 3 +++ CHANGELOG.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f08aaea..c6bbe4a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,12 +8,14 @@ on: - 'scripts/**' - 'harness/**' - 'package.json' + - '.github/workflows/lint.yml' pull_request: paths: - 'SKILL.md' - 'scripts/**' - 'harness/**' - 'package.json' + - '.github/workflows/lint.yml' jobs: validate: @@ -42,6 +44,7 @@ jobs: run: | node harness/test-code-generator-contract.mjs node harness/test-preflight-fixtures.mjs + node harness/test-css-declaration-count.mjs node harness/test-orchestrator-command-contract.mjs node harness/test-self-report-no-write.mjs node harness/run-generated-check-tests.mjs diff --git a/CHANGELOG.md b/CHANGELOG.md index bab6537..fec6ac1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ - **Bundle/relay 契约**:封面图纳入 bundle,relay 目录日期由本地生成,远程推送命令正确传递标题、作者、封面和 `--crop-235-1` - **发布摩擦沉淀**:补充 footer QR 绝对路径、参考资料 bullet 空行、手动 render 图片路径和正式推送默认 relay 的 gotchas - **Preflight 误报收敛**:Markdown 卡片/表格计数跳过代码块和 inline code,source verification 只扫描可见文本数字 -- **position/filter 样式误报**:`harness/preflight.mjs` 与 `create_wechat_draft.mjs` 用裸字符串匹配统计 `position:`/`filter:`,正文里的英文单词子串会被数成 CSS(2026-11-25 生产现场复现:参考文献标题「tumor predisposition: identification…」令本地 preflight 阻断且 `--auto-fix` 无法修复,relay 回检写出 `position: 1 ❌`,实际样式数为 0);两处改为只在标签内部统计 CSS 声明(`countCssDeclarations`),新增 `test-css-declaration-count.mjs` 用同一组用例钉住两份实现 +- **position/filter 样式误报**:`harness/preflight.mjs` 与 `create_wechat_draft.mjs` 用裸字符串匹配统计 `position:`/`filter:`,正文里的英文单词子串会被数成 CSS(2026-11-25 生产现场复现:参考文献标题「tumor predisposition: identification…」令本地 preflight 阻断且 `--auto-fix` 无法修复,relay 回检写出 `position: 1 ❌`,实际样式数为 0);两处改为只在标签内部统计 CSS 声明(`countCssDeclarations`),新增 `test-css-declaration-count.mjs` 用同一组用例钉住两份实现,并接入 `npm run check` 与 CI 的 Lint workflow(Lint workflow 自身的改动也会触发该检查) - **CI 覆盖**:`npm run check` 与 GitHub Lint workflow 覆盖 `harness/**/*.mjs` ### Changed