Commit Graph

3 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 ea10dbae53 修 gitlint 门禁在 CI 空转:runner 无 git 身份致 254 被误报成信息违规
CI / L0 静态门禁 (pre-commit) (push) Successful in 3m41s
CI / L0.5 主机侧单测 (MSVC) (push) Successful in 33s
task 31(首次真跑出的 L0)失败与提交信息无关:actions/checkout 把 HOME
指向每次任务的临时目录,SYSTEM 账号没有全局 git 身份,gitlint 在读到任何
规则之前就以 Missing git configuration: please set user.name 退出——254
是配置错误,不是规则违规。旧脚本还把失败原因写死成"标题超 100 字符",加
上该步 exit 1,后面 26 个钩子一个都没跑。

改三处:① 先探测身份,缺失则用 GIT_CONFIG_COUNT/KEY/VALUE 注入一次性身
份,只进子进程环境、不写任何文件,开发者机器不受影响;② 254 与真实违规
分开报(2 = 门禁没跑起来,1 = 信息确实违规),不再替 gitlint 猜规则;
③ 钩子输出改走 ForEach-Object { "$_" },避免 PS 5.1 把原生 stderr 包成
ErrorRecord 污染日志。

实测:空 HOME 下同一条命令改前 254、改后 0 failed;正常环境 10 条提交全
过;脚本纯 ASCII、解析 0 错。同批文档:§7 排障表新增本坑与"新建分支首
次 push 不触发 run",两份变更记录各加一行。
2026-10-12 19:17:11 +08:00
wandering1 20ee35b76a 修复CI门禁三因:runner掉线致12个job零日志、L0探测回归全灭、gitlint在CI从不执行
1) runner 掉线:run 16~21 共 12 个 job 零日志。gitea-runner v4 的
   daemon 无服务支持、首次 Declare 失败即退出进程,Gitea/机器重启
   一次 CI 就静默停摆;叠加 cancel-in-progress 后症状是"任务凭空
   消失"。新增 scripts/ci_runner_bootstrap.ps1:等 Gitea 就绪 +
   崩溃自拉起看门狗 + 开机计划任务 + -SetEnv 写 MACHINE 级 DTU_*。
2) L0 自 33a4aa4 起在 runner 上必挂:Python 候选被收窄成 PATH python
   (msys64,无 pre-commit) + 仓库 .venv(gitignore),cppcheck 目录兜底
   亦被删,而机器级 DTU_* 从未设置。探测收进 ci_find_python.ps1
   (两 job 共用、可离线自测、恢复机器级安装兜底)。
3) gitlint 声明 stages:[commit-msg],而 --all-files 只跑 pre-commit
   stage → 17 个钩子定义 CI 只报 16 个且全绿。新增
   ci_gitlint_range.ps1 逐条校验本次范围,ci_local.py 增 L0b 段。
另:GITHUB_ENV/PATH/OUTPUT 写入显式 -Encoding ascii(PS 5.1 的
   Out-File -Append 默认 UTF-16LE,会把带 NUL 的行追加进 UTF-8 文件)
2026-10-12 12:39:27 +08:00