Build a small text classifier with secret-safe configuration, output validation, and useful failure logs.