Skip to content

test: strengthen coding-standards guardrails for security and multi-scope pathBuilders#682

Draft
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/mcp-server-coding-standards-962d
Draft

test: strengthen coding-standards guardrails for security and multi-scope pathBuilders#682
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/mcp-server-coding-standards-962d

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

Audited the codebase against docs/coding-standards.md and confirmed the registry-driven MCP architecture is compliant. This PR cherry-picks strengthened automated guardrails that were missing from main:

  • tests/coding-standards/security.test.ts (§9): secret read-only metadata, client-side RateLimiter, response redaction
  • tests/coding-standards/multi-scope-pathbuilders.test.ts (§4): PathBuilderConfig contract for multi-scope pathBuilder functions
  • tests/coding-standards/docs-consistency.test.ts: AGENTS.md alignment, registerTool vs deprecated server.tool(), pathBuilder docs
  • docs/coding-standards.md: documents multi-scope pathBuilder requirements

Note: The standards snapshot in the automation prompt is outdated vs canonical docs — the server has 11 consolidated tools (includes harness_schema), uses Zod v4 (import * as z from "zod/v4"), and registers tools via server.registerTool() (not server.tool()).

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (test guardrails)

Checklist

  • pnpm test passes (121 files / 2619 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes (12 files / 92 tests)
  • pnpm docs:check passes (no registry/tool count changes)

Coding Standards (registry-driven MCP model)

  • No new server.registerTool() calls — only test guardrails added
  • No console.log() in src/ (stdio JSON-RPC safety)
Open in Web View Automation 

thisrohangupta and others added 4 commits July 22, 2026 00:36
…cope pathBuilders

Add automated enforcement for docs/coding-standards.md §4 and §9:
- security.test.ts: secret read-only metadata, RateLimiter, response redaction
- multi-scope-pathbuilders.test.ts: PathBuilderConfig contract for scope-encoding pathBuilders
- docs-consistency.test.ts: lock 11-tool model, registerTool, pathBuilder docs, AGENTS.md alignment
- docs/coding-standards.md: document multi-scope pathBuilder rules

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
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.

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