Skip to content

test(jeb): cover invalid route rejection through MCP - #3000

Closed
maxazure wants to merge 3 commits into
morluto:mainfrom
maxazure:fix/jeb-endpoint-route-2552
Closed

maxazure wants to merge 3 commits into
morluto:mainfrom
maxazure:fix/jeb-endpoint-route-2552

Conversation

@maxazure

@maxazure maxazure commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Preserve MCP boundary coverage after route validation was incorporated on main in d4bd65c53, which references this PR. Related: #2552.

Problem and expected behavior

For /mcp/extra and /not-mcp, inspect_jeb_client must return configuration_invalid before constructing a connection, while the MCP server remains usable.

Change and scope

Merged main d9cd239 without rewriting history. The effective diff is only tests/boundary/mcp/jebMcp.test.ts: two actual in-memory MCP harness cases asserting the configuration diagnostic, zero connection-factory calls and a successful subsequent ping. Production, endpoint unit tests and documentation match that main revision.

Evidence and regression coverage

Main tests route parsing and invalid-host MCP handling, but does not assert the composition-to-MCP contract and zero factory calls for invalid routes. These tests retain that distinct coverage using an injected factory; no real JEB service ran.

Validation performed

Verified the exact tree published at head 13cb0b3 in an assistant-cloud Linux checkout with Node 24.18.0 / npm 11.16.0:

  • npm ci and required runtime build passed.
  • Focused regression tests: 5 files, 33 tests passed, no skips.
  • npm run check and npm run check:fast passed.
  • npm run verify:test-discovery passed (1,291 files); git diff --check passed.
  • The effective test-only diff is byte-for-byte unchanged after merging main.

The previous CI failures were matched by full test name against failing push CI 38505561204 on the exact old base 5830088. This refresh incorporates upstream fixes; Current-head CI completed successfully on 2026-10-14. Source tests, all five boundary shards, portable inventory and CI required passed. The separate PR readiness status has not yet appeared on this head.

Normal local commit hooks ran but auto-fixed two unrelated upstream tests. Those unrelated edits were excluded from publication. The GitHub-published merge tree exactly matches the tree tested above; original branch history is preserved.

Contract and boundary impact

  • Semantic owner: existing production owners are unchanged; only regression tests change.
  • Contribution scope: focused coverage within existing capture/JEB boundaries; a new capability scope decision is not applicable.
  • CLI/MCP, Evidence, provider compatibility and generated metadata: unchanged by the effective diff.
  • Test effects: disposable fixture files and existing fixture Node subprocesses; no caller target, real engine or external service is acquired.

Compatibility, safety, and release

No production, package, installation or breaking change. The tests use injected provider seams; they do not establish real-engine or native-platform behavior. Independent review inspected the final code and validation logs; it did not independently execute tests.

Before merge

  • Focused regression coverage with resolved scope and authority.
  • Related issue linked; effective diff checked for unrelated changes and secrets.
  • Relevant checks passed locally; real-provider verification limits stated.
  • Required CI passes for the current head.

Author readiness

Human owner: @maxazure

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

The human owner confirmed personal review and responsibility on 2026-10-14. The effective test-only diff is unchanged.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 19:22
@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:25:38.991346Z 4f11954 PR opened
ℹ️ 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 Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The test-only change appears safe to merge once required current-head CI passes.

Summary

Adds two MCP boundary cases for /mcp/extra and /not-mcp.

  • MCP boundary tests cover invalid JEB routes before connection setup.

Reviews (4) · Last reviewed commit: "Merge upstream main to refresh CI baseli..." · Reviewed by Greptile

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

0 open findings

What changed in this PR

Tightens JEB MCP endpoint validation so unsupported URL paths are rejected early with a configuration diagnostic, preventing connection construction for invalid routes (fixes #2552).

Changes:

  • Add strict pathname validation in parseJebMcpEndpoint allowing only /mcp and /mcp/.
  • Extend unit and boundary tests to assert invalid routes fail before the connection factory is invoked.
  • Document the route restriction and preserved URL components.
File Description
tests/​boundary/​mcp/​jebMcp.test.ts Adds boundary coverage ensuring invalid routes yield configuration errors and do not invoke the connection factory.
src/​jeb/​JebMcpEndpoint.ts Introduces a route constant and rejects unsupported pathname values for JEB MCP endpoints.
src/​jeb/​JebMcpEndpoint.test.ts Adds unit coverage for route rejection and verifies supported endpoints remain unchanged.
docs/​jeb-analysis.md Documents the /mcp(//mcp/) requirement and early configuration error behavior.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@morluto morluto added area: mcp MCP server, transport, and tool registration bug Something isn't working labels Oct 13, 2026
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.
@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.

@maxazure maxazure changed the title fix(jeb): reject unsupported MCP endpoint routes test(jeb): cover invalid route rejection through MCP Oct 14, 2026
@maxazure maxazure closed this Oct 14, 2026
@maxazure maxazure reopened this Oct 14, 2026
@maxazure
maxazure marked this pull request as draft October 14, 2026 14:06
@maxazure
maxazure marked this pull request as ready for review October 14, 2026 20:06
@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.

@maxazure maxazure closed this Oct 15, 2026
@morluto

morluto commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Thanks @maxazure for preserving invalid-route refusal as an MCP boundary behavior rather than checking it only below the transport. Main retains the JEB MCP regression in tests/boundary/mcp/jebMcp.test.ts (d4bd65c53) (main).

@morluto morluto added the provider: jeb Analysis provider / engine: jeb label 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 provider: jeb Analysis provider / engine: jeb

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants