feat(mcp): harden local scorer adapter setup - #27
Merged
JSONbored merged 7 commits intoMay 29, 2026
Conversation
Add structured scorer failure codes, doctor diagnostics, reference wrapper scripts, and adapter unit tests so MCP users get actionable fallback guidance when GITTENSOR_SCORE_PREVIEW_CMD is missing or misconfigured. Closes JSONbored#24
monsterdavidliu-ux
force-pushed
the
feat/24-local-scorer-adapter
branch
from
May 28, 2026 23:42
efcc9ea to
1d01d84
Compare
JSONbored
requested changes
May 29, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
PR #27 - feat(mcp): harden local scorer adapter setup
Signal: REQUEST CHANGES
Required changes:
- Fix failing local scorer test: malformed JSON currently returns scorer_failed instead of malformed_json.
- Use portable node-based scorer fixtures instead of shell/echo/sh snippets that can classify differently across environments.
- Do not print local absolute paths in doctor output; current code can expose GITTENSOR_ROOT and scorer command paths.
- Redact scorer command/path details in human-readable and JSON diagnostics unless intentionally safe.
- Add test coverage for path redaction around GITTENSOR_ROOT and GITTENSOR_SCORE_PREVIEW_CMD.
7 tasks
Classify malformed scorer stdout reliably, use portable node test fixtures, and redact local paths from doctor and scorer diagnostics.
Move adapter test fixtures to test/fixtures/local-scorer and redact absolute interpreter paths in scorer command diagnostics.
JSONbored
previously requested changes
May 29, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
PR #27 — request changes
feat(mcp): harden local scorer adapter setup
Required changes:
- Do not delete/corrupt package-lock content; regenerate cleanly from repo root.
- Fix malformed JSON classification so malformed output is not reported as generic scorer_failed.
- Replace shell/echo scorer fixtures with portable Node fixtures.
- Redact GITTENSOR_ROOT and scorer command paths from human and JSON diagnostics.
- Add path-redaction tests for GITTENSOR_ROOT and GITTENSOR_SCORE_PREVIEW_CMD.
Restore package-lock.json from main to undo accidental libc metadata removals, redact config paths in doctor JSON output, classify stderr-only malformed scorer output as malformed_json, and extend doctor tests.
Contributor
Author
|
Addressed the follow-up review in 9c75461: restored package-lock.json from main, tightened doctor path redaction, and re-ran MCP tests (12/12). Ready for re-review. |
Owner
Please fix merge conflicts |
Resolve doctor merge conflicts: keep local scorer diagnostics and path redaction from the feature branch, version/API compatibility checks from main, and use MCP client config wording instead of Cursor in PATH hints.
Contributor
Author
|
merge conflicts are fixed and it’s ready for re-review. |
This was referenced Jul 2, 2026
24 tasks
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.
Summary
GITTENSOR_SCORE_PREVIEW_CMDhandling with structured failure codes (missing_scorer_command,timeout,malformed_json,non_zero_exit) and metadata-only fallback.gittensory-mcp doctorlocal scorer diagnostics plus actionable setup guidance in preflight CLI output.gittensor-score-preview.mjs/.py) and adapter unit tests covering success, missing command, timeout, malformed JSON, non-zero exit, and source-upload guard.Closes #24
Validation
npm run typechecknpm run build:mcpnpm run test:mcp-packnpx vitest run test/unit/local-scorer-adapter.test.ts test/unit/mcp-cli.test.ts(12/12 passed)Safety