feat: add automated coding standards enforcement#388
Draft
cursor[bot] wants to merge 12 commits into
Draft
Conversation
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Add focused unit tests for buildBodyNormalized wrapped-body identifier injection and conflict detection, plus harness-client non-FME header casing and connector update success path regression coverage for PR #328. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…nd create path Add body-normalizer unit tests for unwrapKey injection (service, environment) and flat-body override updates. Add harness_update integration tests for service identifier injection and environment conflict rejection. Assert connector create never auto-injects connector_id from params. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Add scripts/check-standards.js and tests/coding-standards.test.ts to enforce the registry-driven architecture rules documented in docs/coding-standards.md. Fix existing violations: - Remove HarnessClient imports from ccm and sto toolsets; extend HarnessClientInterface with request/getCurrentUserId for preflight hooks - Replace console.error with createLogger in idp toolset - Add knowledge-graph and semantic-layer to ToolsetName union Wire pnpm standards:check into CI and CONTRIBUTING.md. 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
Adds automated enforcement of the registry-driven MCP server architecture rules documented in
docs/coding-standards.md.Changes
scripts/check-standards.js— CI script that blocks architectural anti-patterns:console.log()insrc/registerTool()only in the 11 consolidatedharness-*.tshandlerssrc/tools/fetch()only in allowlisted paths (HarnessClient, log-resolver, webhooks, entity-schema)HarnessClientsingleton insrc/index.tsonlyHarnessClient,McpServer, orRegistryconsole.*ToolsetNameunion ↔ toolset files ↔ALL_TOOLSETSstay in synctests/coding-standards.test.ts— Vitest mirror of key checks plus integration with the scriptpnpm standards:check— New npm script; wired into CI workflowFixes for existing violations:
ccm.ts/sto.ts: removeHarnessClientimports; useHarnessClientInterfaceviaPreflightContextidp.ts: replaceconsole.errorwithcreateLoggertypes.ts: extendHarnessClientInterfacewithrequest()andgetCurrentUserId(); addknowledge-graphandsemantic-layertoToolsetNameVerification
All 2118 tests pass.