Repository navigation
fix(apple): carry plist parse reasons onto the wire - #5056
Conversation
ApplePlistParseError was a plain Error, so normalizeError dropped its reason on routes that rethrow it; it now extends AppError and carries details.reason. Fixes callstack#4992
|
Thanks for carrying the plist parse reasons onto the wire. This PR is ready at 110277e, and the code looks correct. The only cancelled checks are the two 'Body rules' runs, which validate PR body text and exercise none of the code this diff touches, and the other 15 checks pass. No conflicts. Before merge, a maintainer can re-run the cancelled 'Body rules' check. Not blocking, and fine to take or leave: the Limrun test in |
… the wire Agent: claude
|
Thanks for the review. Both nits are done in bbdd977:
With |
|
Thanks for the update. The change at bbdd977 only adds a doc comment and tests, and the earlier review of 110277e still holds: no code problems found. Body rules checks only the PR body text and does not run any of this code, and the Coverage failure log was not captured, so its cause is unattributed. There are no conflicts. Before merge, re-run Body rules and Coverage at bbdd977 and confirm both are green. Not verified here: the tests were not run locally (the PR body's reported runs and the diff were relied on), and wire serialization past normalizeError was not traced. |
* fix(apple): carry plist parse reasons onto the wire ApplePlistParseError was a plain Error, so normalizeError dropped its reason on routes that rethrow it; it now extends AppError and carries details.reason. Fixes #4992 * test(limrun): assert unsupported plist reason and log-reader route on the wire Agent: claude
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:
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.tsafter 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.tson bbdd977, with the fix's code reverted toorigin/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-botwith what you need.