Skip to content

test: enforce coding standards guardrails for pure-data toolsets#519

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/mcp-server-coding-standards-c3d3
Closed

test: enforce coding standards guardrails for pure-data toolsets#519
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/mcp-server-coding-standards-c3d3

Conversation

@cursor

@cursor cursor Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Reviewed the codebase against docs/coding-standards.md registry-driven architecture rules. The project already enforces most standards via pnpm standards:check (72 automated tests in CI).

This PR closes one remaining gap: scs.ts imported createLogger, which violates the pure-data toolset rule.

Changes

  • Fix scs.ts: Remove createLogger from remediation PR preflight; transient list failures now fail open silently (documented best-effort policy unchanged)
  • Strengthen architecture.test.ts: Block utils/logger imports and createLogger() calls in toolset files
  • Update docs/coding-standards.md: Document that toolsets must not import createLogger or use any logging

Verification

  • pnpm standards:check — 72 tests pass
  • pnpm test — 2453 tests pass

Standards coverage (already enforced)

Rule Enforcement
11 fixed MCP tools only architecture.test.ts
Pure-data toolsets import bans + ToolsetDefinition export check
No console.log in src/ static scan
Singleton HarnessClient instantiation check
Scope injection model toolset-scope.test.ts, scope-params.test.ts
operationPolicy on endpoints registry-contract.test.ts
Write confirmation / elicitation registry-metadata.test.ts
Zod v4 + .describe() chaining architecture.test.ts, input-conventions.test.ts
File organization file-organization.test.ts
Open in Web View Automation 

thisrohangupta and others added 2 commits June 30, 2026 19:50
Bump version to 3.2.6 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
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 the logging rule

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