fix: enforce coding standards for Zod schemas and architecture guardrails#401
Draft
cursor[bot] wants to merge 2 commits into
Draft
fix: enforce coding standards for Zod schemas and architecture guardrails#401cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Add regression tests for harness_schema recursive definition lookup when only a non-schema-node wrapper exists, and when a nested schema node must win over a wrapper with the same name. Extend body-normalizer and harness_update coverage for environment YAML updates with injectIdentifier after unwrapKey. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…ails - Fix Zod 4 .describe() chain order in 7 tool handlers so MCP clients receive parameter descriptions for LLM tool selection - Align harness_schema error handling with errorResult/toMcpError pattern - Expand standards:check with singleton client, write-tool confirmation, error-handling, and registered input-schema description tests Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
7 tasks
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
Audited the codebase against
docs/coding-standards.mdand strengthened automated enforcement so the registry-driven MCP architecture stays compliant in CI.Changes
Bug fixes (Zod 4 parameter descriptions)
Fixed
.describe()chain order in 7 tool handlers (harness_list,harness_get,harness_search,harness_status,harness_diagnose,harness_describe,harness_schema). In Zod 4, calling.describe()before.optional()/.default()drops descriptions from the registered MCP schema — LLMs depend on these for tool selection.Error handling
Aligned
harness_schemawith the standarderrorResult()/toMcpError()pattern used by other handlers.Expanded
pnpm standards:check(16 tests, up from 9)HarnessClientonly instantiated insrc/index.tsconfirmViaElicitationtoMcpErrorfor unexpected failuresVerification
Checklist
server.registerTool()callsconsole.log()insrc/pnpm standards:checkpasses in CI