""" Tests for the eretz_gezerah sentinel — property 12 (unmanaged destination opacity) from azazel_engineering_reading.md §14. The destination MUST be opaque. There is no name, no URL, no queue identifier, no string handle that encodes anything about where state goes after disposal. The only legitimate reference is the sentinel ERETZ_GEZERAH; identity comparison (`is`) is the only legitimate predicate. """ import pathlib import pytest from azazel_processor.eretz_gezerah import ERETZ_GEZERAH, is_eretz_gezerah # ============================================================ # The sentinel itself # ============================================================ def test_sentinel_exists(): """ERETZ_GEZERAH is importable and is the same object across imports.""" from azazel_processor.eretz_gezerah import ERETZ_GEZERAH as second_import assert ERETZ_GEZERAH is second_import def test_sentinel_is_a_plain_object_not_a_string(): """A string would be searchable, interned, serializable. The sentinel must NOT be a string. Property 12: opacity of name.""" assert not isinstance(ERETZ_GEZERAH, str) assert not isinstance(ERETZ_GEZERAH, bytes) def test_sentinel_has_no_meaningful_attributes(): """A bare object() has no useful attributes for tooling to discover. We don't grant the sentinel a name, a destination string, or any other tracking handle.""" # Plain object() exposes only the dunder methods. No public attrs. public = [a for a in dir(ERETZ_GEZERAH) if not a.startswith("_")] assert public == [] def test_sentinel_repr_does_not_leak_destination_info(): """The repr is just object()'s default — no operator-readable name encoding 'where it goes'. Default Python repr is `` which leaks only the address (changes per process).""" r = repr(ERETZ_GEZERAH) assert "