test: expand coding standards enforcement for registry and handler contracts#404
Draft
cursor[bot] wants to merge 2 commits into
Draft
test: expand coding standards enforcement for registry and handler contracts#404cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
…cident close Add focused regression tests for recently merged production paths with thin coverage: - harness_diagnose pipeline: return_download_url on requested_step_log for explicit step_id and auto-fetch paths; dedup when failed_step_logs already holds the URL - FME execute actions: fmeActionExtract wraps primitive kill/restore/archive responses so MCP output validation does not fail - harness_execute: successful security_exemption.approve remaps resource_id to exemption_id in the API path; FME kill remaps resource_id to feature_flag_name - incident close: response projection drops backend envelope/meta fields Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…ntracts Add automated guardrails for operationPolicy on all endpoints, valid resource scopes, identifierFields presence, write-tool confirm params, Zod v4 imports, pagination defaults, error handling patterns, and HarnessClient singleton instantiation. 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
Expands automated architecture guardrails in
tests/coding-standards/architecture.test.tsso the registry-driven MCP model stays enforced as the codebase grows.What was already in place
docs/coding-standards.mddocuments the consolidated 11-tool architecturepnpm standards:checkruns in CI alongside build, test, typecheck, and docs:checkconsole.log()insrc/, rawfetch()in handlers/toolsets, and toolset registration driftNew enforcement (8 tests)
Registry resource contracts
operationPolicy(risk+retryPolicy)identifierFieldsscope/supportedScopesuse onlyproject,org, oraccountTool handler contracts
create,update,delete,execute) expose aconfirmparamzod/v4harness_listkeeps pagination defaults (page=0,size=20, max100)errorResult()+toMcpError()(local-onlydescribe/schemaexempt)HTTP client singleton
new HarnessClient()is only allowed insrc/index.tsVerification