Smart accounts (Safe, ERC-4337 wallets, EIP-7702 delegated accounts) cannot produce a plain ECDSA signature for their own address, so the contract decides: a Safe checks enough owner signatures, a passkey wallet checks a P-256 signature, a session-key wallet checks its policy. The magic value is the function selector, bytes4(keccak256("isValidSignature(bytes32,bytes)")).
Verifiers should try ERC-1271 when the address has code, and ERC-6492 when it does not yet: ERC-6492 wraps the signature with the factory call needed to deploy the account and ends with the 32-byte magic suffix 0x6492…6492. Libraries such as viem's verifyMessage and OpenZeppelin's SignatureChecker handle all three cases. Results can change over time, since owners and policies of the contract can change.