Files
STM32F4-Base/simulator/tests
wandering1 e4981aa2f6 refactor(docs): point entry-file references at their new homes
AGENTS.md stopped being the store of record for build steps, Python env,
hardware pins, doc conventions, log cost and task ownership. Those facts
already live in docs, skills and role files; the entry file now only
points at them. This commit moves every reference that used to name the
entry file to the authoritative landing point, so a reader who follows a
link arrives at the fact instead of at a sentence that no longer exists.

What changed is links and prose, not behaviour. Code, scripts and tests
only have comment and docstring lines touched; the only non-comment edit
in the whole changeset is one note string inside the generated pin table
JSON, and its generator was changed in the same step so the two stay
byte-identical.

New landing points created before the references were retargeted:
- The console single-writer log design doc, section 7.1, is now the single
  authority for log cost: about 90 B flash and 216 B stack per DBG_ line,
  and the rule that deep call chains must predefine DBG_LINE_BUF_MAX.
  It also carries the full list of the twelve translation units that have
  tightened it, plus the grep command that decides the truth if the list
  and the code ever disagree.
- The document writing standard, section 2, now holds the BOM list.
- keil-build skill gains an exit code table: 0 success, 1 build failure,
  2 BuildEnvError, 3 usage, 4 build lock held. This corrects a belief
  that was never actually written down anywhere: exit 2 does not simply
  mean environment error, argparse also exits 2 and the wrapper script
  was remapped so the two no longer collide.

Regenerated and checked byte for byte:
- The end-to-end architecture SVG in docs/images from its generator.
- tools/netlist_semantics/pinout_kb.json from gen_kb.py.
Both are idempotent; running the generators again produces no diff.

Deliberately not touched, because machines read them:
- scripts/check_bom_drift.py joins every line containing BOM and asserts
  four paths are present, so the entry file BOM line must stay one line.
- scripts/gen_task_table.py reads the TASK_TABLE anchors directly.
- scripts/rename_maps and scripts/archive keep their historical wording;
  they describe what happened, not what is true now.

Verified: doc links report the same six pre-existing findings as the base
commit and no new ones, generated-fresh passes, bom drift is clean across
101 files, and AGENTS.md itself is unchanged in this commit.
2026-11-16 19:38:27 +08:00
..

simulator/tests/ — UI 模拟器无头回归测试

PC 端无头(headless)UI 像素回归测试:在模拟器中渲染各页面,与黄金参考图比对, 检测 UI 改动是否引入像素级回归。属于 ui-verify skill 五步门禁的一部分。

文件一览

文件 作用
check_menu_rows.py 菜单像素回归:渲染菜单行 → 与黄金参考比对
check_content_pages.py 内容页回归:各内容页渲染比对
check_remo_sink.py 推流(RemoDispBus)回归:接收端渲染比对
regen_ref_png.py 由 ref/*.bin 批量出目检 PNG(不产生基准;基准由 check_content_pages.py --update 刷)
ref/*.bin 像素黄金参考(入库):74 张 × 3200 B,160×160 单色打包(2026-10-29 录波 UI 道 +6 张;2026-11-04 SNTP 设置页 +8 张)

使用方式

# 跑回归(按 ui-verify skill 流程)
& '.venv\Scripts\python.exe' simulator/tests/check_menu_rows.py
& '.venv\Scripts\python.exe' simulator/tests/check_content_pages.py

# UI 有意变更、确认无误后重建基准
& '.venv\Scripts\python.exe' simulator/tests/regen_ref_png.py

⚠️ 注意

  • 重建黄金参考前必须确认变更是有意的——否则会把 bug 固化成"基准"
  • ref/*.bin 已入库:刷参考 = 改基准,git diff 里会显形,提交正文必须写明为什么变
  • ref/*.png 只是给人看的派生物(已忽略),刷完 .bin 要重跑 regen_ref_png.py 才对得上
  • UI 改动一律走 ui-verify skill 五步门禁(regression 是其中一步)
  • 依赖模拟器已构建(simulator/build_sim.bat)

相关文档

  • docs/UI设计/UI_自动化测试流程.md — ui-verify 五步门禁
  • docs/UI设计/LVGL模拟器部署与使用说明.md