fix(mcp): bound opportunity target fanout - #4072
Conversation
|
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 #4072 +/- ##
=======================================
Coverage 93.65% 93.66%
=======================================
Files 384 384
Lines 35865 35886 +21
Branches 13160 13168 +8
=======================================
+ Hits 33589 33612 +23
Misses 1618 1618
+ Partials 658 656 -2
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 05:18:33 UTC
⏸️ Suggested Action - Manual Review
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
83e43ad to
b8baee3
Compare
b8baee3 to
4eb8e47
Compare
Motivation
Description
src/mcp/find-opportunities.ts:MAX_FIND_OPPORTUNITIES_TARGETS,MAX_FIND_OPPORTUNITIES_OWNER_LENGTH,MAX_FIND_OPPORTUNITIES_REPO_LENGTH,MAX_FIND_OPPORTUNITIES_LANGUAGES, andMAX_FIND_OPPORTUNITIES_LANGUAGE_LENGTHand used them in validation.validateFindOpportunitiesInputto trim, validate, cap, and deduplicate targets and to validate language input before returning, and to return normalized targets for downstream use.src/mcp/server.tsso oversized MCP requests are rejected at the tool boundary./v1/opportunities/findas anexpensiveroute insrc/auth/rate-limit.tsto reduce rate-limit abuse amplification, and added regression tests covering caps, deduplication, MCP rejection, and route classification.Testing
npx vitest run test/unit/find-opportunities.test.ts test/unit/mcp-find-opportunities.test.ts test/unit/auth.test.tsand all selected tests passed.git diff --checkas a preflight sanity check and it succeeded.npm run test:coveragefor the selected tests) and the selected tests ran but coverage remapping failed withTypeError: jsTokens is not a functionafter the tests completed.npx tsc --noEmitwhich surfaced pre-existing unrelated syntax errors insrc/queue/processors.tsand is not caused by this change.Codex Task