fix(mcp): compare property schemas in checkInputNarrowing - #10124
Conversation
Enforce recursive JSON Schema narrowing for shared advertised properties so stdio overrides cannot widen inside nested items unnoticed, and keep real server schemas green under the strengthened check.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 08:31:08 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10124 +/- ##
===========================================
+ Coverage 79.79% 91.95% +12.16%
===========================================
Files 282 931 +649
Lines 58690 113924 +55234
Branches 6892 27506 +20614
===========================================
+ Hits 46832 104760 +57928
+ Misses 11570 7863 -3707
- Partials 288 1301 +1013
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
checkInputNarrowingso shared advertised/contract property subtrees are compared recursively (deep-equal or recognised narrowings only: removed nested properties, tightened bounds, enum subsets, recurse viaitems/properties).additionalProperties: falsethatz.toJSONSchemaemits for the same zod input.CurrentBranchInput/LocalScoreInputbounds with the wider contract fields they narrow, and make metrics snapshot success fields optional so a store-failure envelope validates under the SDK.Closes #10041
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npx vitest run test/unit/validate-mcp-helpers.test.ts,npx vitest run test/unit/miner-mcp-ops-tools.test.ts, andnpm run validate:mcp(all green). Fulltest:cideferred to CI;scripts/**is outside Codecov include, and contract schema tweaks are import-time zod definitions covered by the unit/contract runs above.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
N/A — no visible UI change.
Notes
CurrentBranchInput/LocalScoreInput, andMinerMetricsSnapshotOutputsuccess fields made optional so cold-host store-failure envelopes no longer -32602.Made with Cursor