fix(native): report an ownership-helper compile timeout as retryable

When the macOS process-ownership helper's swiftc compile hit
REA_SWIFTC_COMPILE_TIMEOUT_MS, inspect-macho and other native commands
reported a non-retryable provider failure, while process capture
already treated the same fact as retryable. The helper's error now owns
that interpretation (compilerTimedOut and compileTimeout, with its
deadline, message and recovery). Native commands return a retryable
AnalysisTimeoutError naming REA_SWIFTC_COMPILE_TIMEOUT_MS, and process
capture reads the same fact.

Fixes #8936
Supersedes #8938

Based on #8938; the interpretation moves to the error's owner so both
consumers share it.

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
ducanhnguyen223andgensokyo-dev authored and Ysopwnable committed 2026-11-14 15:32:34 +01:00
1 parent f8fc5be364
commit ba32cd3c28
5 files changed
+248 -4

No files matched your search

+13 -1
View File
@@ -124,7 +124,19 @@ export const translateNativeCommandFailure = (
})
: cancellationPrimary && cancelled !== undefined
? cancelled
: new ProviderAdapterError(IDENTITY.id, operation, options);
: // The ownership helper's compiler deadline is a retryable timeout
// with its own setting, not a provider failure.
darwin?.compileTimeout !== undefined
? new AnalysisTimeoutError(
operation,
darwin.compileTimeout.timeoutMs,
{
...options,
userMessage: darwin.compileTimeout.userMessage,
remediationAction: darwin.compileTimeout.remediationAction,
},
)
: new ProviderAdapterError(IDENTITY.id, operation, options);
return retainProcessInspectionCleanup(
preparation,
bindCleanup(error),