Skip to content

feat(mcp): add gittensory://enrichment-analyzers resource - #4236

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

feat(mcp): add gittensory://enrichment-analyzers resource#4236
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jsdevninja:feat/mcp-enrichment-analyzers-resource

Conversation

@jsdevninja

Copy link
Copy Markdown
Contributor

Summary

  • Add src/review/enrichment-analyzers-taxonomy.ts that projects the committed review-enrichment/analyzer-metadata.json into a slim MCP taxonomy (name, category, cost class, profiles + default profile).
  • Register read-only hosted MCP resource gittensory://enrichment-analyzers (application/json) so agents can discover REES enrichment analyzers without importing the REES runtime.
  • Add unit tests for the taxonomy builder and MCP resource discovery/read.

Closes #2226.

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: enrichment-analyzers-taxonomy, mcp-enrichment-analyzers, 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

  • Taxonomy is read from committed analyzer-metadata.json only; no REES runtime import.

Register a read-only hosted MCP resource that serves the REES analyzer taxonomy from committed analyzer-metadata.json. Closes JSONbored#2226.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsdevninja
jsdevninja requested a review from JSONbored as a code owner July 8, 2026 17:08
@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:18:15 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds a small, self-contained MCP resource that projects the already-committed `review-enrichment/analyzer-metadata.json` into a slimmer taxonomy shape (name, category, cost class, profiles, default profile) and registers it as a read-only `gittensory:​//enrichment-analyzers` resource. The taxonomy builder is a straightforward 1:1 field mapping, the registration in `src/mcp/server.ts` follows the exact pattern already used for `FINDING_TAXONOMY_URI` a few lines above, and the two test files exercise both the pure builder (against the real JSON file, not a fabricated fixture) and the live MCP discover/read round-trip. CI is green across typecheck, build:mcp, and audit, and the PR is narrowly scoped to this one addition with no unrelated churn.

Nits — 5 non-blocking
  • src/review/enrichment-analyzers-taxonomy.ts: the `analyzerMetadata as AnalyzerMetadataFile` cast has no runtime validation, so a malformed or drifted `analyzer-metadata.json` (e.g. a missing `cost` field) would silently produce `undefined` entries in the taxonomy rather than failing loudly — consider a minimal shape assertion or reusing an existing schema/validator for that file if one exists elsewhere in the REES runtime.
  • test/unit/mcp-enrichment-analyzers.test.ts and enrichment-analyzers-taxonomy.test.ts both re-read and re-parse `review-enrichment/analyzer-metadata.json` independently — worth factoring into a shared test helper if this pattern is repeated for future taxonomy resources, per the existing `finding-taxonomy` tests (verify whether those already have such a helper).
  • The external review brief flags `src/mcp/server.ts` as a long file (~2054 lines) — pre-existing debt, not introduced by this diff, but a good candidate to note for a future extraction of resource registrations into a separate module.
  • Consider validating `analyzer-metadata.json` against a lightweight schema (zod or similar) at the top of `buildEnrichmentAnalyzersTaxonomyDocument` in src/review/enrichment-analyzers-taxonomy.ts so a future edit to the metadata file that drops a field fails fast in CI instead of producing a silently incomplete MCP resource.
  • If more MCP taxonomy resources are anticipated (per the `finding-taxonomy` precedent), extract the shared 'read local JSON fixture in tests' logic into test/helpers to cut duplication between the two new test files.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2226
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low 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 registers a gittensory:​//enrichment-analyzers resource in src/mcp/server.ts with mimeType application/json, sources the taxonomy from a new module that imports the committed analyzer-metadata.json directly (not the REES runtime), and adds unit/integration tests confirming the resource is discoverable and returns analyzers with categories, cost classes, and profiles present.

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).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 fbf5a8d 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://enrichment-analyzers resource from REES analyzer metadata

1 participant