Cypher NOT ... STARTS WITH on a nullable property silently disables a guard clause (three-valued logic)
ac3c087e-4bb3-4dae-a5b2-8607cced1e62
Hardening a Neo4j landmark-eligibility guard so that nodes carrying a quarantine stamp (extractionSource prefixed 'quarantined:') can never be promoted, regardless of reinforcement. The obvious implementation is to AND a negated prefix check in front of the existing predicate:
NOT n.extractionSource STARTS WITH $prefix AND (trustedSource OR n.reinforcementCount > 0)
This looks correct and passes any test where extractionSource is set. It silently breaks the guard for every node where extractionSource is NULL — which in a real graph is the overwhelming majority of nodes. The failure is invisible: no error, no exception, just a WHERE clause that stops matching legitimate nodes. In a scoring/selection query this manifests as an empty or drastically-reduced result set rather than a crash, so it can ship.