Repository navigation
chore: 规范项目工程 + 精简测试冗余 + PITFALLS 补录(504→502) - #2
Merged
Merged
Conversation
…条核实后落地。测试精简:删 2 个被完全涵盖的 it(project 对比度达标项由 themes.test.js 同断言更严覆盖——那边测 textColor/accent/primary 三色 × 双底色、这边只 textColor × 主底色;gen 模糊揭示「默认工程不含 DOM」并入新区块 DOM 缺席测试,同一 defaultProject 输入),删 4 处同输入逐字节重复断言(捕获组 16 个连写两遍、curtain 的 -gcurval 与 scan 的 -gscandone 在两个相同构建里各断言两次、gate 经典主题 -gatecover/-gatebtn 与同输入先行 it 重复)、1 行调试残留 console.log(complib random_nr)、2 处死 fixture 字段 useTavernCmd(v1.27.1 已删该字段);确认保留全部宏双轨/预览导出/多实例双路径断言——那些「看着重复」是交付契约。文档对齐:README 结构树补漏 scripts/opg-nh.bat(助手小包四件套之一,树里唯独漏了它);AGENTS 模块地图补 ui/renderNh.js 与 ui/extBridge.js 两行(地图声称覆盖 src/js 全部 js 文件但漏这两个);project.js 行失真键名 `_projects` 改回真实键 `openingPageGen_v1_projects`;硬约束 1 组件数「55+ 条」对齐实测 59 条;删 package.json 无文档无使用方的 test:watch。PITFALLS 补录 5 条本次实际踩坑并重排为节内连续编号(无按编号交叉引用,安全):14 撤销快照必须「先改后拍」(先拍与栈顶同被去重静默吞掉,写入态永久不可达——漫画导入应用区块踩过)、23 gen.test 字符串断言有意钉住运行时脚本内部变量名(重构时断言连环红属预期,别为绿测保留旧变量名)、24 切段与匹配共用同一字符类时段内正则同类兜底是死代码(parsePageExpr 的 1 - 20 被截成端点)、25 同级 z-index 弹层按 DOM 顺序绘制 + 主题纹理层 2147483646 是自绘弹层 z-index 下限(模态每次弹出重挂 body 末尾置顶)、26 新增自绘弹层必须挂 .opg-ov(漏挂时 Ctrl+Z 穿透、弹层闭包写进已回退旧对象)。本地 .zcode/tmp 90+ 个历史会话残留已清。lint 通过、502 测试全过、构建与双冒烟通过
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.
概述
两路并行审计(测试冗余 / 工程结构与文档一致性,均先
git ls-files与全绿基线核对)→ 逐条亲自核实 → 落地。结论:仓库规范度本就很高(import 图闭合、无死模块、数字口径全部对齐),本轮动的是文档偏差、测试真冗余与坑沉淀。测试精简(504 → 502,零覆盖损失)
-gcurval/ scan-gscandone在两个相同构建里各断言两次;gate 经典主题-gatecover/-gatebtn与同输入先行 it 重复console.log(complib random_nr);删 2 处死 fixture 字段useTavernCmd(v1.27.1 已删该字段,src 零引用)工程规范
scripts/opg-nh.bat(助手小包四件套之一,树里唯独漏了它)ui/renderNh.js与ui/extBridge.js(地图声称覆盖 src/js 全部 js 文件,实际漏这两个)_projects改回真实键openingPageGen_v1_projects;硬约束 1 组件数「55+ 条」对齐实测 59 条test:watch(npx vitest即可).zcodeignore同步区补dist-nh/(与 .gitignore 对齐,本地文件不进库).zcode/tmp90+ 个历史会话残留(一次性脚本/截图,tmp 本属临时区)PITFALLS.md 补录(本次会话实际踩坑,节内重排为连续编号,无按编号交叉引用故安全)
1 - 20被截成端点.opg-ov:漏挂时 Ctrl+Z 穿透、弹层闭包写进已回退旧对象验证
lint ✓ → 502 测试全过 → build ✓(+0.1KB 为构建日期字节)→ 双冒烟 ✓(零 console.error)。无版本 bump(纯 chore/docs,按仓库约定不升版本)。