fix(mcp): report missing results mirror - #408
Conversation
|
@oxura is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey @oxura, your first PR on Fair Code, that's awesome, thank you. This project is about making AI more accountable, and contributions like yours are what keep that work going. We'll review your changes shortly. If you haven't already, give the contributing guide a quick read: it covers how audits are structured and what we look for in a review. And if you're finding Fair Code useful or interesting, a star on the repo genuinely helps more people find it - no pressure, just appreciated. |
|
@yakew7 @Shreyash0712 @ahmdkaml - new PR touching a path you own, please review. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes align with the reported issue, improve recovery guidance without triggering destructive actions, and include a focused regression test to prevent recurrence.
Pull request overview
This PR fixes get_benchmark_results’ missing-file error messaging so it correctly reports the missing package-internal results mirror path (instead of incorrectly blaming paper/results-frozen/) and guides users to the non-destructive mirror restore helper.
Changes:
- Update
_get_benchmark_results_implto raiseFileNotFoundErrorthat names the exact missing mirror path and recommendsscripts.freeze_paper_results.mirror_for_mcp(). - Add a regression test asserting the corrected path + guidance and ensuring the old “may not have been frozen” wording is gone.
- Update MCP module description and the changelog entry to reflect the corrected behavior.
File summaries
| File | Description |
|---|---|
faircode/mcp_server.py |
Fixes the missing-mirror FileNotFoundError message and clarifies Phase 2’s package-mirror design. |
tests/test_mcp_server.py |
Adds a regression test validating the new missing-mirror message content and guidance. |
CHANGELOG.md |
Documents the fix for #396 in the release notes. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Problem
get_benchmark_resultsreads the package-internalfaircode/_results_frozen/mirror, but its missing-file error blamedpaper/results-frozen/and suggested re-running the freeze script. Following that advice could perform an unnecessary citation-affecting re-freeze.Change
scripts.freeze_paper_results.mirror_for_mcp()helperVerification
make checkin a clean virtualenv with the declaredmcp>=2.0dependency: 278 passed, 8 skippedmake lint: em-dash check, 1,260 internal links, and Ruff all passedCloses #396