Skip to content

fix(mcp): report missing results mirror - #408

Merged
yakew7 merged 1 commit into
yakew7:mainfrom
oxura:fix/396-mcp-mirror-error
Sep 2, 2026
Merged

fix(mcp): report missing results mirror#408
yakew7 merged 1 commit into
yakew7:mainfrom
oxura:fix/396-mcp-mirror-error

Conversation

@oxura

@oxura oxura commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Problem

get_benchmark_results reads the package-internal faircode/_results_frozen/ mirror, but its missing-file error blamed paper/results-frozen/ and suggested re-running the freeze script. Following that advice could perform an unnecessary citation-affecting re-freeze.

Change

  • report the exact missing mirror path
  • direct recovery to the non-destructive scripts.freeze_paper_results.mirror_for_mcp() helper
  • add a regression test covering the path, recovery guidance, and removal of the misleading freeze claim
  • correct the MCP module description and changelog entry

Verification

  • make check in a clean virtualenv with the declared mcp>=2.0 dependency: 278 passed, 8 skipped
  • make lint: em-dash check, 1,260 internal links, and Ruff all passed

Closes #396

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

@yakew7 @Shreyash0712 @ahmdkaml - new PR touching a path you own, please review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_impl to raise FileNotFoundError that names the exact missing mirror path and recommends scripts.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.

@yakew7
yakew7 merged commit 64fd81a into yakew7:main Sep 2, 2026
17 of 18 checks passed
yakew7 added a commit that referenced this pull request Sep 3, 2026
Credits PR #408 (oxura, first merged PR, closes #396 - MCP
get_benchmark_results' missing-mirror error message) and PR #411
(Zinniacodes01, first merged PR, closes #409 - README's faircode/
repo-tree missing mcp_server.py/_explainers//_results_frozen/).
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.

MCP get_benchmark_results' FileNotFoundError message names the wrong missing file

4 participants