Skip to content

fix: enforce toolset purity and strengthen coding standards guardrails#528

Closed
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/mcp-server-coding-standards-b202
Closed

fix: enforce toolset purity and strengthen coding standards guardrails#528
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/mcp-server-coding-standards-b202

Conversation

@cursor

@cursor cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Compliance review against docs/coding-standards.md (registry-driven MCP architecture).

Findings

  • All 72 pnpm standards:check guardrails pass
  • Full suite: 2453 tests, pnpm build, pnpm typecheck, pnpm docs:check green
  • Codebase follows the 11 consolidated MCP tools model (harness_schema is the 11th; pasted 10-tool spec is outdated)
  • Stack uses Zod v4 (import * as z from "zod/v4"), not v3

Fix in this PR

  • Toolset purity violation: src/registry/toolsets/scs.ts imported createLogger and logged from a toolset preflight hook — removed; 5xx/network preflight failures now fail open silently (behavior unchanged, logging moved out of toolset layer per standards)

Guardrails strengthened

  • tests/coding-standards/architecture.test.ts now forbids createLogger imports and usage in src/registry/toolsets/
  • docs/coding-standards.md documents the createLogger ban and search/remote-provider.ts fetch exception

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Checklist

  • pnpm test passes
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes (architecture guardrails — see docs/coding-standards.md)
  • pnpm docs:check passes (if registry/tool counts changed)

Coding Standards (registry-driven MCP model)

  • No new server.registerTool() calls — only toolset definitions in src/registry/toolsets/
  • Toolset registered in ALL_TOOLSETS and ToolsetName union
  • operationPolicy on every new/changed endpoint
  • Shared response extractors from src/registry/extractors.ts (no raw passthrough on real endpoints)
  • identifierFields and scope declared on new resources
  • No console.log() in src/ (stdio JSON-RPC safety)
Open in Web View Automation 

thisrohangupta and others added 2 commits June 30, 2026 18:31
Bump version to 3.2.5 across package.json, root and directory bundle
manifests, and the release-metadata version contract test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

AI-Session-Id: cc0246c6-f5e1-40f2-bf1a-6d8f3c6ba701
AI-Tool: claude-code
AI-Model: unknown
- Remove createLogger from scs_remediation_pr preflight (silent fail-open on transient errors)
- Ban createLogger imports and usage in toolset files via architecture guardrails
- Document createLogger ban and remote-provider fetch exception in coding-standards.md

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ thisrohangupta
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

- harness-execute fetchInputSetHint: use input_set list dispatch instead of client.request
- diagnose/pipeline diagnoseChildPipeline: use execution get dispatch for child runs
- Add architecture guardrail banning client.request in tool handlers (entity-schema/live exempt)
- Update chained-pipeline diagnose test to mock registry.dispatch for child execution
- Document client.request anti-pattern in coding-standards.md

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@thisrohangupta

Copy link
Copy Markdown
Collaborator

Closing: duplicate of the toolset-purity / ban-createLogger cluster. This intent already landed on main via merged #510 and #536; the remaining open variants are redundant with each other. Keeping at most one canonical PR.

Triaged as part of an open-PR cleanup pass. If this was mis-triaged, reopen and rebase onto current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants