test: cover PR #398 Zod descriptions and entity schema cache keys#409
Draft
cursor[bot] wants to merge 3 commits into
Draft
test: cover PR #398 Zod descriptions and entity schema cache keys#409cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
…ails - Fix Zod 4 describe chaining in 7 tool handlers so MCP clients receive field descriptions (describe must follow optional/default) - Add architecture tests for Zod chain order and HarnessClient singleton - Include structural-validation in pnpm standards:check - Tighten identifierFields rule for body-based get operations - Update docs/coding-standards.md (confirm param, Zod 4 ordering, exceptions) Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Add behavioral regression tests for Zod 4 describe-after-optional/default chaining on harness_list, harness_search, harness_status, harness_describe, harness_diagnose, harness_get, and harness_schema. Add unit tests for buildLiveSchemaCacheKey scope isolation and bundledSnapshotMatchesScope. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
…solation - Assert preloadBundledEntitySchemas uses scope-aware cache keys from vendored meta - Guard against warming cache for mismatched account ids - Add org-scope cache isolation regression test for harness_schema live entities - Cover buildBundledSchemaKey key format 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
Adds regression tests for recently merged production changes where missing coverage carried meaningful business risk.
Risky behavior now covered
PR #398 — Zod 4 input schema descriptions
.describe()before.optional()/.default()strips field descriptions from the MCP tool surface, breaking LLM tool selection for pagination, scope, and filter fields.harness_list,harness_search,harness_status,harness_describe,harness_diagnose,harness_get,harness_schema) plus static architecture guard inarchitecture.test.ts.PR #396 — Live entity schema cache isolation by scope
buildLiveSchemaCacheKeyunit tests for account/org/project differentiationbundledSnapshotMatchesScoperejects mismatched org/project against vendored metapreloadBundledEntitySchemaswarms cache with scope-aware keys from vendored meta (not account-only keys)harness_schemaintegration tests proving separate cache entries for org and project scope identifiersTest files added/updated
tests/tools/zod-input-schema-descriptions.test.tstests/tools/entity-schema-cache-keys.test.tstests/tools/entity-schema-bundled.test.tstests/tools/harness-schema-tool.test.tsharness_schematests/coding-standards/architecture.test.tsWhy this reduces regression risk
preloadBundledEntitySchemaswas changed to use scoped keys; without tests, a revert to account-only keys would reintroduce the collision bug at process start.Validation