Commit Graph

4 Commits

Author SHA1 Message Date
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
wandering1 f754d59218 docs(测试说明): 按用途分六个子目录并同步全库引用
分层:流程与规范/ 单元测试/ 板级测试/ 专项验证/ 测试工具/ 测试数据/,
顶层只留新增的目录导航 README.md(归层判据 + 硬约束 + 本次处置记录)。

- 搬迁 28 个路径:测试数据三个目录 58 个文件为纯改名(R100,内容逐字节不变)
- 全库引用同步 124 个文件:AGENTS / docs 索引 / skills / 门禁注释 / scripts
- 门禁面:scripts/check_test_traceability.py 的 glob 改 rglob
  (分层后不递归扫描=追溯门禁直接瞎掉)
- scripts/rename_ref.py:收尾的 ℹ 提示在 GBK 代码页抛 UnicodeEncodeError,
  让进程以退出码 1 收场而改写其实已落盘(RC 与真实结果相反);改为把
  stdout/stderr reconfigure 成 UTF-8,与 check_doc_links.py 等同法
- docs/文档规范.md §1.1 补「子目录文件过多时再分一层」;§3.6 补 rename_ref
  搬整目录的两个实测坑:① 会改写目录内部文件的内容 ② 内部文件的 ../ 出链
  不补层级(本次 23 个被误改的证据文件已按 HEAD 原始字节逐字节还原)
- docs/README.md §6 改为与六个子目录一一对应,并补登原先漏登记的
  「启动日志原子性复验流程」一行
- .cubemx_survival_baseline.json:App/util/task_watchdog.c 的注释路径也随分层更新,
  该文件是存活审计的 watchdog-module 漂移锚点,按脚本自己的提示跑 --write 重建基线
  (实测重建后仅 watchdog-module 一条哈希变化)
- 铁律 4 例外(本次在任务树里改了单写者文件):AGENTS.md 与
  .pre-commit-config.yaml 只被 rename_ref 改写路径字面量(后者全在注释行),
  任务表块与钩子声明一字未动

验证:check_doc_links.py --sections-strict 覆盖全部 88 个改动 .md 全绿;
check_test_traceability.py 输出与主树逐行一致;196 个文本文件无 BOM、无新增
CR、无 U+FFFD、无行尾空白;陈旧引用面由主树 25 处降到 6 处(无新增断链)。
2026-10-30 07:16:07 +08:00
wandering1 6572591181 refactor(编号): 链路时延段号 L1~L11 → 权威 ASCII 段名(含 C 宏名与 peer 变量)
批次六余账之一。批次 3b 当时只改了 net_latency_test.c 的日志串与注释,本笔收掉剩下
的:标识符、peer 脚本、其余四个 board 文件。

- 段名映射(权威表在 scripts/archive/id_gate/编号治理历史.md §10):SPI_CMD /
  SPI_DMA / CHUNK_WAIT / TO_PC / QUEUE_RT / ECHO_RT / FRAME_RT / PROD_CYCLE /
  RELISTEN / LOGTAX / UI_LOOP。C 侧纯 ASCII,文档侧沿用中文段名。
- C 标识符 29 条规则 86 token:LAT_P13_OP_L5_RECV → LAT_P13_OP_QUEUE_RT_RECV、
  P13_ST_L3 → P13_ST_CHUNK_WAIT、LAT_P13_L3_SAMPLES → LAT_P13_CHUNK_WAIT_SAMPLES,
  并把文件内既有的 CW / QRT / LT 三个缩写前缀一并展开成同一套词,不留两套词汇。
- REQ2FIRST / FULLFRAME **不并入** FRAME_RT:它们是整帧往返段内两个不同测量
  (报告标签本就叫 req2first_mcu / fullframe_mcu),并入会撞名并丢掉区分度。
- peer(test/host/latency_peer.py)42 条标识符 + 7 个小写局部量 + 操作表整表重排。
  **JSON 输出键 l5_recv / seg_l6 / frames_l7 等 48 token 刻意不改**——它们是
  docs/测试说明/m2_data/ 五份冻结实测数据的 schema,改名等于让代码与归档证据
  漂移;边界与理由写进归档 §10.3,是**有记录的例外**不是漏网。
- 注释 23 处;顺带修一处上一批路径残留:peer 被写成 test/latency_peer.py,实际
  在 test/host/ 下,三处注释改对。
- 站点:test/board 111 + Drivers/BSP/CH395F/ch395f.h 1 + peer 46(无词边界口径)。
- 零代码生成变化:@build 改前/改后各一次,均 0 错 0 警且 Program Size 完全相同
  (Code=236456 RO=28124 RW=1876 ZI=137084)。被改名的标识符全落在
  ENABLE_PHASE13_TESTS 区间内 → 另开 TEST_SUITE_CH395F + PHASE13 组合编一次
  (0 错 0 警),套件开关事后无条件还原、sha256 与还原前一致,再重建产品构建。
- 等价证明:剥注释 + 套登记表后与 HEAD 逐字节相同(not_equivalent=0)。
- 禁改一字未动:console_log 的 "L1\r\n"(测试数据)、lftpd 与
  ftp_capture 的 "215 UNIX Type: L8"(FTP 应答断言)。
2026-10-28 18:49:45 +08:00
wandering1 22559365b9 整理 App 与 test 目录:按职责分子目录并同步全库引用 2026-09-26 12:52:39 +08:00