Repository navigation
docs(findings): record the reusable lessons from #41-#48 - #59
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这是什么
不是 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 少写三个包在绿灯里完全不可见。--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。