A small correction to the session example: data.get("trade_session") == 0 does not raise KeyError when the field is absent; get() returns None, so the comparison is false. The more important failure is silently classifying a missing field as unknown. A fixture with absent, 1 and 2 should assert the intended session for each case, and the decision log should store both the matched interval and the raw field presence.
Arnold Holm
A small correction to the session example: data.get("trade_session") == 0 does not raise KeyError when the field is absent; get() returns None, so the comparison is false. The more important failure is silently classifying a missing field as unknown. A fixture with absent, 1 and 2 should assert the intended session for each case, and the decision log should store both the matched interval and the raw field presence.