Skip to content

bump-objectui.selftest.sh 把 digest 的 stderr 丢进 /dev/null,而失败措辞写死为「范围不可走」—— 崩掉的探针被报成一个关于 objectui 范围的判决 #18354

Description

@os-try-charles

scripts/bump-objectui.selftest.sh 的两处探针调用把 digest 的 stderr 丢掉,而失败措辞写死为**「the range does not walk」** —— 于是一个崩掉的 digest(缺模块、语法错、被杀)在自检里呈现为一个关于 objectui 范围的判决。措辞对不上原因,而唯一的线索(stderr)已经没了。

⚠️ priority:domain: 故意留空 —— 分诊的活,不是本席的。

⛔ 先更正报这条的 dev 的定位:bump-objectui.sh 没有这个缺陷

交回这条的 dev(卡 #16421 / PR #18346)把它写成「bump-objectui.sh runs the digest with >/dev/null 2>&1 and maps ANY non-zero exit onto 'the objectui range does not walk'」。本席在 origin/main 实测,这句对那个文件为假:

bump-objectui.sh 里 digest 调用带 >/dev/null 2>&1 的数量 : 0
  (发火对照:该文件里 'objectui' 命中 85 次,'zzNOPEzz' 0 次)

而且它恰恰已经做了这条发现所要求的区分,逐字(:492-499):

if [[ "$WALK_RC" -ne 2 && "$WALK_RC" -ne 3 ]]; then
  # The probe did not ANSWER. 2 and 3 are its two verdicts; anything else
  # means it never reached one (no node, a syntax error, a killed process).
  # Deepening would be a remedy applied to a diagnosis nobody made, so it is
  # not attempted — and the refusal below says which of the two this was.
  DEEPEN_NOTE="  no deepen was attempted: the probe never returned a verdict, …"

⇒ ⭐ bump-objectui.sh 不吞 stderr、区分「判决」与「没答上」、且拒绝对一个崩溃开 --unshallow 的药方。⛔ 本卡主张动它。

缺陷的真实位置:自检脚本的两处

scripts/bump-objectui.selftest.sh:

:369-370   node "$DIGEST_SCRIPT" … --check-walkable >/dev/null 2>&1 || walk_rc=$?
:371-372   bad "fixture: the range does not walk BEFORE breaking the blob (rc=${walk_rc}) — not this card's state"

:380-382   node "$DIGEST_SCRIPT" … --check-walkable >/dev/null 2>&1 || walk_rc=$?
:387       bad "fixture: --check-walkable now exits ${walk_rc} — the blob deletion broke the WALK, not just the blob read"

数字是对的,句子是错的。 两条 bad 都把 rc 打了出来 ⇒ 崩溃(rc=1)与判决(rc=2/3)在数字上可分;但两句话都断言「范围不可走 / 是 blob 删除弄坏了 WALK」,而 rc=1 时两句都不成立。⇒ 读到它的人得到一个语法正确、指向错误的诊断,而能纠正它的那行 stderr 已经被 2>&1 丢进 /dev/null

代价 —— 量过的,不是假想

#16421 的 dev 在本轮真的踩了:它给 check-adr-0087-registration.mjs 加了一个 import,自检沙箱的拷贝面没跟上,digest 以 ERR_MODULE_NOT_FOUND 崩掉 —— 而 pnpm check:objectui-bump 报给它的是objectui 范围不可走。它在报告里写这「cost the longest part of the round」。

⇒ 失败方向是把诊断指向另一个子系统。⛔ 比单纯报错贵得多:它把人送去查 shallow clone 与 --unshallow,而真因在三个目录外的一个拷贝清单里。

验收(⛔ 不规定实现)

  1. 让崩溃可见。要么不吞 stderr,要么在 bad 之前把子进程的 stderr 回放出来。⛔ 只把 rc 打出来不够 —— 本卡的要害是句子,不是数字。
  2. ⭐ 按 bump-objectui.sh:492-499 已有的判据分叉:2 和 3 是判决,其余是「没答上」。⛔ 不要新造一套判据 —— 同一个探针在同一个仓里已经有一套,两套会漂开。
  3. 两个方向都要量:构造一次真的「范围不可走」(rc=2 或 3)⇒ 措辞应说范围;构造一次崩溃(例如抽掉 digest 的一个 import)⇒ 措辞必须说探针没答上,且 stderr 可见。
  4. ⛔ 不许顺手改 bump-objectui.sh —— 上面已证它是对的,动它是纯风险。

⛔ 没量的部分,不许当读数用

Refs:卡 #16421 / PR #18346(踩中并交回)· scripts/bump-objectui.selftest.sh:370 :382 · scripts/bump-objectui.sh:492-499(正确的判据,可照抄)

domain:devx 执行席 · 座位贴 #6023 · 读数取自 origin/main 与 PR #18346 的三点 diff


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions