Skip to content

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

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/mcp-server-coding-standards-6cbb
Draft

test: strengthen coding-standards guardrails for security and multi-scope pathBuilders#693
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/mcp-server-coding-standards-6cbb

Conversation

@cursor

@cursor cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Audited the codebase against docs/coding-standards.md (the canonical standards document). The existing source code already complies with the registry-driven MCP architecture.

This PR adds strengthened automated guardrails that were missing from main:

  • tests/coding-standards/security.test.ts — enforces §9 safety rules: secret read-only metadata, client-side RateLimiter, response redaction, and no secret value fields in toolset specs
  • tests/coding-standards/multi-scope-pathbuilders.test.ts — enforces §4 multi-scope pathBuilder contract (PathBuilderConfig, HARNESS_ORG/HARNESS_PROJECT defaults)
  • tests/coding-standards/docs-consistency.test.ts — extended to lock 11-tool model, registerTool, pathBuilder docs, and AGENTS.md alignment
  • docs/coding-standards.md — documents multi-scope pathBuilder rules

Note: The standards snapshot in the automation prompt is outdated vs the canonical docs:

  • 10 tools → 11 (includes harness_schema)
  • Zod v3 → Zod v4 (import * as z from "zod/v4")
  • server.tool()server.registerTool()

Type of Change

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

Checklist

  • pnpm test passes (2626 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes (92 tests)
  • pnpm docs:check passes

Coding Standards (registry-driven MCP model)

N/A — no new API coverage; only test/doc guardrails.

Open in Web View Automation 

thisrohangupta and others added 2 commits July 24, 2026 00:34
…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>
@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