12e0617909
The BOM gate claimed to stop BOMs from being stripped, but it only ever inspected files that were already tracked AND already had a BOM. A new file under a BOM-listed directory could be born without one and never be noticed, because the scan never returned it and, even if it had, the "no HEAD version" branch skipped it. Editing a listed file and losing its BOM is a real accident that already happened once; creating one without a BOM was the same accident with no safety net at all. Measured before and after on the same untracked file with no BOM: before: checked 101 files, no drift, exit 0 after: FAIL, names the file, exit 1 The count of 101 was itself the symptom: with one more file present the honest number is 102. The old code was not "silently passing a clean tree", it was not looking. The scan now includes untracked files, and a listed file with no HEAD version must carry a BOM. Files that are tracked without a BOM keep their historical pass so this does not flood existing code with failures; instead the two that were listed but had no BOM were given one so the list means what it says. That exposed a conflict nobody had hit yet. The font file is generated, and the generator rewrites it from scratch on every run, so a hand-added BOM survived until the next regeneration and then vanished. The BOM gate and the generated-fresh gate could not both pass. The generator now puts the BOM back as its last step, idempotently, so the two gates agree and the whole UI directory keeps its uniform encoding. Font content is untouched: everything after the first three bytes is byte-identical. The menu generator gains a real read-only mode. It previously had no options at all and always rewrote its outputs; the arrows it printed were accurate. That made it easy to mistake for a checker, since an unchanged tree produces identical bytes and looks untouched. --check now reports up to date or stale without writing anything, and the registration tables are checked the same way. Default behaviour and output are unchanged. The telemetry page header no longer restates the board's input hardware facts. They live in the IOBOARD README, which is where the board's electrical behaviour belongs; the page keeps only what it alone can say: that the output rows show the shadow register rather than contact feedback, why an invalid sample draws -- instead of 分, and that these twelve rows are not in the point table. One fact, one place. The team rule for experiments now requires the file hash, the located line number, and both runs. A report once cited a line number that did not exist in the final file, which left no way to confirm which version had actually been tested.
25 lines
1.1 KiB
C
25 lines
1.1 KiB
C
/*
|
||
* 模块名称:UI Page SelfTest (自检记录内容页)
|
||
* 模块功能:自检记录叶子节点(node 39)的内容页数据——动态列表,每条记录 2 行
|
||
* (偶数行 = 时间戳、奇数行 = 故障描述),可移选分页;数据源 = sys_log API
|
||
* (/log/selftest.log,开机自检故障,仅故障才写);空日志显示单条伪行"无记录";
|
||
* 向框架 ui_content_page 提供页面描述符(零 LVGL 对象)
|
||
* 适用平台:STM32F407ZGTx / PC 模拟器(两端共用)
|
||
* 作者:王建锋
|
||
* 创建日期:2026-09-14
|
||
* 修改记录:
|
||
* v1.0 2026-09-14 王建锋 创建初始版本(设计见 docs/子系统设计/运行与自检记录设计.md §5.2)
|
||
*/
|
||
#ifndef UI_PAGE_SELFTEST_H
|
||
#define UI_PAGE_SELFTEST_H
|
||
|
||
#include "ui_content_page.h"
|
||
|
||
/*
|
||
* 页面描述符(Flash const):自检记录页(描述符 .id = "selftest");
|
||
* 由生成物 ui_page_registry.c 按菜单树 #page=selftest 注记绑定引用(定义于 ui_page_selftest.c)
|
||
*/
|
||
extern const content_page_def_t ui_page_selftest_desc;
|
||
|
||
#endif /* UI_PAGE_SELFTEST_H */
|