Repository navigation
fix(native): reject mixed dyld refusal diagnostics - #5778
Conversation
|
The latest CI run passes static checks, source tests and the package build, but the portable suite fails five assertions in |
|
The five MCP availability failures reproduce on both the exact CI base and the actual PR merge. Their successful-route fixtures use a non-bundle target for bundle-only behavior. Upstream All 11 repaired MCP tests pass on current main, and this PR's 27 Mach-O tests pass on its published head. A combined integration of the three existing rea contributions with current main builds and passes 171 scoped tests, with one skip. The uploaded upstream refresh retains the existing contribution and adds no new production fix. Hosted CI and author readiness still need their normal review. The reviewed upstream revision |
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. |
[Medium impact] The changed code appears safe to merge; no blocking defect was found. SummaryTightens
Reviews (12) · Last reviewed commit: "merge: update native refusal fix against..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b05086e02b
ℹ️ 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: f4514bac2a
ℹ️ 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: 71b24cec02
ℹ️ 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".
|
Merged current upstream main ( Validation on uploaded head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0af4ad9951
ℹ️ 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".
When the imports and exports refusals disagree, or a refusal disagrees with the parsed Mach-O header, inspect_macho returned a generic output error that kept only one dyld_info capture. It dropped the header file type and the other refusal, so the failure could not show why the admitted diagnostic was rejected. The contradiction now has its own error. Its diagnostics keep the parsed file type and every admitted refusal (mode, admitted layout, exit code and output), and the captured output is still the conflicting command. The test checks the reason and the retained diagnostics for each contradiction case.
|
Merged current upstream main ( Validation on the preceding integration passed with pinned Node 24.22.1/npm 11.16.0: runtime/skill build, all 114 focused inspection/header/inventory/UUID-less boundary tests, and GitHub reports the new head |
|
Merged upstream 8d8d85b in 29749df; the five-file dSYM contribution is unchanged. The build, 179 focused tests, and Fresh CI exposed five additional fixture failures that reproduce on upstream itself. A separate four-file repair is published in 552992c; all 98 focused tests and |
CassieFox23
left a comment
There was a problem hiding this comment.
TL;DR: Main still has the bug from issue #5708. This PR fixes it with a careful check. inspect-macho only calls a dyld refusal "unsupported" when the Mach-O header agrees with it. CI is red on this head, but on tests this PR does not touch, and main's own run at the same base fails the same ones. The body is out of date in two places and the real-tool run was not repeated after the last change.
Findings
Should fix
- The body says "Hosted CI passed on the published head." That sentence is older than this head. I did not check which head it meant. On this head (29749df),
CI required,Portable tests,Source testsandTest shard (2/8)are red. Please fix that sentence once CI is rerun. The red tests are not this PR's (see the CI note under Worth a look). - The
Validation performedpart of the body is out of date. It says 27 tests passed inNativeMachoInspection.test.ts. A later section of the body says 32 there plus 35 innativeMachoHeader.golden.test.ts. The template asks to keep these results current. The body now has three stacked follow-up sections. A maintainer has to read all of them to learn what the head was tested with. One currentValidation performedlist would fix that. - The body does not keep the template shape. Missing or changed:
- The
Follow the contribution scopeparagraph is gone. The author's own text replaced it. - In
Contract and boundary impact, three labels are shortened or gone:Contribution scope fit and linked maintainer decision,Provider, bridge, target-format, or platform compatibilityandEvidence, artifact, provenance, or reconstruction contract. The labelGenerated metadatais renamedPackage and installation. TheExpected effectscheckbox list is one sentence. - In
Evidence and regression coverage, bullets replace the four labels (Tests added or updated,Base reproduction or other evidence,User-visible CLI/MCP output,Remaining proof gaps). The three evidence checkboxes are now bullets too. - In
Compatibility, safety, and release, a paragraph replaces the four labels. - The whole
Before mergesection is missing. - Extra sections were added:
Upstream refresh and validation,Review followupandShared cancellation fixture followup.Author readinessis present, with Human owner and all three boxes checked, and thePR readinesscheck is green.
- The
Worth a look
- The check for the old missing-UUID refusal got stricter. On main,
isMissingUuidDyldFailureaccepts the refusal if any line matches and ignores stderr. On this head,dyldFailureDiagnosticneeds exactly one stdout line and empty stderr, andisMissingUuidDyldFailurenow uses it. That closes the gap Codex found. It also changes what counts as a missing-UUID refusal in the existing feature. The body says the real UUID-less control was not repeated after the file-type fix. Could the author run that control again on the final head? Suppose a realdyld_infoadds a second line or writes to stderr. Then a UUID-less executable would turn from a retained limitation into a failure. I did not run it. - CI. The failed tests are in four files. One is
src/ida/IdaNativeProtocol.test.ts(literal matching). One istests/composition/analysis-sessions/managedApplicationGraph.test.ts(in-module calls). One istests/acceptance/cliFormattingCapacity.test.ts(two Markdown tests). One istests/boundary/browser/cdpResourceCompleteness.test.ts. The PR's five files do not include any of them. Main's own push run at this PR's base (8d8d85b, run 39987706965) fails the same four files. So I would not hold this PR for them. A rerun is needed once main is green.NativeMachoInspection.test.tsand the header golden test are not in any failure list. - The CORE and FVMLIB diagnostics (
unknown mh.filetype 4and3) are tested against a fake runner only. The body says so ("does not establish ... a real operating-system CORE dump"), which is honest. It also means the exact wording rests on the report in #5708. I did not check it. - When only one dyld mode refuses (say
-imports) and the other succeeds, the refusal still wins. The test "confirms a refusal from %s without invoking the export fallback" covers this. That seems right to me, because the header says dyld cannot read the layout. A maintainer may want to confirm it.
Nits
- The error text uses the internal kind in capitals: "dyld_info cannot inspect this DSYM layout: ...". A short phrase ("dSYM") would read better, but the raw diagnostic is kept beside it, so this is minor.
Looks good
- Main (ef475fc) still has the bug. It has no recognition of the dSYM, CORE or FVMLIB refusals in
src/native. A failingdyld_infothat is not a missing-UUID refusal still returns the generic failure. The five files this PR touches are unchanged on main since its base. - The admission is narrow and cross-checked. A refusal counts only when the text is exact and the independently parsed
otoolheader agrees. A mismatch stays a failure. So does a mixed error, and so does a contradictory imports/exports refusal. The contradiction error keeps the header and both refusals. - The file-type mapping now lives in the
otoolparser, with the raw spelling kept for output (canonicalFileType). The numeric and symbolic spellings are tested. The golden test checks unknown kinds ("99", "FUTURE_KIND"). - The refusal now returns before the
nmexport fallback, as Greptile and Codex asked. A test fails the run if that fallback is attempted. - The author answered each bot thread with a fix and new regression cases, and the body is open about what was not rerun.
- No other open PR mentions #5708 (search on the number found only this one), so there is nothing to compare against.
Not run
- No checkout, no build, no tests, no macOS tools. I read the code and the CI logs only.
- I did not run a real
dyld_infoon a dSYM, CORE or FVMLIB file. - I did not read the PR's other test file diffs beyond titles and the main test file.
Thanks, jdotc1, for the careful, well-tested fix and for answering every bot thread.
Test setup
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
|
Completed the requested final-head real macOS UUID-less check at |
|
Fixed the integration case’s timeout in |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
Resolved the merge conflict and pushed |
|
Reviewer update for head
The PR body's evidence is current. This update reuses completed results; no checks were rerun and no unrelated repairs were added. |
|
Could a maintainer please rerun only Validate author declaration in run 40035969509? The original job failed while fetching PR metadata because the installation API rate limit was exhausted, before it could evaluate the readiness declarations. The declarations remain unchanged. After the recorded reset time, I attempted a single-job retry, but GitHub returned HTTP 403: “Must have admin rights to Repository.” No retry started. No other checks need to be rerun for this request. Thank you. |
Retain the exact single-diagnostic checks for missing-UUID and dSYM failures alongside upstream CORE/FVMLIB refusal classification.
Summary
Follow up on upstream's dSYM refusal fix in f83d97f. Require one exact dyld diagnostic before treating a nonzero result as a known refusal. Additional stdout/stderr diagnostics remain errors with their captures preserved. Refs #5708; the basic dSYM classification is already upstream.
Problem and expected behavior
The upstream predicate searches for a matching line in either stream. A recognized dSYM line plus an unrelated error is therefore classified as unsupported instead of retaining the mixed result as an inspection failure. A second admission predicate can also accept a mixed missing-UUID/dSYM output and continue inspection.
Change and scope
Normalize settled dyld output once in the existing command-diagnostics owner and admit exactly one nonempty diagnostic. Preserve stdout-only admission for missing UUID and upstream's stdout-or-stderr support for the observed dSYM refusal. Keep upstream header validation and error/capture projection. The contribution changes two files. The previous CORE/FVMLIB expansion, canonical file-type parser changes, and real-CLI test timeout change are removed from this follow-up.
Follow the contribution scope. This is an ordinary correction to existing read-only inspection; no new provider or execution capability is introduced.
Contract and boundary impact
Expected effects:
Process launch refers to the existing inspection utilities; the selected target is not executed.
Evidence and regression coverage
For evidence-bearing changes:
Validation performed
Published merge head:
a27bfc9bef7065a44d0e36afb83cbfb219648d22; upstream parent:aba487eec0303b3392dbea7f33846617158aad3f.Merged current upstream main without conflicts. This includes upstream's fixture-size repair in
2acdd54130c7a07c78168ff1b2d8f98b598319ac. The contribution remains two files, and both contribution files are unchanged from the preceding published headafe6f31feb9fd306ee3d2751d78f9eaf5486434a.Reused validation:
NativeMachoInspection.test.tstests andnpm run check:faston Node 24.22.1 after its prior conflict resolution. Those results were not rerun for this merge.New merge checks: reviewed the upstream-relative two-file contribution, confirmed no changes to its implementation or regression-test file, confirmed inclusion of the upstream repair, and passed
git diff --cached --checkbefore committing. The remote branch and PR head match the published merge commit. Current-head hosted CI is pending.No local test, build, native-provider, compiled CLI/MCP, or broad static suite was repeated. The prior head's JavaScript parent-memory budget failure was not repaired in this contribution; new CI remains authoritative. Historical broader-branch real-tool and 93-test receipts do not verify this narrowed implementation.
Compatibility, safety, and release
Author readiness
Human owner: @jdotc1
Before merge