Skip to content

test(standards): strengthen coding-standards guardrails#582

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

test(standards): strengthen coding-standards guardrails#582
cursor[bot] wants to merge 4 commits into
mainfrom
cursor/mcp-server-coding-standards-3547

Conversation

@cursor

@cursor cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Audited the codebase against docs/coding-standards.md and strengthened automated enforcement so architecture rules stay enforced in CI.

Changes

  • Added tests/coding-standards/security.test.ts with guardrails for:
    • Secret resource read-only metadata (no create/update/delete)
    • RateLimiter usage in HarnessClient
    • Default log body redaction in HarnessClient error paths
    • formatBodyPreview on write confirmation prompts
  • Expanded tests/coding-standards/docs-consistency.test.ts to lock key architecture/safety rules in docs/coding-standards.md
  • Linked AGENTS.md to the canonical coding standards doc

Verification

  • pnpm standards:check passes (88 tests)
  • pnpm test passes (2470 tests)

Notes

The user-provided standards snapshot listed 10 tools and Zod v3. The canonical repo standard is 11 consolidated tools (includes harness_schema) and Zod v4 (import * as z from "zod/v4"). Existing docs-consistency.test.ts and architecture.test.ts already prevent regression to the outdated counts.

Open in Web View Automation 

cursoragent and others added 4 commits July 7, 2026 18:13
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>
Strengthen automated enforcement of coding-standards.md:
- Secret resource remains read-only metadata (no create/update/delete)
- HarnessClient uses RateLimiter and redacts error log bodies by default
- Write handlers use formatBodyPreview for confirmation prompts
- Docs-consistency tests lock key architecture and safety rules in AGENTS.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 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