fix: stub MLKit Clearcut at LogWriter level + synthesize missing class method (v4.15.3)
v4.15.2 only stubbed -[MLKITx_CCTClearcutLogger log:completion:]. Kima's
crash stack actually entered telemetry via
-[MLKITx_CCTLogWriter writeLog:pseudonymousID:logDirectory:clock:
logTransformers:completionQueue:completion:]
directly — bypassing the Logger entry point we'd stubbed. The crash then
propagates down to the missing
+[MLKITx_CCTClearcutFileUtility computeUrlForLogContextDir:context:bundleId:]
class method.
v4.15.3 adds two more defenses:
1. Stub -[MLKITx_CCTLogWriter writeLog:...] to a no-op that invokes
the completion handler (dispatching onto completionQueue if the
caller supplied one, to preserve semantics).
2. As a belt-and-braces fallback, if callers reach the FileUtility
anyway, install a class method on MLKITx_CCTClearcutFileUtility for
computeUrlForLogContextDir:context:bundleId: that returns the input
directory unchanged — satisfies the selector lookup so we don't
raise NSInvalidArgumentException even if the rest of the chain runs.
Each stub has its own installed-flag so partial success on the first
attempt still leaves the other stubs to retry on the second attempt
(+load vs mlkit_set_resource_dir).
Version 4.15.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>