XCResultKit.XCResultFile.exportPayload(id:) returns its temp path unconditionally — the underlying exportAttachment is @discardableResult and its failure is never checked.
So the guard let savedURL = file.exportPayload(id: id) else { … } fault branches in ResultFile.exportPayload and exportPayloadData are unreachable. Every genuine export failure actually surfaces later, as the moveItem throw.
Task: either remove the dead branches, or (better) detect real export failure properly — checking that the temp file exists and is non-empty before attempting the move. Relates to the --legacy migration issue, since that will change this API surface anyway.
XCResultKit.XCResultFile.exportPayload(id:)returns its temp path unconditionally — the underlyingexportAttachmentis@discardableResultand its failure is never checked.So the
guard let savedURL = file.exportPayload(id: id) else { … }fault branches inResultFile.exportPayloadandexportPayloadDataare unreachable. Every genuine export failure actually surfaces later, as themoveItemthrow.Task: either remove the dead branches, or (better) detect real export failure properly — checking that the temp file exists and is non-empty before attempting the move. Relates to the
--legacymigration issue, since that will change this API surface anyway.