Skip to content

feat(mcp): add gittensory://finding-taxonomy resource - #4235

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jsdevninja:feat/mcp-finding-taxonomy-resource
Jul 8, 2026
Merged

feat(mcp): add gittensory://finding-taxonomy resource#4235
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jsdevninja:feat/mcp-finding-taxonomy-resource

Conversation

@jsdevninja

Copy link
Copy Markdown
Contributor

Summary

  • Add src/review/finding-taxonomy.ts as the single source for the canonical AI review finding categories (FINDING_CATEGORIES) and severity ladder (REVIEW_FINDING_SEVERITY_LADDER).
  • Register read-only MCP resource gittensory://finding-taxonomy (application/json) on the hosted server so agents can discover the taxonomy without hard-coding.
  • Add unit tests asserting discovery, JSON shape, and presence of every category/severity value.

Closes #2225.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥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:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Ran focused tests: finding-taxonomy, mcp-finding-taxonomy, npm run typecheck, npm run build:mcp, npm audit --audit-level=moderate. Full npm run test:ci blocked locally by missing wrangler (cf-typegen:check); remaining gate jobs left to CI.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section 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.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A — MCP resource only; no visible UI.

Notes

Register a read-only MCP resource on the hosted server that exposes the canonical AI review finding categories and severity ladder from shared constants. Closes JSONbored#2225.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsdevninja
jsdevninja requested a review from JSONbored as a code owner July 8, 2026 16:52
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 8, 2026
@loopover-orb

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-08 17:03:16 UTC

4 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds a small, self-contained module (`src/review/finding-taxonomy.ts`) that re-exports the existing `FINDING_CATEGORIES` and `REVIEW_FINDING_SEVERITY_LADDER` constants as a JSON document, and wires it up as a read-only MCP resource at `gittensory:​//finding-taxonomy` in `src/mcp/server.ts`. The change is narrow, closes the linked issue #2225, adds no schema/migration surface, and is covered by two test files exercising both the pure-function output and the MCP discovery/read path. CI (including typecheck and build:mcp) is green on this commit, and the diff is coherent with its description — I don't see a defect on the reachable path.

Nits — 5 non-blocking
  • The two new test files (`test/unit/finding-taxonomy.test.ts` and `test/unit/mcp-finding-taxonomy.test.ts`) duplicate the same equality/inclusion assertions against `FINDING_CATEGORIES`/`REVIEW_FINDING_SEVERITY_LADDER` — consider trimming the MCP-layer test to just discovery + shape and leaving full-content assertions to the unit test for the pure function.
  • The returned document has no `version` field, so downstream MCP consumers caching this resource have no cheap way to detect a taxonomy change without diffing the full array — worth considering if this resource is meant to be polled.
  • `FindingTaxonomyDocument`'s field types (`readonly (typeof FINDING_CATEGORIES)[number][]`) reference the source arrays directly, so if `finding-category-classify.ts` or `focus-manifest.ts` ever change their exported shape (e.g. becomes a `Map` or object instead of an array), this file will need updating too — not a blocker since it's type-checked, just a coupling to note for future refactors.
  • Consider adding a brief comment or doc line in `finding-taxonomy.ts` noting this is a read-only view derived from `finding-category-classify.ts` / `focus-manifest.ts` so future edits to those source-of-truth files know to check this resource stays in sync.
  • If this resource is intended for external agent consumption, a short README or MCP tool-catalog entry describing the taxonomy resource's purpose could help discoverability beyond the code comment in server.ts.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2225
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 225 registered-repo PR(s), 138 merged, 39 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jsdevninja; Gittensor profile; 225 PR(s), 39 issue(s).
Gate result ✅ Passing No configured blocker found.
Linked issue satisfaction

Addressed
The PR adds server.registerResource for gittensory:​//finding-taxonomy with application/json mimeType, sources categories/severities from shared constants (FINDING_CATEGORIES, REVIEW_FINDING_SEVERITY_LADDER) via a new finding-taxonomy.ts module, and includes tests verifying discovery, JSON shape, and presence of every category/severity value — matching all three stated deliverables.

Review context
  • Author: jsdevninja
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Swift, C, CSS, MDX, Python, Vue
  • Official Gittensor activity: 225 PR(s), 39 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (issue #2237, issue #2225)
Contributor next steps
  • Review top overlaps.
  • Add a concise scope and risk note.
  • Check active issues and PRs before submitting.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

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

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot 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.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 3e85c8d into JSONbored:main Jul 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): register a gittensory://finding-taxonomy resource enumerating review finding categories

1 participant