fix(gates): close the BOM gate hole that let new files skip the check

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.
This commit is contained in:
2026-11-16 23:59:49 +08:00
parent 515db819ab
commit 12e0617909
14 changed files with 283 additions and 60 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ ioboard_bits.c ← 纯逻辑:位序组装。只依赖 <stdint.h>,主机侧
2026-11-16 已在 **C 通道**上实测确认(信号接入 C 路 → 屏上只有 `DI_C` 显示「合」,
其余 7 路不动),即 A 在 LSB、H 在 MSB 的位序与通道隔离都正确。
其余 7 路尚未逐路验证;若某一路接反,症状是「该路动作时屏上亮的是另一路」。
UI 侧的遥信页 `Drivers/BSP/UI/ui_page_yx.c`(板级开入开出 12 行已并入该页)在文件头注释里做了同样的声明。
UI 侧的遥信页 `Drivers/BSP/UI/ui_page_yx.c` 文件头已改为引用本节(引第 3、6~7 条),不再复述。
7. **开入是电平检测,不是通断检测**(用户口径,2026-11-16):
本板开入测量的是**输入信号有没有 24V 高电平**,「导通」本身是测不出来的——
外部信号必须提供 24V,仅仅把回路接通而没有电平,开入不会动作。