Skip to content

test: strengthen coding-standards guardrails#588

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/mcp-server-coding-standards-90ea
Draft

test: strengthen coding-standards guardrails#588
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/mcp-server-coding-standards-90ea

Conversation

@cursor

@cursor cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

Audited the codebase against the registry-driven MCP architecture standards in docs/coding-standards.md. The codebase already complies — 89 automated guardrail tests now enforce the rules on every CI run via pnpm standards:check.

This PR strengthens enforcement to prevent drift:

  • tests/coding-standards/constants.ts — single source of truth for the 11 allowed MCP tools and handler file paths (used across all standards tests)
  • tests/coding-standards/security.test.ts — RateLimiter usage, secrets metadata-only policy, credential logging checks
  • docs-consistency.test.ts — AGENTS.md drift guards (11 tools, Zod v4, pnpm standards:check)

Type of Change

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

Checklist

  • pnpm test passes (2487 tests)
  • pnpm standards:check passes (89 tests)
  • No new server.registerTool() calls
  • No console.log() in src/

Notes on standards snapshot

The automation prompt referenced an older snapshot (10 tools, Zod v3). The canonical standards are documented in docs/coding-standards.md and AGENTS.md:

  • 11 consolidated tools (includes harness_schema)
  • Zod v4 (import * as z from "zod/v4")
  • registerTool() (not deprecated server.tool())
  • confirm: true via client elicitation (not confirmation)
Open in Web View Automation 

Centralize allowed MCP tool and handler lists in tests/coding-standards/constants.ts
so architecture, scope, error-handling, and docs tests cannot drift apart.

Add security guardrails (RateLimiter usage, secrets metadata-only policy,
credential logging checks) and AGENTS.md consistency tests alongside the
existing docs/coding-standards.md checks.

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 sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants