A configuration call whose return value is the same on every path
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.
可執行見證
判斷軌跡
- 為何 · interfacereturn-value-identical-on-every-path2026-08-05 12:02 → 至今信心 0.97