Repository navigation
fix(comparison): keep unsupported function facets unknown - #2450
Conversation
|
@greptileai review |
|
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: 1575954ded
ℹ️ 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: c1956b8cd0
ℹ️ 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: 5121721eb1
ℹ️ 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".
| coverage: completeWithinViewCoverage(1, 1), | ||
| ...common, | ||
| }); | ||
| if (availability?.available === false) return ok(singleton(availability)); |
There was a problem hiding this comment.
Retain observations from unavailable facets
When a valid imported or future-provider dossier carries partial observations together with available: false (the new contract intentionally accepts this, and the comparison test constructs a nonempty comments array in that state), this unconditional return replaces those observations with the availability object. An inspect_analysis_view request can therefore no longer page the retained comments, references, or other facet values even though they remain useful partial evidence; keep the retained value and surface the reason in unknowns, using the singleton only when there is no retained value.
AGENTS.md reference: AGENTS.md:L29-L29
Useful? React with 👍 / 👎.
|
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. Fixed in 5121721. Root cause: The call-path search predated facet availability and derived completeness only from relationship coverage and generic limitations. Structural fix: Source validation: Added a call-path regression using Evidence with only unavailable callees and no duplicate legacy metadata; inspected the existing exhaustive/terminal rules. Targeted formatting used pinned Node 24.18.0 with two threads; git diff --check passed. Tests, typechecks, lint, builds, provider workloads, and CI reruns were intentionally not executed at the user’s request. Authored regressions remain unexecuted. Remaining cleanup: no directly related source cleanup identified in this bounded pass. Runtime/provider behavior remains unverified by this revision. Fixed in 5121721. Root cause: The retained native view projected collections without consulting the dossier’s availability facts. Structural fix: The selected native facet now maps to its owning availability declaration; unavailable facets return that declaration inline and preserve its reason in unknowns. Reference/string/CFG aliases map to their existing shared facet facts. Source validation: Added retained-view regressions for comments and incoming references; inspected the typed view and dossier schemas. Targeted formatting used pinned Node 24.18.0 with two threads; git diff --check passed. Tests, typechecks, lint, builds, provider workloads, and CI reruns were intentionally not executed at the user’s request. Authored regressions remain unexecuted. Remaining cleanup: no directly related source cleanup identified in this bounded pass. Runtime/provider behavior remains unverified by this revision. |
Summary
Keep unavailable function dossier facets unknown in structural comparisons.
Problem and expected behavior
When IDA does not collect comments, typed references, function-referenced strings/names or CFG blocks,
analyze_functionreturns empty arrays. Comparing that dossier with itself currently labels those dimensionsunchanged, which turns missing coverage into a claim of observed equality. This was reproduced through real MCP/IDA 9.5 sessions on both ARM64 and x86_64 samples against mainca2d15b3. Expected behavior is unknown when observation coverage is absent.Change and scope
This adds an optional strict
facet_availabilitycontract, declares IDA's supported and unsupported facets at the producer, and keeps unavailable dimensionsunknownwith explicit reasons and null counts. Empty legacy facets without a coverage declaration stay unknown; explicitly observed empty facets remain comparable. Existing call relationship coverage checks are preserved. The MCP contract reference documents the added coverage field. Maintainer scope decision: not applicable to a routine evidence interpretation fix within existing analysis boundaries.Contract and boundary impact
Expected effects: this compares captured data and existing read-only provider observations. Existing native analysis may launch its configured engine. The change introduces no new target execution, mutation, injection or protection recovery.
Evidence and regression coverage
unchangedbefore the fix and pass asunknownafter it; 16 checks pass in the tested local build.Validation performed
npm run test:local -- src/domain/functionComparison.test.ts src/ida/IdaMcpConnection.test.ts src/ida/IdaOperationFailures.test.ts— 67 pass in the combined local validation build, including all 34 comparison tests.npm run check:fastandnpm run build:cached— pass.Compatibility, safety, and release
The optional field is additive, but legacy empty facets become deliberately more conservative. Other provider producers can adopt explicit availability when they can prove observed absence. This does not add IDA comments, typed references or CFG capability. No private targets or machine-specific configuration are included. Broad cross-provider conformance and completed-task performance/memory costs remain unmeasured. I welcome feedback on the coverage contract before integration.
Before merge