Repository navigation
feat(apple): inspect IPS crash reports - #6511
Conversation
Add inspect_apple_ips for caller-selected Apple .ips files. Parse the first-line metadata object and, when bug_type is the string 309, the crash body: process identity, exception and termination facts, threads, usedImages, lossless integer registers, and documented classification rules. Other bug types including 288 stackshots return no crash result. Opened Mach-O and dSYM UUID joins remain unobserved. Related to morluto#4297
Use the arm64e fixture integer that matches 0x8527000193ed4944 instead of an IEEE-754-rounded decimal, and count the lossless JSON example length from the source text.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3554c6271
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
[Medium impact] The PR appears safe to merge; all previous findings are addressed and no new actionable issues were found. SummaryAdds
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["CLI or MCP: selected file"] --> B["Read bounded, stable bytes"]
B --> C["Decode UTF-8 and read metadata"]
C --> D{"bug_type is 309?"}
D -- No --> E["Unsupported; no crash result"]
D -- Yes --> F["Parse selected fields with limits"]
F --> G["Read facts and record type mismatches"]
G --> H["Classify recorded crash strings"]
H --> I["Check output and build Evidence"]
I --> J["Return inline result"]
F -- "Malformed or over limit" --> K["Typed error; no partial success"]
Reviews (2) · Last reviewed commit: "fix(apple): budget IPS parsing and keep ..." · Reviewed by Greptile |
baron
left a comment
There was a problem hiding this comment.
AI-assisted independent review confirms substantive existing parser findings despite green main CI; please fix the producing representation rather than downstream output.
Concrete counterexamples at this head:
- Wrong-type
threads/usedImagescollections become empty arrays withcoverage.status="complete", silently losing recorded input. - Decimal
3735933132is0xdeadd0cc, yet the classifier emits adead10ccmatch and evidence value0xdead10cc. Compare the already-parsed canonical hex once; the correct decimal is3735883980. - A 300,056-byte report with 150,000
threadState.xentries expands into 150,000 register objects under default row limits while reporting complete coverage. Budget intermediate JSON/collection/register expansion before allocating.
The review also confirms the existing OS-version dictionary, non-faulting top-frame role and invalid-UTF-8 concerns. These are not merely missing tests. Preserve typed presence, original values and explicit unknown/partial states; add real-producer, malformed and capacity controls.
Validation was exact-head source review plus isolated parser probes with adapted imports/constant-table dependencies, not full CLI/MCP or a real Apple-generated report. No OOM or peak-memory measurement is claimed. Main CI 39917627186 passed; readiness correctly fails the unchecked human declarations. Existing threads already cover these issues, so no duplicate inline threads added.
Parse the IPS metadata and crash body through a projection of the documented members. Members the report does not interpret are syntax-checked without being materialized, and thread, frame, image and the new max_registers budgets run before each row is parsed, so a large selected file fails with a typed resource error instead of first expanding every row. Fixed allowances bound JSON nesting, unlisted key names and termination reasons. Present values whose JSON type differs from the documented one are no longer read as absence: they are listed in coverage.type_mismatches and coverage becomes partial, including wrong-type or missing threads and usedImages collections. osVersion keeps the producer dictionary or the string form. Frame roles follow physical frame depth, so the top frame of a non-faulting thread is current_instruction and inlined rows share the following frame's role. SIGKILL classes compare the canonical hex once, so 0xdeadd0cc no longer matches dead10cc. Invalid UTF-8 is refused instead of being replaced, and JSON strings are decoded by copying unescaped spans. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ra7LM2NyQ7DumdssxbUq5g
|
@baron thanks for the detailed review. 80ad2a0 fixes these in the parser rather than downstream: wrong-type collections are reported as typed mismatches with partial coverage, the classifier compares canonical hex (3735933132 no longer matches dead10cc), and thread, frame, image, and register budgets are checked before rows are materialized, so the 150,000-register report is refused under defaults. OS version dictionaries, depth-based frame roles, and invalid UTF-8 rejection are covered too, with malformed, producer-shaped, and capacity tests. Not yet validated against a real Apple-generated report; the fixture follows ReportCrash output. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80ad2a02e9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b925786b9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45a570656c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c838caea4a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
The static-check failure on c838cae was introduced by my two schema-binding lines retaining the previous indentation after I added their explicit SDK schema types. Commit f6c270d fixes only that whitespace. The complete local format:check passes on all 5,556 matched files; check:fast/docs and the 182-case public-workflow result remain applicable. This failure is not classified as an unrelated main failure. Current-head CI is being evaluated separately. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5cdb343d4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
The successful Build package job checked out exact CI merge |
|
Final head The historical changes-requested review on Since CI started, main added verifier cleanup ownership, unrelated browser/function-error changes, and a bounded stable-read optimization. The exact predicted merge with Main subsequently added environment state-target support in |
Adds
inspect_apple_ips/inspect-apple-ipsfor a selected local Apple crash JSON file (bug_type: "309"), returning process/exception/termination/frame/image/register facts, lossless integers, classification evidence and explicit coverage. No target execution or symbolication occurs.The parser projects selected members and admits row/integer-text costs before expansion. Frames reference image facts retained once; malformed UUIDs and rejected integer lookups retain their source spelling. Recorded indexes remain separate from resolved references, and each frame keeps its own recorded offset. Follow-up review fixes preserve original JSON text, accept only JSON whitespace, require unresolved faulting-thread diagnostics at the shared service boundary, and advertise consistent classified/nonempty and unclassified/empty schema variants.
Validation: all 216 selected producer/service/filesystem/CLI/actual-stdio-MCP/consumer checks pass after integrating main
98ec00f4068bab894639d0d1d83ac0bfc428bcbf, plus check:fast, complete format:check and docs:check. Nineteen new consistency/admission controls fail before correction; actual SDK/Ajv checks validate both classification alternatives and reject contradictions. Existing coverage includes a 7,500,000-escape file under a selected 256 MiB heap. Two pinned public crash files pass actual SDK/oracle validation; live OS capture, dSYM joins and symbolication remain unqualified.Earlier completed tasks preserve full Evidence/IDs and document large image-metadata savings and a case-specific escaped-string CPU/memory improvement. Those pins are retained; no token or speed reduction is claimed for the final consistency correction or its expanded output schema. Exact measurements, failed attempts, CI attribution and verification gaps: report. No skipped/cancelled job counts as passing. Existing human-readiness declarations are preserved below.
Author readiness
Human owner: @mvanhorn