test: strengthen coding-standards guardrails for security and multi-scope pathBuilders#675
Draft
cursor[bot] wants to merge 3 commits into
Draft
test: strengthen coding-standards guardrails for security and multi-scope pathBuilders#675cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
…cope pathBuilders Add automated enforcement for docs/coding-standards.md §4 and §9: - security.test.ts: secret read-only metadata, RateLimiter, response redaction - multi-scope-pathbuilders.test.ts: PathBuilderConfig contract for scope-encoding pathBuilders - docs-consistency.test.ts: lock 11-tool model, registerTool, pathBuilder docs, AGENTS.md alignment - docs/coding-standards.md: document multi-scope pathBuilder rules 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>
|
|
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.
Description
Audited the codebase against
docs/coding-standards.mdand confirmed existing source already complies with the registry-driven MCP architecture. This PR adds automated guardrails that were missing frommainto prevent future drift.Added enforcement
tests/coding-standards/security.test.ts(§9) — secret resource is metadata-only (list/get), no value-exposing body fields in the secrets toolset,RateLimiterinHarnessClient, and response redaction viaredactJsonString.tests/coding-standards/multi-scope-pathbuilders.test.ts(§4) — custompathBuilderfunctions that encode account/org/project in the URL path must acceptPathBuilderConfigand honorHARNESS_ORG/HARNESS_PROJECTdefaults.tests/coding-standards/docs-consistency.test.tsextensions —AGENTS.mdalignment,registerTool()(not deprecatedserver.tool()), and multi-scope pathBuilder documentation.docs/coding-standards.md— documents the multi-scopepathBuildercontract.Standards snapshot note
The automation prompt referenced an older standards snapshot (10 tools, Zod v3,
server.tool()). Canonical docs and enforcement use 11 consolidated tools (includingharness_schema), Zod v4, andregisterTool().Type of Change
Checklist
pnpm testpasses (121 files / 2619 tests)pnpm typecheckpassespnpm buildpassespnpm standards:checkpasses (12 files / 92 tests)pnpm docs:checknot required (no registry/tool count changes)Coding Standards (registry-driven MCP model)
server.registerTool()calls