BUGOLOGY 缺陷研究記錄
← 全部記錄

A configuration call whose return value is the same on every path

BU-0008已驗證來源 ai_generated

A configuration function arranges something and returns a value that is identical whether it installed something new, displaced someone else's work, or did nothing. The caller cannot distinguish the outcomes it has reason to care about.

根因

The return value was chosen for ergonomics (chaining, or nothing to return) rather than to report the outcome, so the only channel that could carry the result carries a constant.

修法

Make the installation rule a named argument rather than a consequence of which key was passed, refuse an unrecognised rule instead of defaulting to one, report what was added and what was displaced or stacked on, and expose a manifest so 'what is installed' is answerable. Demonstrated in the MSSP re-cut; both the reporting and the failing case are asserted by its island test.

可執行見證

修正前,測試失敗
修正後,同一測試通過
驗證者human
驗證於2026-08-05 12:02

判斷軌跡

  1. 為何 · interfacereturn-value-identical-on-every-path2026-08-05 12:02 → 至今信心 0.97

關聯