Skip to content

docs(findings): record the reusable lessons from #41-#48 - #59

Merged
RevolutionLA merged 1 commit into
mainfrom
docs/findings-review-debt
Oct 9, 2026
Merged

RevolutionLA merged 1 commit into
mainfrom
docs/findings-review-debt

Conversation

@RevolutionLA

Copy link
Copy Markdown
Owner

这是什么

不是 changelog 复述。FINDINGS.md 是给下一个动这棵树的人(也包括复审的会话)看的知识档,而 #41-#48 这一轮里沉淀出来的几条不看一遍就会重新踩,趁记忆新写下来。

记了哪几条

  • set -euo pipefail 会把脚本自己的错误信息变成死代码:赋值里的 grep 没匹配到就静默结束脚本。install-deb.sh 里四条提示语都是这个状态;复现一行命令写在里面,修法是 || true 而不是关掉 set -e。
  • 断言要用变异检验,否则只是在给自己发绿灯:标点超时用例第一版删掉 kill(-pid, SIGKILL) 仍然绿——无界 waitpid 一路等到 30 秒的孩子自然老死。补时长断言才咬住;两条合起来分别覆盖"没升级到 SIGKILL"和"只杀组长漏了进程组"。以及 [P2] ctor sweep deletes the CURRENT dir's nextless_cap_*.wav without an age guard - kills a concurrent instance's live recording #42 夹具原本靠写死的 9999(任何机器上都是死 pid)才成立。
  • apt-get build-dep <本地目录> 不需要 deb-src(apt ≥1.6,runner 实测)。CI/Release 原本"手抄清单 + -d"恰好跳过依赖检查,所以 control 少写三个包在绿灯里完全不可见。
  • 摘要固化的取值方式决定它值不值得信:五个 sha256 是自己流式哈希算出来的,不是抄页面;两个脚本对 --allow-unverified 的不对称取决于"这个名字是不是我们自己钉死的"。
  • sha256sum -c 校验不了被改名的文件(installer 存成 install.deb)。
  • debian/changelog 两条机械规则:星期要与真实日期一致(dpkg 校验);条目之间恰好一个空行(0.3.0 那次漏了,0.3.1 顺手补)。
  • 操作纪律:给 gh 传正文一律 --body-file + 引号 heredoc——今天内联双引号里的反引号被 shell 真的执行了(跑起了 apt、dh_auto_test 和两份测试脚本);以及未提交改动不要指望穿越 git reset --hard。

Not a changelog restatement - these are the four things that will bite the next
person writing shell or CI in this repo: a `grep` inside an assignment under
`set -euo pipefail` aborts the script before its own error message can print;
an assertion is only as good as the mutation that fails it (the punctuation
timeout test stayed green when the SIGKILL escalation was removed, because the
unbounded waitpid simply waited for the child to die of old age);
`apt-get build-dep <local dir>` needs no deb-src, so the CI/release jobs can
finally treat debian/control as the single dependency list instead of typing it
twice and skipping the check with `-d`; and pinned digests should come from
streaming and hashing the asset yourself, which is also why install-deb.sh and
get_models.sh deliberately differ on having an --allow-unverified escape hatch.

Plus the two mechanical debian/changelog rules (true weekday; exactly one blank
line between entries) and the shell-quoting discipline that cost me uncommitted
work today: gh --body-file with a quoted heredoc, never an inline double-quoted
body containing backticks.
@RevolutionLA
RevolutionLA merged commit 5d8082f into main Oct 9, 2026
4 checks passed
@RevolutionLA
RevolutionLA deleted the docs/findings-review-debt branch October 9, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant