Repository navigation
feat(ci): reduced-motion 断言逐面读计算样式(CL-16 第 2 步第三句)+ 覆盖层门接进 CI - #231
Merged
Merged
Conversation
CL-16 第 2 步第三句。此前这条标准的唯一守护者是一个 grep 样式表文本的 vitest 文件:文字在,不等于浏览器给每个节点的答复是 0 秒。新门 scripts/audit/reduced_motion_floor_via_cdp.py 钉住 prefers-reduced-motion 并由页面回读 matchMedia 证明钉住,再遍历五个面的全部节点与 ::before/::after 读计算样式,两个偏好都走(只量 reduce 侧的 0 分不出「压平了」与「本来没动效」)。 反证是真构建:把地板的选择器改成页面匹配不到的值并重建,门转出 reduced_motion_floor_holds[professional] 并点名 9 个仍在过渡的节点,其余四面 仍绿——那 9 个节点正是整体地板今天唯一的独特贡献。 窄条 strip-h01 在两种偏好下都是 0 条动效(它的悬停展开是 JS 状态不是 CSS 过渡)。 不判红:判据问的是地板在不在工作,把「这张面本来没动效」判成地板失效会逼人给 窄条加动效来喂门;写进回执与 coverage,按名留到第 3 步的接入点。 同批把 scripts/audit/overlay_motion_via_cdp.py 接进 observer 作业:该门自 PR #226 起在树里而没有任何作业执行它——判据进了仓库却没有作业执行它,仍然只是门的说明书。
前一个提交里 `git add` 因一个不存在的路径整体中止,导致工作流的两条必需步骤与 两处指向已删测试文件的注释留在工作树里没有入库。CI 步骤若不入库,门就只是 说明书;注释若仍指向删掉的文件,下一个人会去找一个不存在的答案来源。
CI run 40759112353 的 governance 批点名本文件 230/240 行的裸 `tempfile.mkdtemp()`: 本仓产生的临时件必须锁在 Git 根内,且该判据把「剩余裸位」当作只能缩小的具名债, 所以这不是风格问题。改为在 `.project-local/runs/tmp` 下造根并在 tearDown 删除。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/audit/reduced_motion_floor_via_cdp.py钉住prefers-reduced-motion并由页面回读matchMedia证明钉住,遍历五个面的全部节点与::before/::after读计算样式;两个偏好都走,因为只量reduce侧的0分不出「地板压平了」和「这张面本来就没动效」。apps/observer/frontend/src/skins/l10b-shell.css里地板的@media选择器改成页面永远匹配不到的值并npm run build,门转出恰好 1 条具名 FAILreduced_motion_floor_holds[professional],点名 9 个仍在过渡的节点(span.nav-group-caret等,dur=0.18s),其余四面仍绿。这条读数同时量出了整体地板今天的独特贡献正是专业壳那 9 个节点——其余四面另有b10.css的逐选择器 reduce 规则兜着。还原后源文件 sha256 与植入前逐字节相同、重建复跑 17/17。strip-h01在两种偏好下都是 0 条动效(窄条的悬停展开是 JS 状态不是 CSS 过渡)。不判红:判据问的是地板在不在工作,把「本来没动效」判成地板失效会逼人给窄条加动效来喂门;写进回执与coverage.motionlessBothBranches,按名留到 CL-16 第 3 步的接入点。scripts/audit/overlay_motion_via_cdp.py接进observer作业:该门自 PR feat(audit): 覆盖层进出场两侧采样的门(CL-16 第 2 步最后一项) #226 起在树里而没有任何作业执行它(接线前 workflow 里overlay命中数为 0)。判据进了仓库却没有作业执行它,仍然只是门的说明书——CL-14 从反方向抓过同一个洞。Test plan
python tests/ci/test_reduced_motion_floor_gate.py→Ran 17 tests OK(含 4 个植入反例 + 空普查 + 全员无动效 + 偏好未钉上 + 面名被改 + 坏面名 rc=2 先于磁盘查找 + 缺 dist rc=3 具名)python scripts/audit/reduced_motion_floor_via_cdp.py→REDUCED_MOTION_FLOOR_GATE_PASS surfaces=5 checks=17/17(bundleDigest39fa7d6e816dccf1…)checks=16/17且唯一红是那一条具名判据(.project-local/runs/reduced-motion-gate/planted.json)python scripts/audit/overlay_motion_via_cdp.py→OVERLAY_MOTION_GATE_PASS overlays=["drawer","toast"](drawer 进 17 帧/退 14,toast 进 13/退 9)npx vitest run77 文件 / 964 例;同树放回被删文件是 78 / 965(差值恰为删掉的 1 文件 1 例——先量差再删)npx tsc --noEmit无输出AUTHORITY_INDEX_PATHS_TOTAL broken=0 failed_targets=0、DOC_CITATIONS rewritten=0 blocked=0、REGISTER_TABLE_SHAPE rows=42 wrong_width=0、LIVE_DOC_PATHS missing=0GATE_CI_JOB_MAPPING stages=50 invoked=48 declared=2 undeclared=0、CI_CHECK_REACHABILITY operands=82 ci_only=0 UNREACHABLE=0git add之后重发trackedTools=83 unclaimed=0,tests/workflow-assistance/test_tool_inventory_coverage.pyRan 16 tests OK