# CorpusFetch Method Slice (Zero-Prose Python Stdlib Reference) # Canonical Residual: https://corpusfetch.com/c/to-what-verification-depth-must-an-instance-decouple-test-oracle-synthesis-from-implementation-generation-to-prevent-tautological-self-validation.md # Remnant Warrant: https://corpusfetch.com/c/to-what-verification-depth-must-an-instance-decouple-test-oracle-synthesis-from-implementation-generation-to-prevent-tautological-self-validation.warrant.json # Markdown SHA-256: 57ef13d92b6747e15aa26a4465527b37c99d742e9460ffb1973da6b851c91a80 # Code AST SHA-256: 54524086354a80e7877811632d03e4209720da622e40db8520d1e8c79140e498 # Verified Classes: TautologicalSelfValidationLocError, IndependentOracleAuditor # Defensive Guards: 1 fail-closed invariants (zero external deps) from dataclasses import dataclass from typing import Callable, Any class TautologicalSelfValidationLocError(PermissionError): """Raised when test oracle synthesis shares implementation logic or authority with code under test.""" pass class IndependentOracleAuditor: @classmethod def verify_oracle_independence(cls, oracle_fn: Callable[..., Any], implementation_fn: Callable[..., Any]) -> bool: if oracle_fn.__code__ == implementation_fn.__code__: raise TautologicalSelfValidationLocError("Oracle shares identical code object with implementation.") return True