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
4a4ad6bc5f
chore(全仓): @build/@test 旧文档别名清退为技能调用名
...
现状口径:/keil-build 与 /serial-boot-test 是 DSH 会话的技能调用名,
不是 shell 命令;「名 + 命令行参数」的命令形态改为可执行体
run_boot_test.py 的真实调用。
- AGENTS.md:别名说明重写为「技能调用名不是 shell 命令」,两条目改
「编译(/keil-build)」「串口回归(/serial-boot-test)」
- keil-build / serial-boot-test 两 skill 调用名与示例同步;task-worktree
方案文档去掉 @build/@test 惯例从句;@task 保留(不在点名范围)
- 123 文件现状陈述全改;台架捕获、变更记录/时间线、rename 映射输入
等 41 行历史证据保留旧名
- gen_memory_svg.py 6 处措辞随改,3 张 SVG 产物同批重跑
- 顺手补并行方案同行漏网计数 51→52 钩子
验证:提交期快钩子对 123 文件实跑全 Passed;check_doc_links --all
rc=0(3038 处、无法判定 0);check_mermaid --all rc=0;YAML 解析 52
钩子不变;skill-size rc=0;py_compile 全过;字节卫生零漂移。
2026-10-30 13:03:12 +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
23daa3d9ad
chore(台架): 删零引用的一次性探针、修可信判据工具登录、清理口径落文
...
CI / L0 静态门禁 (pre-commit) (push) Failing after 2m34s
CI / L0.5 主机侧单测 (MSVC) (push) Successful in 21s
两件事一起做:把"没人用又已经失效"的一次性探针清掉,把"台架现场脏"这件事的口径写进文档。
**删除(5 个文件,全库零引用)**:`MDK-ARM/ftp_retr_abort_probe.py`(其职能已被
`test/host/ftp_abort_probe.py` 取代,Trap 记录引用的也是后者)与整个 `MDK-ARM/bench_diag/`
(4 个诊断脚本:abort_gap / pcref / recover / sink_recycle)。删除判据三条同时成立:① 全库
`git grep` 除自身外零引用;② 自 2026-10-11 设备启用 FTP 鉴权起,脚本里写死的匿名登录必然 530
→ 已经跑不动 11 天;③ 都是"跑一次拿现场"的诊断件,价值在结论而结论已沉淀进 Trap 记录。
需要时从 git 历史取回(`test/host/README.md` 与 `MDK-ARM/README.md` 都写明了这一点)。
**刻意保留并修好**:`MDK-ARM/ftp_freeze_probe.py`——它不是一次性件:
`CH395F_Trap_Records.md` 拿它当"177 轮 SHA-256 全匹配"的**可信复现配方**、
`BSD_Socket_API_使用指南.md` 把它列进排障判据、`Drivers/BSP/NET/lftpd/README.md` 也指它。
删掉它等于删掉文档指定的真值工具。改为 `--user/--password`(默认出厂 admin/admin,模块常量
`FTP_USER`/`FTP_PASS`,两处登录点都读它),实测一轮:`ROUND 1 size=4096 stor=OK retr=OK
hash=MATCH`、`SUMMARY pass=1 fail=0`——修前它连 530 都过不去。
**台架设备清理(不动仓库内容)**:`/` 根目录实测残留 **27 个探针文件 / 262 KB**(`AB000x`、
`A000x`、`R000x`、`SZ2K~64K`、`E12A`、`DIAG_A`、`PP0~PP4`——正是刚删的那批一次性探针留下的)。
逐个 `DELE` 后剩 `LOG` + `CONFIG.INI` + `PROT_SET.BIN` 三条目。**判据:只删显式点名的文件,
绝不 glob**;保留清单必须含 `/config.ini`(网口 + FTP 鉴权)、`/PROT_SET.BIN`(保护定值 blob,
`PROT_SET_BLOB_SZ` = 176 B,删了等于定值清零)、`/log` 目录。清完两步验收:`@test` PASS
(630 ms,定值巡检与配置加载都在这条链上)+ `ftp_list_fill_test.py` PASS(29 行 / 1851 B /
完成回包 226,26 个新文件全列出)。口径写进 `docs/测试说明/存储维护与容量恢复.md` 新 §4.1
(明确它是"动作 D 清文件",与 A 重建 BBT / B 全片擦除 / C 容量恢复区分——那三个会丢卷内容)。
门禁:`py_compile`(freeze 探针)通过;`check_doc_links.py --all --sections-strict` 146
文档
0 问题(删除的 5 个文件确认无任何文档引用);`check_ids.py --strict` 增量拦截通过(可判定
82.82%);`layer-deps` 通过;4 个改动文件字节卫生 BOM 无 / CR 0 / U+FFFD 0 / 无行尾空格。
本轮无固件改动,未跑 `@build`(设备侧清理后的 `@test` 已跑,镜像仍是上一笔的构建)。未推送。
2026-10-22 22:51:21 +08:00
wandering1
925058a5ae
fix(NET)+docs: lftpd 对端地址修复、E6 裁决收口、陷阱编号迁移重排 TRAP-NET-01~21
...
- lftpd:net_inet_ntoa 段序改 MSB 首 + 新增 net_getpeername,FTP 日志打印
真实对端地址(真机实证 192.168.1.2:55524,登记 TRAP-NET-21)
- E6:NET_U15_PROBE 命中=0(含压测)→ 阶段 3 项 4 不立项,U15 登记观察项;
插桩留仓(宏=0 零成本),soak 驱动 test/host/e6_soak.py 入库
- 编号:全库 Trap NN → TRAP-NET-<nn> 迁移并重排连续 01~21(单调映射,
沿革见 CH395F_Trap_Records.md 头注);死号 12/13/19/21 引用全部清除;
GD5F 域引用补正为 TRAP-GD5F-NN
- 陷阱文档全新化:索引 21 行行行真陷阱;删误判存档/发现时间/git 考古/
FTP 附录;台架纪律教训沉淀第六章方法论
- RAM:Code 211348→211456(+108 lftpd 修复),RW+ZI 净增 +4B;
优化方案/台账受管区/tsv 同笔同步
- ftp_abort_probe.py 挪 test/host/;引用关系图重生成
- 回归:@build 0/0;@test PASS;ftp_abort 10/10;relisten :7003 20/20;
ci_local L0+L0.5 全绿;E6 窗口零复位,7 条 WD stall 登记压测假象备查
2026-10-13 20:54:31 +08:00
wandering1
5009a844a9
收敛 reset.bat 到 stlink-flash skill 并删除该批处理
...
CI / L0 静态门禁 (pre-commit) (push) Has been cancelled
CI / L0.5 主机侧单测 (MSVC) (push) Has been cancelled
stlink_flash.py 新增 hard 子命令(-c SWD RM=Hrst -HardRst PULSE=100),
RM= 被 CLI 拒绝时自动降级为系统复位并打印 RESET_NOTE;至此 reset.bat 的
全部子命令(复位/hard/halt/run/list/flash/cmp)均已由 skill 覆盖。
删除 MDK-ARM/reset.bat(git rm)。@build/@download 两条旧批处理入口至此
全部收敛到 .dsh/skills/ 下的 skill,一个能力一个实现。
同步更新引用:AGENTS.md、README、MDK-ARM/README、7 篇 docs、4 个 skill
(stlink-flash/serial-boot-test/new-machine-setup 及 config.example.json)。
真机验证:hard 子命令 RM= 被拒 → RESET_NOTE → 回退系统复位 → STLINK_RC=0。
2026-10-10 16:41:46 +08:00
wandering1
5defabcabb
build: 删除 MDK-ARM/download.bat,烧录收敛到 stlink-flash skill
...
- test/run_all_suites.py 是唯一执行它的地方:DOWNLOAD_BAT 改为 STLINK_FLASH
(.dsh/skills/stlink-flash/scripts/stlink_flash.py);直烧改
[py, STLINK_FLASH, "flash"](原先把 .bat 包给命令行解释器执行);
--flash-cmd 改由同一常量拼出,不再硬编码 .bat 路径
- 机制变化(须知晓):原 download.bat 走 UV4 -f(CMSIS-DAP),现走
ST-LINK_CLI -P <hex> -Rst -Run —— 与 .serialtest/config.json 的
flash_cmd、AGENTS.md 烧录铁律、回读 -CmpFile 要求同源;6.5s/1MB
也快于 UV4 路径
- AGENTS.md / 环境与部署 3 篇 / ST-LINK_CLI 复位说明(原文写"正式流程仍以
download.bat 为准",已反转)/ 自动化测试流程 / 串口助手设计说明 /
链路延迟 / m2_data / README / MDK-ARM/README:引用改指 skill
- .gitignore:download_log.txt 条目保留并注明 legacy(他机残留物不变
untracked);build 日志注释同步
- 保留 MDK-ARM/reset.bat:其 hard/halt/run 子命令是 skill 没有的
- 刻意未改:docs/问题记录/项目审查与优化建议报告.md 的 P2-15(史实)
- 验证:run_all_suites.py --dry-run 解析出 skill 路径;doc-links 123 通过
2026-10-10 16:28:58 +08:00
wandering1
c77c5824f9
build: 删除 MDK-ARM/build.bat,@build 完全收敛到 keil-build skill
...
- test/run_all_suites.py 是唯一真正执行它的地方:BUILD_BAT 常量改为
KEIL_BUILD(.dsh/skills/keil-build/scripts/keil_build.py);两处构建点
改传 --timeout(脚本内超时先于 _run 超时触发,超时得 rc=1 + BUILD_FAIL
文案,而不是被 _run 杀掉)
- AGENTS.md / keil-build SKILL.md / new-machine-setup SKILL.md:删除
"等价原生入口"口径,改为注明该文件已于 2026-10-10 删除
- 环境与部署 3 篇 / 项目架构总览 / README / MDK-ARM/README /
download.bat 注释 / check_mem_numbers.py 提示串:移除 build.bat 引用
- 刻意未改:docs/问题记录/项目审查与优化建议报告.md 的 P2-14 / N-18
(历史审计条目;doc-links 不校验裸文件名,保留不影响门禁)
- 验证:keil_build.py --timeout 300 -> BUILD_OK / rc=0;
run_all_suites.py --dry-run 正确解析 skill 路径;doc-links 123 文档通过
2026-10-10 16:23:54 +08:00
wandering1
7a54fdbc73
docs(build): @build 统一为 keil-build skill,build.bat 降为等价原生入口
...
- AGENTS.md 构建条:@build = keil-build skill(写明 UV4 解析链、退出码
0/1/2/3、日志路径);MDK-ARM/build.bat 明确为等价原生入口,并列出
它相对 skill 缺的三项(无超时保护 / UV4 只认 DTU_KEIL_UV4 / 失败 dump 整份日志)
- keil-build SKILL.md「本仓库」段同步:skill 即 @build 口径
- 3 个 skill(new-source-file / ui-verify / new-machine-setup)与 8 篇
docs、README、MDK-ARM/README、环境与部署 3 篇:命令示例与 @build
标识统一改指 skill
- scripts/stack_report.py 的构建提示串改指 skill
- 环境与部署:DTU_KEIL_UV4 使用方补 keil_build.py;反向测试期望的报错
文案对齐 skill 实际输出(BUILD_ENV_ERROR: ... is set but not a file)
- 刻意未改:docs/问题记录/项目审查与优化建议报告.md 的 P2-14/N-18
历史审计条目(属史实记录);test/run_all_suites.py 的 BUILD_BAT
常量(是代码、非文档,改动需另做验证)
2026-10-10 16:19:14 +08:00
wandering1
33a4aa4945
本地工具路径DTU_*环境变量改造落地:10处调用点去硬编码+变量优先解析,本机全链路验证通过,文档同步收口,requirements补pre-commit
2026-10-02 22:14:49 +08:00
wandering1
39bd06adea
为自建代码目录补齐 README,建立目录级导航体系
...
- 新增 26 份目录 README:App/(+log,task,util,protocol)、Drivers/BSP/(+8子系统)、
Src/、Inc/、scripts/、tools/(+6子工具)、test/、MDK-ARM/、simulator/(+sim,tests)
- 每份含:定位、文件清单表、关键约束/陷阱、指向 docs 权威文档
- 第三方库与生成代码目录排除(CMSIS/HAL/Middlewares/Lib/SDL2)
- docs/文档规范.md 新增 §1.1b 代码目录 README 约定;根 README 目录结构加入说明
2026-09-26 12:25:36 +08:00