Skip to content

fix(apple): carry plist parse reasons onto the wire - #5056

Merged
thymikee merged 2 commits into
callstack:0.22from
tlq5l:fix/apple-plist-reason-4992
Nov 24, 2026
Merged

thymikee merged 2 commits into
callstack:0.22from
tlq5l:fix/apple-plist-reason-4992

Conversation

@tlq5l

@tlq5l tlq5l commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

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.

View guided diff

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
@thymikee

Copy link
Copy Markdown
Member

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 ios-files.test.ts asserts only the malformed reason, so apple_plist_unsupported_type and the log-reader route have no wire-level assertion (a follow-up could add one), and the doc comment in plist-value.ts could mention that the error is now an AppError carrying COMMAND_FAILED. Not verified here: the tests were not run locally, and the Limrun wire serialization was not traced end to end beyond normalizeError.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 23, 2026
@tlq5l

tlq5l commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Both nits are done in bbdd977:

  • ios-files.test.ts now runs the Limrun readInfoPlist test for both reasons: a damaged body gives COMMAND_FAILED with apple_plist_malformed, and an unsupported <openstep/> tag gives COMMAND_FAILED with apple_plist_unsupported_type, both read through normalizeError.
  • ios-app-logs.test.ts adds a log-reader test: an unsupported Info.plist fetched for log metadata makes readLogs reject, and normalizeError gives COMMAND_FAILED with apple_plist_unsupported_type.
  • The ApplePlistParseError doc comment now says it is an AppError carrying COMMAND_FAILED with details.reason.

With ApplePlistParseError back to a plain Error, all three tests fail with UNKNOWN.

@thymikee thymikee removed the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 24, 2026
@thymikee

Copy link
Copy Markdown
Member

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.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 24, 2026
@tlq5l

tlq5l commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

The Coverage failure at bbdd977 is one test timing out at its 5 s limit: test/integration/interaction-contract/daemon-harness.test.ts (1 failed, 23,234 passed). It doesn't load either file this PR touches (two Limrun test files and a doc comment), and it passed 5 of 5 isolated runs at bbdd977.

@thymikee
thymikee merged commit 5e030e1 into callstack:0.22 Nov 24, 2026
14 of 16 checks passed
thymikee pushed a commit that referenced this pull request Nov 24, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants