Skip to content

test: enforce coding standards guardrails and fix scs toolset logging#522

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

test: enforce coding standards guardrails and fix scs toolset logging#522
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/mcp-server-coding-standards-1fe8

Conversation

@cursor

@cursor cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

Audited the codebase against docs/coding-standards.md and closed a gap in automated enforcement: toolsets must remain pure data with no logging.

Changes

  • Fix scs.ts: remove createLogger from remediation PR preflight; transient list failures fail open silently (best-effort policy)
  • Strengthen architecture.test.ts: block utils/logger imports and createLogger() calls in toolset files
  • Update docs/coding-standards.md: document createLogger ban in toolsets; add search/remote-provider.ts to documented global fetch() exceptions

Standards audit summary

The registry-driven model is already well enforced via pnpm standards:check (72 tests across 9 files) and CI. Canonical surface is 11 consolidated tools (includes harness_schema) with Zod v4.

Type of Change

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

Checklist

  • pnpm test passes (2467 tests)
  • 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/
  • No console.log() in src/ (stdio JSON-RPC safety)
  • No createLogger() in toolsets (pure-data model)
Open in Web View Automation 

thisrohangupta and others added 3 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
…xtractors

Add regression tests for release 3.2.5 merged changes:
- create-agent prompt must document PLUGIN_ALLOWED_DOMAINS, allowedDomains
  input default, layout inclusion, and network-access guidance (#494)
- chaosLoadTestExtract/ListExtract project stable shapes and derived scalars
  from inputs[] without leaking scriptContent or user envelopes (#481)

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Remove createLogger from scs.ts remediation PR preflight — toolsets are
pure data and must not log. Transient preflight list failures now fail
open silently per the documented best-effort policy.

Add automated guardrails:
- FORBIDDEN_TOOLSET_IMPORTS blocks utils/logger imports
- architecture test rejects createLogger() calls in toolsets
- docs/coding-standards.md documents logging rule and remote-provider fetch exception

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.

@thisrohangupta

Copy link
Copy Markdown
Collaborator

Closing: duplicate 'strengthen coding standards guardrails' draft. Superseded by merged #536/#510 on main; the open variants (#505/#519/#522/#526/#541/#542/#549/#550) are near-identical to each other.

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