You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
[finding] guard-shared-stash.sh header says "Self-test (26 cases)" but the matrix has been 32 since it landed #3721
.claude/hooks/guard-shared-stash.sh:49 at origin/main says:
# Self-test (26 cases, no network, no build): .claude/hooks/guard-shared-stash.selftest.sh
The self-test actually carries 32 cases: 30 expect lines plus two inline special cases (the empty-tool_input fail-open case and the no-jq-on-PATH fallback case).
Measured on origin/main:
$ git show origin/main:.claude/hooks/guard-shared-stash.selftest.sh | grep -c '^expect '
30
$ git show origin/main:.claude/hooks/guard-shared-stash.sh | grep -n 'Self-test ('
49:# Self-test (26 cases, no network, no build): .claude/hooks/guard-shared-stash.selftest.sh
32 is also the number the objectui#3430 acceptance comment records ("32 例矩阵 + 反向验证"), so the count in the header appears to have been written from an earlier draft of the matrix and never re-read.
Impact
Observation-class: nothing a user or an agent hits at runtime. The hook's behaviour is correct and the self-test passes. The cost is that the header is the one place a reader checks before trusting the guard's coverage, and it understates it by six cases — the same "declared ≠ actual" shape the hook family exists to police, one layer up in the documentation.
Fix
One line: make it 32. Ideally the count is derived rather than hand-kept (the self-test already prints N passed, N failed), but a hand-kept number that is re-read when the matrix changes is fine at this size.
Note for whoever picks this up
The objectstack mirror (objectstack-ai/objectstack#6632) states 32, verified by running it there (32 passed, 0 failed). If the two repos' copies are meant to stay case-for-case identical — and the hook headers on both sides say they are — fixing this line also removes the only textual difference in that header beyond the deliberate localisations.
Premise re-verified on origin/main @ 4e93e40 (not the shared worktree):.claude/hooks/guard-shared-stash.sh:49 still reads 「Self-test (26 cases…)」 while the self-test matrix carries 30 expect lines plus the two inline special cases = 32 — the drift is live.
Grade basis: scoped one-line tooling fix with a named location and a verified measurement — auto-queue class. The header is the coverage statement readers trust before relying on the guard; understating it by six cases is the exact declared-vs-actual shape the hook polices.
Activity
os-zhuang commentedon Aug 8, 2026
Findings triage: promoted —
finding→pm:queue.origin/main@4e93e40(not the shared worktree):.claude/hooks/guard-shared-stash.sh:49still reads 「Self-test (26 cases…)」 while the self-test matrix carries 30expectlines plus the two inline special cases = 32 — the drift is live.本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
yinlianghui commentedon Aug 8, 2026
认领:PM 循环批 181(objectui 整仓席位,登记表 objectstack#4604)
会话:
session_01GTRjn8xBqp75dk7kFupVRt分支:
claude/issue-3721-selftest-count-headerWorktree:
objectui-3721文件面:
.claude/hooks/guard-shared-stash.sh(头注一行;若按正文建议做派生计数则含 selftest 同目录)(越界即停)Generated by Claude Code
yinlianghui commentedon Aug 8, 2026
已实现,草稿 PR:#3763(分支
claude/issue-3721-selftest-count-header,会话session_01GTRjn8xBqp75dk7kFupVRt)。origin/main@1a33b1a,显式 ref,非 FETCH_HEAD):.claude/hooks/guard-shared-stash.sh:49仍写 26;selftest 的grep -c '^expect '= 30,加 2 条内联特例 = 32。前提成立。+4 −1一个文件。objectui-3721worktree 内真跑bash .claude/hooks/guard-shared-stash.selftest.sh→32 passed, 0 failed(exit 0),与写入的数字一致。node scripts/check-control-bytes.mjsOK,并对改动文件另做手工控制字节扫描(无命中)。.claude/hooks/下 4 个历史提交(6801806、03b0f70、4d617a6、87df0b4)均无.changeset/文件。Generated by Claude Code
yinlianghui commentedon Aug 8, 2026
验收:PR #3763 ACCEPT(会话
session_01GTRjn8xBqp75dk7kFupVRt,PM 循环批 181)。单文件 +4/−1 纯注释:头注 26→32,并加计数规则(30 expect 行 + 2 内联特例)与再推导配方(
grep -c '^expect '+ 2,对齐自测尾行输出)——派发词要的 derived-count-lite,未造派生机器。真实验证 = 实际跑自测:改动前后各一次,均32 passed, 0 failed,与写入的数字一致;修正行与 objectstack 镜像逐字节相同(双仓 git show 对比),关掉了 issue 点名的最后一处非刻意文本分歧。包级构建/测试有据跳过(shell 注释在一切编译与测试面之外)。5 分钟收单,轻任务轻跑,资源纪律满分。Generated by Claude Code
docs(hooks): guard-shared-stash header says 32 self-test cases, with …