test: strengthen coding-standards guardrails for security and multi-scope pathBuilders#693
Draft
cursor[bot] wants to merge 2 commits into
Draft
test: strengthen coding-standards guardrails for security and multi-scope pathBuilders#693cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 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>
|
|
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.md(the canonical standards document). The existing source code already complies with the registry-driven MCP architecture.This PR adds strengthened automated guardrails that were missing from
main:tests/coding-standards/security.test.ts— enforces §9 safety rules: secret read-only metadata, client-sideRateLimiter, response redaction, and no secret value fields in toolset specstests/coding-standards/multi-scope-pathbuilders.test.ts— enforces §4 multi-scopepathBuildercontract (PathBuilderConfig,HARNESS_ORG/HARNESS_PROJECTdefaults)tests/coding-standards/docs-consistency.test.ts— extended to lock 11-tool model,registerTool, pathBuilder docs, andAGENTS.mdalignmentdocs/coding-standards.md— documents multi-scope pathBuilder rulesNote: The standards snapshot in the automation prompt is outdated vs the canonical docs:
harness_schema)import * as z from "zod/v4")server.tool()→server.registerTool()Type of Change
Checklist
pnpm testpasses (2626 tests)pnpm typecheckpassespnpm buildpassespnpm standards:checkpasses (92 tests)pnpm docs:checkpassesCoding Standards (registry-driven MCP model)
N/A — no new API coverage; only test/doc guardrails.