Skip to content

docs(mcp): clarify inline parent retention boundary for analysis views - #8792

Closed
atharhive wants to merge 47 commits into
morluto:mainfrom
atharhive:docs/analysis-view-inline-parent-ownership
Closed

atharhive wants to merge 47 commits into
morluto:mainfrom
atharhive:docs/analysis-view-inline-parent-ownership

Conversation

@atharhive

@atharhive atharhive commented Nov 3, 2026 •

Copy link
Copy Markdown

Summary

Fixes #8433. Document in docs/mcp-contracts.md that when an inline Evidence record is passed to inspect_analysis_view, the projected view is retained in the active MCP session, but the caller-supplied parent record remains caller-owned and is not automatically retained.

Problem and expected behavior

Issue #8433 observed that calling inspect_analysis_view with an inline Evidence record (source.kind: 'inline') successfully creates and retains the resulting view in session state, but does not retain the parent observation. When callers or autonomous agents later query that parent ID as retained Evidence, the session returns evidence_integrity_mismatch with reason 'missing', even though the view cites that parent ID in normalized_result.parent_evidence_id and evidence_links.

Existing tests in tests/boundary/mcp/analysisViewMcp.test.ts explicitly verify that the parent remains unretained ('points omitted inline messages to the caller's parent without promising session recovery'). However, this retention boundary was not documented in docs/mcp-contracts.md, leading agents to assume the parent record was queryable in session retention.

Expected behavior is for docs/mcp-contracts.md to state clearly that inline parents remain caller-owned, and that callers needing subsequent retained lookup for parent_evidence_id should import or retain the source record via import_evidence_bundle.

Change and scope

Documentation update in docs/mcp-contracts.md:

  • Under inspect_analysis_view, state that inline Evidence sources result in retained views, but the parent record remains caller-owned and unretained in the session ledger.
  • Explain the recovery path: callers needing retained access must import or retain the parent directly using import_evidence_bundle.
  • No schema, tool, or runtime changes.

Contribution scope: not applicable (documentation clarification of existing tested contract).

Contract and boundary impact

  • Semantic owner and earliest changed stage: authored MCP documentation in docs/mcp-contracts.md; no runtime consumers.
  • Contribution scope fit and linked maintainer decision: not applicable
  • CLI and MCP/tool-catalog contract: none
  • Provider, bridge, target-format, or platform compatibility: none
  • Evidence, artifact, provenance, or reconstruction contract: none
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none (documentation-only update aligned with existing acceptance test tests/boundary/mcp/analysisViewMcp.test.ts:603-634)
  • Base reproduction or other evidence: verified against issue [Design] Clarify inline analysis view parent ownership and session handoff #8433 report, src/application/analysisView/AnalysisViewService.ts, and tests/boundary/mcp/analysisViewMcp.test.ts
  • User-visible CLI/MCP output (if applicable): not applicable
  • Remaining proof gaps: none

Boundary and lifecycle regressions: not applicable (documentation only).

Validation performed

  • npx vitest run tests/conformance/readmeConsistency.test.ts (9/9 passed)
  • npm run format:check (oxfmt passed across all 6728 files)

Compatibility, safety, and release

  • Breaking changes or migration steps: none
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: none; docs only

Author readiness

Human owner: @atharhive

  • 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.

Review follow-up caf4723 distinguishes retained-parent lookup from supplying a source again, and qualifies view retention for sessionless servers. Verified against the session recorder and Evidence delivery code; npm run docs:check passed. The same wording is present in the overlapping #2791 layout branch.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 13:27

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-07T16:27:39.640435Z caf4723 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.

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This documentation-only change appears safe to merge.

Summary

Clarifies the retention boundary for inspect_analysis_view:

  • The MCP guide separates retained views from caller-owned parents.

No new actionable issues were found. GitHub access was unavailable, so whether another PR supersedes this one could not be checked.

Reviews (44) · Last reviewed commit: "docs(mcp): clarify view and parent reten..." · 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: bb38ca2b92

ℹ️ 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 docs/mcp-contracts.md 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: e3926d3e60

ℹ️ 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 docs/mcp-contracts.md Resolved
@morluto

morluto commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Hey @atharhive, thanks for this! The docs update looks good. What's left: there are 2 unresolved review threads from Codex (1 still on current code), e.g. "Tell inline callers to reuse the inline source"; the one on an outdated line may just need resolving if it's already handled. Happy to merge once that's sorted.

@atharhive

atharhive commented Nov 5, 2026 •

Copy link
Copy Markdown
Author

Hey @morluto, updated the wording in docs/mcp-contracts.md to cover inline source re-specification alongside exported bundles (commit 4acd3b8), and marked both Codex review threads as resolved. Ready for merge!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Comment thread docs/mcp-contracts.md 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: 7089891b89

ℹ️ 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 docs/mcp-contracts.md Resolved
@atharhive

Copy link
Copy Markdown
Author

Hey @morluto, thanks for following up! Checked this, merged latest upstream changes, and verified clean.

1 similar comment
@atharhive

Copy link
Copy Markdown
Author

Hey @morluto, thanks for following up! Checked this, merged latest upstream changes, and verified clean.

@morluto

morluto commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Superseded by #2791: the relocated MCP contracts guide includes the same parent-retention and sessionless-view clarification. The updated branch passed docs:check after merging main.

@morluto morluto closed this Nov 7, 2026
@morluto morluto added area: mcp MCP server, transport, and tool registration documentation Improvements or additions to documentation labels Nov 22, 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 documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Design] Clarify inline analysis view parent ownership and session handoff

3 participants