Skip to content

test(mcp): sample-project fixture + assertion contract (T3 #650)#677

Draft
DvirDukhan wants to merge 1 commit into
dvirdukhan/mcp-t2-cifrom
dvirdukhan/mcp-t3-fixture
Draft

test(mcp): sample-project fixture + assertion contract (T3 #650)#677
DvirDukhan wants to merge 1 commit into
dvirdukhan/mcp-t2-cifrom
dvirdukhan/mcp-t3-fixture

Conversation

@DvirDukhan
Copy link
Copy Markdown
Contributor

Closes #650.

Stacked on #676 (T2). Adds the shared tests/mcp/fixtures/sample_project/ + expected.yaml + conftest.py that every per-tool ticket from T4 onward reuses.

Multilingual coverage (Java/C#) deferred — see commit message.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

New `tests/mcp/fixtures/`:
- `sample_project/python/` — canonical call graph
  `entrypoint -> service -> {UserRepo,OrderRepo}.repo -> db`
  plus a small class hierarchy (BaseRepo <- UserRepo, OrderRepo)
  and inter-file imports so IMPORTS edges exist.
- `expected.yaml` — single source of truth for every per-tool
  ticket's integration assertions: minimum per-label counts, named
  callers / callees, known paths, prefix-search hits.

New `tests/mcp/conftest.py`:
- `expected_contract` (pure-Python, always available) loads the
  YAML once per session.
- `indexed_fixture` (session-scoped) indexes the fixture into a
  unique `code:sample_project:test-<uuid>` graph so parallel CI
  shards don't contend. Self-skips when FalkorDB is unreachable.
  Uses `SourceAnalyzer.analyze_local_folder` directly so the
  fixture doesn't need to be a git repository.

New `tests/mcp/test_fixture_contract.py` — regression-tests the
fixture itself: contract shape, on-disk files, and that the
integration fixture indexes cleanly and meets the minimum count
contract.

Multilingual coverage (Java + C#) was dropped from the spec: both
multilspy analyzers demand a Maven / .NET project layout at the
indexed root, which would force this fixture into an awkward shape.
Deferred to a follow-up ticket (likely T16 which adds languages).

All 4 contract tests pass against FalkorDB on 6390.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32d03710-a976-42ba-975b-05a5cf4dc1c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dvirdukhan/mcp-t3-fixture

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant