Skip to content

fix(mcp): qualify retained Evidence view guidance - #8377

Merged
morluto merged 5 commits into
mainfrom
codex/evidence-discovery-view-guidance
Nov 7, 2026
Merged

morluto merged 5 commits into
mainfrom
codex/evidence-discovery-view-guidance

Conversation

@morluto

@morluto morluto commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Evidence discovery recommends inspect_analysis_view even for records whose operation has no supported view. Qualify that handoff and direct callers to selected-record retrieval or complete bundle export. Related: #8549.

Change and scope

The get_evidence_bundle catalog description and MCP guide now limit view guidance to supported parent operations. They retain the current detail: "records" contract from merged #8528 for exact-record retrieval, and explain bundle export for portable handoffs or oversized records. No provider, schema, target authority, or lifecycle changes; a new scope decision is not applicable.

Evidence and regression coverage

The real-provider observations below were collected before the latest main merge; they have not been rerun on the merged head.

  • Real Ghidra 12.1.4 on macOS arm64: exported xrefs, procedure_references, and read_bytes Evidence from an owned unexecuted Mach-O and imported it into fresh target-free MCP servers. In compact and full output-schema profiles, each exact-ID detail: "records" selection preserved the original complete record and identified it as historical and non-importable; inspect_analysis_view correctly refused each unsupported parent. The selected target remained unchanged.
  • On current main after feat(evidence): read selected complete records without the whole bundle #8528, an exact selection of a real 6 MiB Ghidra byte-read record exceeded the 10 MiB MCP response budget in both profiles. The typed error explicitly named export for a single oversized record; export preserved the original complete Evidence exactly in a target-free session.
  • A separate current-main real Ghidra annotation control exported a function name and two comments, then selected the exact historical record after importing into a fresh target-free server in both output-schema profiles. The complete record matched the original; the selection correctly warned that it was historical and not an importable bundle.
  • Both profiles advertised the qualified catalog guidance on this branch. These are scripted controls, not an autonomous-agent trial. Other platforms and providers were not retested after the main integration.
  • A compatible analyze_function view and real Ghidra/Kuna export paths were exercised on the earlier branch; the latest change preserves those paths. Individual selected records remain subject to MCP delivery budgets.

Validation performed

  • An earlier hosted static check failed on tests/boundary/cli/cliHelpDefaultAnnotations.test.ts, an unrelated formatting defect fixed by style(test): format CLI help default annotations #9280. The branch now includes that fix and npm run format:check passed; new hosted CI is pending.

  • After merging main 0ecf3a4cbf, Node 24.22.1 focused Vitest runs: Ghidra Evidence MCP and record selection suites passed 17 tests. The prior CI shard failure came from an obsolete Ghidra Evidence wording assertion, which current main corrects. Full CI and real-provider workflows were not rerun after this merge.

  • The following checks were performed on the prior head 59dacad9a1:

  • npm run docs:check — passed, including nine README consistency checks.

  • npm run check:fast — passed.

  • Real Ghidra stdio MCP record-selection, catalog and unsupported-view controls — passed in both output-schema profiles.

  • Prettier on touched files and git diff --check — passed.

Compatibility, safety, and release

Guidance only; no schema, dependency, installer or target-execution change. A selected record is historical and is not an importable bundle.

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.

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Low impact] The PR appears safe to merge; no blocking issue was found.

Summary

Qualifies retained Evidence guidance so inspect_analysis_view is recommended only for supported parent operations.

  • Evidence discovery points callers to views only when they fit.
  • CLI help shows schema defaults only once.

No new actionable issues or security concerns were found. No runtime checks were run during this review. Supersession could not be verified because GitHub access required authentication.

Reviews (5) · Last reviewed commit: "style(test): format CLI help default ann..." · Reviewed by Greptile

@morluto
morluto marked this pull request as ready for review October 31, 2026 21:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-07T14:41:39.527902Z 2828e12 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.

…ery-view-guidance

# Conflicts:
#	src/contracts/sessionToolContracts.ts
@morluto morluto mentioned this pull request Nov 1, 2026
1 of 4 tasks
cursoragent and others added 3 commits November 7, 2026 11:44
Refreshing get_evidence_bundle help onto current main keeps detail=links
and says inspect_analysis_view applies only to a compatible parent.
@morluto
morluto merged commit d5b5808 into main Nov 7, 2026
50 of 52 checks passed
@morluto
morluto deleted the codex/evidence-discovery-view-guidance branch November 7, 2026 17:37
@morluto morluto added area: mcp MCP server, transport, and tool registration bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants