Skip to content

fix(ida): keep binary_overview available without segment enumeration - #2513

Closed
Jackzigen wants to merge 9 commits into
morluto:mainfrom
Jackzigen:fix/ida-binary-overview-documents
Closed

Jackzigen wants to merge 9 commits into
morluto:mainfrom
Jackzigen:fix/ida-binary-overview-documents

Conversation

@Jackzigen

@Jackzigen Jackzigen commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

binary_overview failed for every IDA configuration because provider selection could not be satisfied:

  1. list_documents was not declared by the IDA adapter, so resolveAnalysisDocument fell back to current_document, which the IDA compatibility profiles also do not expose — document resolution failed before any analysis ran.
  2. list_segments was a hard requirement, but none of the three upstream IDA MCP profiles expose a segment enumeration tool, so no IDA configuration could ever satisfy the composed requirement.

Changes

  • Declare and implement list_documents (IdaProviderCapabilities / IdaOperationRunner / IdaSessionClient): an IDA session binds exactly one target, so the adapter reports the bound input identity — the observed attached-input path, or the headless workspace input path — the same way Ghidra reports its single imported Program.
  • Mark list_segments optional in the binary_overview requirements (CapabilityInventory): requirement entries may end with ?; optional facets do not block provider selection.
  • Degrade gracefully in the composed workflow (EnhancedTools#binaryOverview): when list_segments reports capability-unavailable, the tool still returns document/procedure_count/string_count and omits segments/segment_count (unobserved), mirroring the existing degradation in #findXrefs. Every other segment failure still propagates.
  • Contract/docs: segments and segment_count are optional in the output schema; the tool description now states that missing segment fields mean the provider lacks that facet, not that the binary has no segments.

Design notes

I considered the two directions raised in the issue:

  • Hard-declaring both operations would make list_segments a lie: no upstream profile can enumerate segments, so the adapter would have to synthesize or fail at run time. Rejected.
  • Optional facet + omission keeps the tool truthful and available. The omitted fields read as unobserved, consistent with how the codebase treats empty facets elsewhere.

Testing

  • New src/ida/BinaryOverviewRequirement.test.ts (co-located with the adapter per repo convention):
    • IDA headless declares list_documents;
    • binary_overview requirements are satisfied when list_segments? is absent;
    • a missing required operation still reports provider_missing.
  • Full test:fast: 426 files / 5528 tests passing. tsc --noEmit, lint, format:check, knip, metadata:check, verify:module-boundaries, verify:architecture-guards all clean.

Closes #2460

Summary by CodeRabbit

  • New Features
    • Binary overviews now remain available when segment enumeration is unsupported. In that case, the overview includes procedure and string counts while omitting segment details; missing segment fields indicate that the information was not observed.
    • IDA can now report the document associated with the active analysis session.
  • Bug Fixes
    • Missing optional segment support no longer makes binary overview unavailable, while failures in required analysis operations continue to be reported.

The IDA compatibility profiles expose no segment enumeration tool, so
binary_overview failed provider selection: list_documents was not
declared (blocking document resolution) and list_segments was a hard
requirement no profile can satisfy.

- Declare and implement list_documents: an IDA session binds exactly one
  target, reported through the bound input path like Ghidra reports its
  single imported Program.
- Mark list_segments optional in the binary_overview requirements so
  providers without that facet keep the tool available; the composed
  output omits segments/segment_count (unobserved) instead of failing,
  mirroring the existing capability-unavailable degradation.
- Document the optional fields in the tool contract.

Closes morluto#2460
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T19:08:13.211788Z 70f20f4 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.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f48c45bd-c8fe-4049-a50b-8d213fc081ed
📥 Commits

Reviewing files that changed from the base of the PR and between 16f5ded and 72e4698.

📒 Files selected for processing (8)
  • src/application/CapabilityInventory.ts
  • src/application/EnhancedTools.ts
  • src/contracts/enhancedToolContracts.ts
  • src/contracts/toolOutputSchemaGroups.ts
  • src/ida/BinaryOverviewRequirement.test.ts
  • src/ida/IdaOperationRunner.ts
  • src/ida/IdaProviderCapabilities.ts
  • src/ida/IdaSessionClient.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The IDA adapter now declares and implements list_documents using the session’s document identity. binary_overview treats list_segments as optional and can return without segment fields when segment enumeration is unavailable.

Changes: IDA Binary Overview Support

Layer / File(s) Summary
IDA document identity
src/ida/IdaSessionClient.ts, src/ida/IdaOperationRunner.ts, src/ida/IdaProviderCapabilities.ts
IDA sessions provide a document identity to the operation runner. The runner returns it through list_documents, which is now included in IDA capabilities.
Optional segment capability
src/application/CapabilityInventory.ts, src/ida/BinaryOverviewRequirement.test.ts
binary_overview marks list_segments as optional. Availability checks ignore absent or unavailable optional operations. Tests cover IDA availability and the missing required list_documents case.
Binary overview output
src/application/EnhancedTools.ts, src/contracts/toolOutputSchemaGroups.ts, src/contracts/enhancedToolContracts.ts
When segment enumeration is unavailable, binary_overview returns the document and procedure and string counts without segment fields. The output schema permits those fields to be omitted, and the description states that omitted fields mean unobserved.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: n0zom1z0

Merge Risk: ⚪ Minimal · up to 72e46

binary_overview now works with the IDA provider and omits segment fields when segment enumeration is unavailable. No merge-blocking risk was found.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Description check Warning The description explains the problem, solution, design rationale, tests, and reported validation, but it omits most required template sections, including Contract and boundary impact, Validation perfo… Add the missing template sections. Document scope and authority, contract and provider compatibility effects, exact validation commands and observed results, compatibility and security implications, generated metadata or package impact, rem…
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately identifies the primary IDA behavior change: keeping binary_overview available without segment enumeration.
Linked Issues check Passed Issue #2460 requires binary_overview to avoid the IDA provider failure caused by undeclared list_documents and unsupported list_segments, either by declaring operations or by degrading with a cl…
Out of Scope Changes check Passed The changed capability logic, IDA session implementation, composed workflow, output contract, documentation, and tests all support issue #2460. No unrelated change is demonstrated by the reviewed evid…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 8…
Full details: Description check

Explanation

The description explains the problem, solution, design rationale, tests, and reported validation, but it omits most required template sections, including Contract and boundary impact, Validation performed with exact commands and results, Compatibility, safety, and release, and Before merge checklist items.

Resolution

Add the missing template sections. Document scope and authority, contract and provider compatibility effects, exact validation commands and observed results, compatibility and security implications, generated metadata or package impact, remaining proof gaps, issue-link rationale, and completed Before merge checklist items.

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the segment list,
Then counts the strings and procedures.
If segments cannot be observed,
The overview leaves those fields aside.
IDA names the document it sees,
And hops along with clearer facts.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72e469890f

ℹ️ 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".

Comment thread src/ida/IdaSessionClient.ts Resolved
Comment thread src/application/CapabilityInventory.ts Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

@greptileai review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Makes segment enumeration optional for binary overview.

The tool description must satisfy the repository guide before merging; the shared-root cleanup check also needs a non-blocking reliability fix.

Findings

  1. P2 Other sessions cause false failures ▶
  2. P2 Description mixes facts with advice ▶
Fix with agent prompt
### Issue 1
scripts/lib/ida-verifier-workspaces.mjs:19
The cleanup check treats every new `rea-ida-*` entry in the shared root as a leak from this CLI run. If another headless session creates a workspace while the overview runs, verification fails even when its own session cleaned up correctly. This can happen with the default `tmpdir()` root.

Give the verifier a private root and pass it to the child, or check only workspaces owned by that child.

### Issue 2
src/contracts/enhancedToolContracts.ts:undefined-65
The updated `binary_overview` description still tells callers when to use other tools. The repository guide requires descriptions to explain the contract, not prompting strategy. Remove the final “Use…” sentence and keep the explanation of missing segment fields. This requirement must be satisfied before merging.

```suggestion
    "Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. When every provider-reported segment agrees on an analysis image base, return it as image_base so callers can relate provider addresses to their loader coordinates. Providers without a segment-enumeration facet omit segments and segment_count instead of failing; treat the missing fields as unobserved, not as an empty binary.",
```

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR makes binary_overview available for IDA without segment enumeration.

  • IDA binary overviews now work without segment enumeration.
  • The real IDA verifier now checks overview results from CLI and MCP.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[binary_overview] --> B[Resolve admitted document]
  B --> C[List procedures and strings]
  B --> D[Request segments]
  D --> E{Segment result}
  E -->|Available| F[Include segments and counts]
  E -->|Capability unavailable| G[Return document and counts only]
  E -->|Other failure| H[Return error]
  C --> F
  C --> G
Loading

Reviews (8) · Last reviewed commit: "fix(ci): verify IDA verifier cleanup and..." · Reviewed by Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f60fab62af

ℹ️ 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".

Comment thread src/ida/IdaProviderCapabilities.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c87b46a79

ℹ️ 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".

Comment thread docs/ida-provider.md Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open.

  1. thread 1

The authored skill retained the old blanket statement that IDA binary_overview was unavailable. Updated the owned .agents source to describe the admitted public document identity and procedure/string counts, with omitted segment/image-base fields explicitly unobserved. The captured-main merge also reconciles document inventory with headless-only containment through one admittedDocument owner and one dispatch/capability entry; attached/native public document listing remains covered by source assertions.

Source validation: inspected the producing boundary and affected consumers, applied targeted formatting with two threads, and passed git diff --check. Tests, builds, lint, typechecks, provider workloads, and CI reruns were not run, as explicitly requested.

No duplicate document-identity representation remains. skills/ is ignored generated output; packaged regeneration was not run because its generator requires built dist modules and builds are explicitly disabled.

@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior area: cli CLI adapter and one-shot commands area: server Server layer and tool wiring P2: medium Medium priority issue labels Oct 13, 2026
Comment thread scripts/verify-real-ida.mjs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e22c4436fd

ℹ️ 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".

Comment thread scripts/verify-real-ida.mjs Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

Source coverage now checks production CLI/MCP binary_overview contracts and list_documents for the configured IDA profiles. The required real-IDА execution proof remains unavailable because provider execution was explicitly prohibited, so this thread remains pending. No provider was run; source formatting and git diff --check passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8b5880660

ℹ️ 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".

Comment thread scripts/verify-real-ida.mjs Resolved
Comment thread scripts/verify-real-ida.mjs Resolved
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

Addressed: Parse binary overviews as workflow evidence. The reported trigger was: For every IDA profile, binary_overview is emitted by createWorkflowEvidence with provider rea-workflow, a nested upstream profile, no artifact-path location, and raw_result: null, but observe requires provider ida, top-level cache_policy/engine_version, an artifact-path location, and (in headless mode) IDA… Owner-level correction: The verifier checks the actual workflow envelope (including raw_result:null and nested upstream IDA profile) instead of imposing direct-provider artifact locations and raw metadata on workflow evidence. This puts the interpretation in the producing representation/owner and lets consumers use that shared fact. The change is at public head f8b58806607d4d05df486fbd2e95ab4cae3313fa; fork ref Jackzigen/rea/fix/ida-binary-overview-documents matches the PR head, and the assigned frozen head is its ancestor. Validation: Source inspection compared verifier assertions with captured workflow evidence. Tests, builds, typechecks, lint, provider workloads, and CI reruns were not run. No additional cleanup is identified for this finding.

enhanced(
"binary_overview",
"Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. When every provider-reported segment agrees on an analysis image base, return it as image_base so callers can relate provider addresses to their loader coordinates. Use search_procedures, list_procedures, or analyze_function directly when you already know which procedure to inspect.",
"Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. When every provider-reported segment agrees on an analysis image base, return it as image_base so callers can relate provider addresses to their loader coordinates. Providers without a segment-enumeration facet omit segments and segment_count instead of failing; treat the missing fields as unobserved, not as an empty binary. Use search_procedures, list_procedures, or analyze_function directly when you already know which procedure to inspect.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Description mixes facts with advice

The updated binary_overview description still tells callers when to use other tools. The repository guide requires descriptions to explain the contract, not prompting strategy. Remove the final “Use…” sentence and keep the explanation of missing segment fields. This requirement must be satisfied before merging.

Suggested change
"Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. When every provider-reported segment agrees on an analysis image base, return it as image_base so callers can relate provider addresses to their loader coordinates. Providers without a segment-enumeration facet omit segments and segment_count instead of failing; treat the missing fields as unobserved, not as an empty binary. Use search_procedures, list_procedures, or analyze_function directly when you already know which procedure to inspect.",
"Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. When every provider-reported segment agrees on an analysis image base, return it as image_base so callers can relate provider addresses to their loader coordinates. Providers without a segment-enumeration facet omit segments and segment_count instead of failing; treat the missing fields as unobserved, not as an empty binary.",

Context Used: docs/agents/mcp-tooling.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/contracts/enhancedToolContracts.ts
Line: 65

Comment:
**Description mixes facts with advice**

The updated `binary_overview` description still tells callers when to use other tools. The repository guide requires descriptions to explain the contract, not prompting strategy. Remove the final “Use…” sentence and keep the explanation of missing segment fields. This requirement must be satisfied before merging.

```suggestion
    "Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. When every provider-reported segment agrees on an analysis image base, return it as image_base so callers can relate provider addresses to their loader coordinates. Providers without a segment-enumeration facet omit segments and segment_count instead of failing; treat the missing fields as unobserved, not as an empty binary.",
```

**Context Used:** docs/agents/mcp-tooling.md ([source](https://github.com/morluto/preference/blob/main/docs/agents/mcp-tooling.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 997023ee41

ℹ️ 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".

Comment on lines +372 to +373
.optional(),
segment_count: z.number().int().min(0).optional(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correlate the optional segment fields

When an overview is validated or its advertised JSON Schema is consumed, making these properties independently optional admits segments without segment_count and vice versa (and also permits image_base when the entire segment facet is absent). #binaryOverview and the updated public description define only two states—both segment fields present, or all segment-derived fields omitted—so malformed Evidence can pass the named contract and clients must handle states REA never produces; express the facet as a correlated union/dependency, with image_base only in the present branch.

AGENTS.md reference: AGENTS.md:L31-L31

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 476614785e

ℹ️ 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".

Comment thread scripts/verify-real-ida.mjs Resolved
Comment thread scripts/verify-real-ida.mjs Resolved
/** Fail when one CLI workflow leaves a new owned workspace behind. */
export const assertNoNewIdaWorkspaces = (before, after) =>
assert.deepEqual(
[...after].filter((name) => !before.has(name)).sort(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Other sessions cause false failures

The cleanup check treats every new rea-ida-* entry in the shared root as a leak from this CLI run. If another headless session creates a workspace while the overview runs, verification fails even when its own session cleaned up correctly. This can happen with the default tmpdir() root.

Give the verifier a private root and pass it to the child, or check only workspaces owned by that child.

Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/lib/ida-verifier-workspaces.mjs
Line: 19

Comment:
**Other sessions cause false failures**

The cleanup check treats every new `rea-ida-*` entry in the shared root as a leak from this CLI run. If another headless session creates a workspace while the overview runs, verification fails even when its own session cleaned up correctly. This can happen with the default `tmpdir()` root.

Give the verifier a private root and pass it to the child, or check only workspaces owned by that child.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70f20f4d87

ℹ️ 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".

/** Fail when one CLI workflow leaves a new owned workspace behind. */
export const assertNoNewIdaWorkspaces = (before, after) =>
assert.deepEqual(
[...after].filter((name) => !before.has(name)).sort(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correlate cleanup entries with the CLI run

When another headless REA process creates a workspace under the same root during cliOverview—especially the shared tmpdir() default selected in scripts/verify-real-ida.mjs—this set difference treats that unrelated rea-ida-* directory as a leak and fails verify:ida even though the reviewed CLI run cleaned up. Prefix plus timing is not ownership proof; isolate this invocation in a unique root or correlate entries with an identity emitted by its child before asserting cleanup.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

morluto added a commit that referenced this pull request Oct 14, 2026
Share tagged readiness observations, retain partial provider facts, authenticate bridge identity, bound diagnostics, and preserve cancellation and lost-session reasons. Fail closed for unparsed MIPS ABI attributes and macOS saved Hopper databases without a script-capable bridge route.

Reviewed fixes: #2010, #2108, #2513, #2695, #2731, #2771, #2828, #2867, #2868, #2870, #2880, #2919, #2945, #2961, #2981, #2998, #3000, #3002.

Validation: 285 focused source/boundary tests passed. Real Ghidra, IDA, Linux Hopper, and Windows provider runs were not repeated.

BREAKING CHANGE: MIPS targets with unresolved GNU ABI attributes and saved Hopper databases on macOS are refused rather than advertised as supported.
morluto added a commit that referenced this pull request Oct 14, 2026
Preserve XML and Interface Builder identity at their parsing boundary, retain usable Objective-C slots with precise coverage, and keep native trace failures distinct from absence. Add caller-selected Interface Builder summaries backed by complete retained Evidence, and preserve comparison limitations.

Reviewed fixes: #1969, #2088, #2108, #2513, #2639, #2684, #2731, #2759, #2875, #2888, #2889, #2970, #2971, #3002.

Validation: relevant native/domain focused lane passed 142 tests; earlier Interface Builder/MCP checks passed 24 tests. Real native UI and Ghidra producer coverage was not repeated.
morluto added a commit that referenced this pull request Oct 14, 2026
Use one named input-schema projection for clients and catalog identity, preserve dialect declarations, and bound compact schema depth. Keep canonical SDK output validation when output advertisements are disabled. Release request-owned state on cancellation and carry upstream limitations through composed workflows. Preserve doctor full-output envelopes and validate navigation facts at their owner.

Reviewed fixes: #2088, #2108, #2513, #2684, #2693, #2695, #2836, #2864, #2868, #2877, #2933, #2998, #3002, #3015.

Validation: focused schema, SDK output-validation, context, and workflow tests passed; no schema dialect or canonical output validation was relaxed.
@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: Main already has the fix for #2460, built a different way. Main lacks three parts: the real-IDA verifier checks, one test change and one skill paragraph. Those parts pass on Node 24 and 26 with the PR's fake IDA server. Main passes with them added.

I tested head 70f20f4 as pushed. GitHub says it conflicts with main 70cd4cb. IDA is a paid, closed-source tool and is not installed here. Every run used the PR's own fake IDA server and tests.

What main already has

Main commits 80de314, 55dd21a and d4bd65c name #2513 as a reviewed fix.

PR change On main
IDA lists its one document on both profiles Yes. Main made it available on both.
Overview works with no segment tool Yes, by another route. Main drops the segment step from the requirements. The PR marks it optional.
Overview omits segment fields when segments are missing Yes
Segment fields optional in the output schema Yes
Tool description and docs/ida-provider.md Yes, in main's own words
Skill file paragraph No. Main still says IDA has no overview.
Real-IDA verifier checks and a new workspace helper No
New tests for the verifier and the optional mark No
One-line change to the conformance test No

Of 18 files, 7 are in main in substance, 4 are test files main also changed, and 7 are not in main.

Results

Check Node 24.18.0 Node 26.11.1
PR head, 8 test files (198 tests) pass pass
Main as is, 6 of those files (193 tests) pass not run
Main plus the PR's verifier, helper test and conformance change (62 tests) pass not run

Main plus the PR's verifier passes on the fake IDA server. So main's overview already works from the command line and over MCP with no segment tool. The new count-mismatch case fails in the phase the test expects.

Two small gaps remain on main:

  • The skill file and the IDA guide disagree about the overview on IDA.
  • Main's conformance test skips the document list on the attached profile. It runs 52 tests on main and 54 with the PR's change.

Not run

  • Real IDA, and npm run verify:ida against it.
  • Node 22.
  • Head merged onto current main.
  • The PR's new requirement test on main. It needs the optional mark, which main lacks.
  • The code before either fix.
  • The four shared test files, compared case by case.
  • Windows and macOS.

Thanks, Jackzigen, for the fix and the verifier work. A small rebase with just the missing parts might be all that is left.

Test setup
Commands
npm ci && npm run build && npm run test:prepare
node scripts/run-development-tests.mjs focused <named test files>

Each run sat under nice and a 6 GB memory cap, with HOME and TMPDIR in a throwaway folder. No test file called setup or doctor. The head command named these 8 files:

src/ida/BinaryOverviewRequirement.test.ts
src/ida/IdaContainment.test.ts
src/ida/IdaNativeProtocol.test.ts
src/ida/IdaSessionClient.test.ts
tests/boundary/mcp/enhancedTools.04-uses-complete-inventories-inline.test.ts
tests/boundary/providers/ida/idaVerifierWorkspaces.test.ts
tests/boundary/providers/ida/verifierObservations.test.ts
tests/conformance/ida/providerContracts.test.ts

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

@morluto

morluto commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Compared this PR with main fc712b375 during the fixed/superseded backlog audit.

Main already supports the overview capability/schema and admitted document identity across IDA profiles. The distinct contribution still missing is the real verifier's public CLI overview, CLI/MCP inventory comparison and headless-workspace leak oracle.

Please rebase/split around that verification scope and retain the corrected workflow-envelope interpretation: rea-workflow Evidence has nested upstream IDA facts and raw_result:null, so it should not be validated as direct-provider Evidence. Existing source corrections are useful, but neither main's general CI nor this source audit establishes execution against an actual IDA build. Keep that verification gap explicit.

PR head reviewed: 70f20f4d8. This is a source comparison; no new PR-branch tests or provider runs were performed for this comment.

@Jackzigen

Copy link
Copy Markdown
Contributor Author

Closing this — it looks superseded by #2374: main now reports the admitted IDA program through list_documents (admittedDocument), and the binary_overview requirements were reworked to ["current_document", "list_documents"] any-of semantics with no hard list_segments requirement, which covers the case this PR was fixing (issue #2460, already closed). Thanks for the review feedback — happy to re-open if anything here is still missing.

@Jackzigen Jackzigen closed this Oct 16, 2026
@morluto morluto added the provider: ida Analysis provider / engine: ida label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior area: server Server layer and tool wiring bug Something isn't working P2: medium Medium priority issue provider: ida Analysis provider / engine: ida

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] binary_overview fails with IDA provider: list_documents not declared by IDA adapter

4 participants