fix: enforce coding standards — Zod describe-last and expanded guardrails#415
Draft
cursor[bot] wants to merge 3 commits into
Draft
fix: enforce coding standards — Zod describe-last and expanded guardrails#415cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
…ctors Add regression tests for high-risk gaps in recent merges: - resolveLogDownloadUrl hostname rewrite for self-managed CDN URLs (PR #358) - HarnessClient.getCurrentUserId caching, dedup, and error paths (STO exemptions) - CCM GraphQL response extractors (views, breakdown, timeseries, summary, recommendations) - STO security_issue hint injection and pipeline_security_issue partition flattening Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…jection - Add sto-exemption-actions.test.ts for create preflight, scope routing (/approve vs /promote), elevation input mutation, and approver injection - Extend registry.test.ts to lock accountIdentifier injection inside body.resourceGroup for access_control resource_group create Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
- Fix .describe() ordering in 7 harness handler files (Zod 4 drops descriptions when .optional()/.default() follow .describe()) - Remove console.error debug logging from idp toolset bodyBuilder - Expand architecture.test.ts with checks for: - Zod describe-last rule on handler inputSchema - No server.tool() calls - No process.stdout.write - HarnessClient singleton (only src/index.ts) - No console.* in toolset files Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
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
Audits the codebase against
docs/coding-standards.mdand closes gaps found beyond the existing architecture tests from #373.Changes
Fixes
.describe()ordering in 7 handler files (harness-list,harness-get,harness-diagnose,harness-describe,harness-search,harness-status,harness-schema). Zod 4 silently drops descriptions when.optional()/.default()follow.describe()— ~37 params were invisible to MCP tool listings.console.errordebug logging fromidp.tstoolsetbodyBuilder(toolsets must stay pure data).Expanded
pnpm standards:checkguardrailsinputSchemachainsserver.tool()calls (onlyregisterTool)process.stdout.writeinsrc/HarnessClientsingleton — onlysrc/index.tsmay callnew HarnessClient()console.*in toolset filesVerification
Compliance status
The registry-driven architecture (11 consolidated tools, pure-data toolsets, stderr-only logging, CI
standards:check) was already in place. This PR fixes the main runtime gap (lost Zod descriptions) and prevents regression.