fix(apple): carry plist parse reasons onto the wire
Malformed or unsupported Info.plist errors on the Limrun route now reach callers as COMMAND_FAILED with details.reason. Issue #4992 offers two options; this takes the first:
- AppError with reason: keeps the documented reasons, adds an error-type change.
- drop the reason: removes the reason field and the two error-reasons.md rows, so the documented reasons go away.
Summary
ApplePlistParseError now extends AppError, so normalizeError keeps the reason.
Fixes #4992
Before / After
Before: UNKNOWN with no details.reason; the new test fails on base.
After: COMMAND_FAILED with details.reason apple_plist_malformed.
Value
Not a refactor.
Validation
Tests (agent-run) at bbdd977, clean setup (empty HOME, no git config): pnpm install --frozen-lockfile && NO_COLOR=1 pnpm exec vitest run packages/provider-limrun/src/ios-files.test.ts packages/provider-limrun/src/ios-app-logs.test.ts packages/platform-apple/src/core/__tests__/plist-value.test.ts after a setup script, exit 0. Last output line: Duration 1.66s (tests 37%, transform 37%, import 21%, setup 4%, worker 1%).
Fails without fix: corepack enable >/dev/null 2>&1 && pnpm install --frozen-lockfile && NO_COLOR=1 pnpm exec vitest run packages/provider-limrun/src/ios-files.test.ts packages/provider-limrun/src/ios-app-logs.test.ts packages/platform-apple/src/core/__tests__/plist-value.test.ts on bbdd977, with the fix's code reverted to origin/0.22: exit 1, failing: an unsupported Info.plist read for log metadata surfaces as COMMAND_FAILED with its reason; readInfoPlist reports a malformed Info.plist as COMMAND_FAILED with reason apple_plist_malformed; readInfoPlist reports an unsupported Info.plist as COMMAND_FAILED with reason apple_plist_unsupported_type.
AI disclosure: an AI coding agent wrote this PR; the results above are its runs.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.