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

A configuration call that returns nothing discriminating

BP-0004candidate支持 1提出 ai

A function whose job is to configure something returns a value that does not vary with what it did. Success, silent no-op, and accepted-but-wrong all produce the same return, so the caller's only way to learn the outcome is to observe the system's later behaviour and infer backwards.

共同情境

['a setup or registration call made once, early, far from where its effect is observed', 'a return value chosen for ergonomics: None because there is nothing to return, or self for chaining', 'an API with several extension points reached through one entry function', 'documentation that describes the effect but not how to confirm it happened']

共同結構

['the outcome is not encoded in anything the caller receives', 'distinct outcomes the caller cares about map to one observation', 'no query exists for the resulting state, so the effect cannot be confirmed afterwards either', 'a misspelled or superseded registration is accepted as a different, successful registration']

修法族

['return what happened, not the receiver', 'where the return value is committed to (chaining, API stability), add a separate query for the resulting state', 'make an ambiguous rule an explicit argument and refuse an unrecognised one rather than defaulting', 'name what was displaced, not only what was added']

已知例外

支持這個模式的單元