Skip to content

refactor(apple-ips): report crash-report format failures through ParseFailure - #10665

Merged
morluto merged 1 commit into
mainfrom
refactor/apple-ips-parse-failure
Nov 15, 2026
Merged

morluto merged 1 commit into
mainfrom
refactor/apple-ips-parse-failure

Conversation

@morluto

@morluto morluto commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Apple .ips crash-report parser now reports format failures through the shared ParseFailure algebra (format apple-ips). AppleIpsFormatFailure and its provider translation are deleted. parseFailureAnalysisError gains an optional argument naming the input that selected the artifact. AppleIps passes path or join_path, and every other caller keeps the default path. The parser-format-failure-class baseline drops by one.

#10652 (which added the parser-format-failure-class guard) is merged; this branch is rebased on main. It is a sibling of #10664 (pyc), and the two each remove a different line from the same baseline. Part of plan W7 (parser kernel).

Problem and expected behavior

AppleIpsFormatFailure{malformed|unsupported} restated the ParseFailure algebra under its own class. AppleIpsProvider translated it by hand because the shared mapper always named path, while AppleIps reports against the active input field (path or join_path).

Expected: the parser throws ParseFailureError, and the provider calls parseFailureAnalysisError(OPERATION, activePath, cause, field).

Change and scope

  • src/domain/parseFailureAnalysisError.ts: an optional field argument, default "path". This is additive, so existing callers are unchanged.
  • src/native/apple/AppleIps.errors.ts: deletes AppleIpsFormatFailure and adds APPLE_IPS_FORMAT. AppleIpsResourceFailure stays, because its recovery names caller budgets.
  • AppleIpsParser.ts and AppleIpsJsonShape.ts throw malformedInput and unsupportedInput, and the JSON-shape catch rethrows ParseFailureError.
  • AppleIpsProvider.ts uses the shared mapper.

Not included: moving the resource failure onto a ParseFailure limit. Source reading shows that the join path (resolveAppleIpsJoin) returns unreadable rather than throwing a format failure, so today only the path parse reaches this mapping. The field is still passed through so the mapping is correct if that changes.

Contract and boundary impact

  • Semantic owner and earliest changed stage: the parser produces the failure, and parseFailureAnalysisError is the one translation.

  • Contribution scope fit and linked maintainer decision: not applicable. This is an internal refactor, and the coordinator decided to extend the mapper with a field argument.

  • CLI and MCP/tool-catalog contract: unchanged. The categories, the issue field and the Selected artifact <path>: message match the previous AppleIps mapping.

  • Provider, bridge, target-format, or platform compatibility: none.

  • Evidence, artifact, provenance, or reconstruction contract: none.

  • Target selection, authority, upstream behavior, and cleanup details: not applicable.

  • Generated metadata, package, or installation impact: none.

  • Read existing files or captured data.

Evidence and regression coverage

  • Tests added or updated:
    • src/domain/parseFailureAnalysisError.test.ts: names the input that selected the malformed artifact asserts the join_path issue path.
    • src/native/apple/AppleIpsParser.test.ts: expects ParseFailureError, and the stackshot test asserts failure.kind: "unsupported" and failure.format: "apple-ips".
  • Base reproduction or other evidence: this is a refactor. The existing CLI and MCP AppleIps tests pass unchanged.
  • User-visible CLI/MCP output: unchanged.
  • Remaining proof gaps: none known.

Validation performed

  • npm run test:focused -- src/domain/parseFailureAnalysisError.test.ts src/application/binaryDiagnostics/AppleIpsService.test.ts src/native/apple/AppleIpsParser.test.ts src/native/apple/AppleIpsProvider.test.ts tests/acceptance/appleIpsArmJoinCli.test.ts tests/acceptance/appleIpsCli.test.ts tests/acceptance/appleIpsUnlistedKeys.test.ts tests/boundary/filesystem/appleIps.test.ts tests/boundary/mcp/appleIpsMcp.test.ts tests/process-global/artifactReadFailurePrecedence.test.ts: 10 files, 129 tests passed.
  • node scripts/verify/architecture-guards.mjs --shrink-baselines: passed and lowered the baseline.
  • npm run check:fast: typecheck and lint passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. AppleIpsFormatFailure was internal.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no change.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T20:36:25.816849Z 8f8cc36 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Apple .ips format errors now use ParseFailureError and the shared parseFailureAnalysisError mapper.

  • Apple crash reports now report format failures through the shared parser error flow.

Reviews (1) · Last reviewed commit: "refactor(apple-ips): report crash-report..." · Reviewed by Greptile

Base automatically changed from refactor/rust-auditable-parse-failure to main November 14, 2026 20:28
@morluto
morluto force-pushed the refactor/apple-ips-parse-failure branch from 95c151e to 8f8cc36 Compare November 14, 2026 20:35
@morluto
morluto merged commit d482bb9 into main Nov 15, 2026
53 checks passed
@morluto
morluto deleted the refactor/apple-ips-parse-failure branch November 15, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant