Skip to content

test(standards): centralize tool allowlists and add AGENTS.md drift guards#577

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/mcp-server-coding-standards-9006
Draft

test(standards): centralize tool allowlists and add AGENTS.md drift guards#577
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/mcp-server-coding-standards-9006

Conversation

@cursor

@cursor cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Description

Audited the codebase against docs/coding-standards.md architecture rules. All 85 standards guardrail tests and 2517 unit tests pass.

This PR strengthens enforcement to prevent drift back to outdated architecture (10 tools, Zod v3):

  • tests/coding-standards/allowed-tools.ts — single source of truth for the 11 consolidated MCP tool handlers
  • Refactored coding-standards tests to import shared allowlists (DRY across 6 test files)
  • agents-md-consistency.test.ts — ensures AGENTS.md documents 11 tools, Zod v4, and pnpm standards:check
  • docs-consistency guard — fails if docs revert to "10 consolidated tools"

Standards audit summary

Rule Status
11 consolidated tools only (no new registerTool)
Pure-data toolsets (no HarnessClient/Registry/logger)
Shared response extractors
Scope injection via registry (no manual account/org/project IDs)
identifierFields on all resources
Error handling (errorResult + toMcpError)
No console.log() in src/
Zod v4 with .describe() last
Write ops require elicitation
Singleton HarnessClient
File organization (toolsets not tools/)

Note: The automation prompt referenced 10 tools and Zod v3 — those are outdated. Canonical references are docs/coding-standards.md and AGENTS.md (11 tools, Zod v4).

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Checklist

  • pnpm test passes (2517 tests)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes (85 tests)
  • pnpm docs:check passes (if registry/tool counts changed)

Coding Standards (registry-driven MCP model)

  • No new server.registerTool() calls
  • No console.log() in src/
Open in Web View Automation 

thisrohangupta and others added 2 commits July 7, 2026 11:56
Running a pipeline via harness_execute with input_set_ids plus a full
pipeline document in `inputs` (either a YAML string or an object with a
top-level `pipeline` key) silently dropped the input set: the
materialization guard only admitted empty or flat key/value inputs, so
these fell through to the `inputSetIdentifiers` query param, which
pipeline execute ignores. The run proceeded without the input set applied.

Broaden the guard to also handle full-pipeline inputs, and merge the
materialized input set as the base with the caller's document as the
override (caller wins per variable / stage), sending the result as the
YAML execute body — the same mechanism the working UI path uses.

Adds tests for both the YAML-string and object input forms.

Note: pipeline_v1 still accepts input_set_ids in the shared schema
without forwarding them; left as-is pending confirmation of the v1
execute API's input-set contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

AI-Session-Id: b8e26a07-057c-406c-bfde-245eb0c917ae
AI-Tool: claude-code
AI-Model: unknown
…uards

- Add tests/coding-standards/allowed-tools.ts as single source of truth for
  the 11 consolidated MCP tool handlers
- Refactor coding-standards tests to import shared allowlists (DRY)
- Add agents-md-consistency.test.ts to prevent reverting to stale 10-tool
  or Zod v3 architecture in AGENTS.md
- Add docs-consistency guard against documenting 10 consolidated tools

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ thisrohangupta
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants