feat(mcp): gittensory_check_before_start (pre-start duplicate/solvability check) - #621
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
gittensory · advisory review Reviewed 7 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. What changed
Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 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. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
3ae55eb to
5a8cfb5
Compare
…ity check Adds a pre-start MCP tool: before any code is written, check whether an issue is already claimed/solved, whether a duplicate cluster is forming, and whether it is a valid target. Returns a go/raise/avoid recommendation with public-safe reasons from cached metadata. No GitHub writes. - engine: buildPreStartCheck composes the existing collision, issue-quality, and lifecycle reports; resolves the target by issue number, fuzzy title, or planned paths. - mcp(worker): register gittensory_check_before_start with input + output schema. - api: POST /v1/repos/:owner/:repo/check-before-start backing the local bin tool. - mcp(local bin): proxy the tool to the API route. - Public-safe: every reason/blocker routed through sanitizePublicComment. Fixes JSONbored#545 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5a8cfb5 to
42e1d0e
Compare
Fixes #545
What
Adds
gittensory_check_before_start, a pre-start MCP tool that answers — before any code is written — whether an issue is already claimed or solved, whether a duplicate cluster is forming, and whether it is a valid target. It returns ago/raise/avoidrecommendation with public-safe reasons from cached metadata. Metadata only; no GitHub writes.This moves collision/solvability detection earlier than the existing
preflight_*tools (which only run after a branch exists), addressing a top source of wasted effort / slop.How
src/signals/engine.ts— new deterministicbuildPreStartCheckbuilder that reuses the existing reports:buildCollisionReport,buildIssueQualityReport, andbuildIssueDiscoveryLifecycleReport. It resolves the target byissueNumber, fuzzytitlematch (token Jaccard), orplannedPathsoverlap with recently merged work, then derivesclaimStatus(unclaimed/claimed/solved/unknown),duplicateClusterRisk, and the recommendation.sanitizePublicComment(fail-closed); no reward/score/trust language, and other contributors' private context is never surfaced.src/mcp/server.ts— registersgittensory_check_before_startwith aninputSchemaand anoutputSchema.src/api/routes.ts—POST /v1/repos/:owner/:repo/check-before-startbacking the local CLI tool (mirrors theissue-qualityroute's auth).packages/gittensory-mcp/bin/gittensory-mcp.js— exposes the tool, proxying to the API route.Output boundaries
Public-safe reasons only; metadata only, no writes. The tool never reveals reward/score/trust internals or other contributors' private context.
Tests
test/unit/pre-start-check.test.ts— go/raise/avoid, claimed (open linked PR), solved (merged work), high duplicate-cluster risk, duplicate/invalid labels, needs-proof, not-found, fuzzy-title resolution, title no-match, direct-PR lane, planned-path overlap, and forbidden-term assertions on all output.test/unit/mcp-output-schemas.test.ts— output-schema discovery + structured-content call.test/integration/api.test.ts— route success, invalid body (400), and session-forbidden (403).npm run validate(typecheck + coverage) is green at the 97%+ branch threshold;build:mcp,test:mcp-pack,test:workers, andui:openapi:checkalso pass.🤖 Generated with Claude Code