Enforce coding standards: Zod schema descriptions and architecture guardrails#408
Closed
cursor[bot] wants to merge 3 commits into
Closed
Enforce coding standards: Zod schema descriptions and architecture guardrails#408cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…ails - Fix Zod 4 describe chaining in 7 tool handlers so MCP clients receive field descriptions (describe must follow optional/default) - Add architecture tests for Zod chain order and HarnessClient singleton - Include structural-validation in pnpm standards:check - Tighten identifierFields rule for body-based get operations - Update docs/coding-standards.md (confirm param, Zod 4 ordering, exceptions) Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…ools Add zod-input-schemas.test.ts to verify every registered inputSchema field exposes a non-empty description (Zod 4 + MCP SDK contract). Also add a guardrail that src/ never imports bare "zod" — only zod/v4. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
7 tasks
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Strengthens automated enforcement of the registry-driven MCP architecture documented in
docs/coding-standards.md.Already in place (PR #398 base)
.describe()after.optional()/.default())tests/coding-standards/architecture.test.ts(fixed 11 MCP tools, toolset purity, singleton client, noconsole.log, no rawfetchin handlers/toolsets)pnpm standards:checkon every PRAdded in this branch
tests/coding-standards/zod-input-schemas.test.ts: Registers all 11 consolidated MCP tools and asserts everyinputSchemafield exposes a non-empty description — catches Zod 4 description-stripping regressions across the full tool surface (not justharness_execute)src/must useimport * as z from "zod/v4", never bare"zod"Verification
All checks pass (2133 tests).