test(mcp): sample-project fixture + assertion contract (T3 #650)#677
Draft
DvirDukhan wants to merge 1 commit into
Draft
test(mcp): sample-project fixture + assertion contract (T3 #650)#677DvirDukhan wants to merge 1 commit into
DvirDukhan wants to merge 1 commit into
Conversation
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>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This was referenced May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #650.
Stacked on #676 (T2). Adds the shared
tests/mcp/fixtures/sample_project/+expected.yaml+conftest.pythat 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