(janitor/test-prune): prune zod framework-behavior test in cloud-agent-sdk - #6072
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/test-prune): prune zod framework-behavior test in cloud-agent-sdk#6072kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
…t-sdk Remove the "reproduces the old interleaved enum rejecting CLI catalogs" test in remote-model-catalog.test.ts. It constructs a throwaway zod union entirely inside the test and asserts zod's built-in enum rejection, so it never executes any repository-owned production code and cannot fail on a production regression — only a zod behavior change or a lockstep edit to the test's own literals would break it. The contract this test gestures at is already covered by the adjacent "accepts CLI interleaved field names the picker does not use" test, which exercises the real remoteModelCatalogV1Schema with each of the four CLI field names.
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
Deletes one test in
packages/cloud-agent-sdk/src/remote-model-catalog.test.tsthat cannot detect a production regression.Removed
it('reproduces the old interleaved enum rejecting CLI catalogs')This test builds a throwaway zod
z.union([z.boolean(), z.object({ field: z.enum([...]) }).strict()])entirely inside the test body and asserts that zod rejects two field names. It:remoteModelCatalogV1Schema/remoteModelCatalogWireV1Schemaor any other module under test.Surviving coverage
The contract this test gestures at — accepting the CLI's interleaved field names — is already covered by the adjacent
it('accepts CLI interleaved field names the picker does not use')test, which runs the realremoteModelCatalogV1Schemaagainstreasoning,reasoning_content,reasoning_details, andreasoning_text.Why the removed test could not detect an additional regression
Any regression in the schema's handling of interleaved field names would be caught by the surviving behavioral test. The removed test asserted only that a hand-rolled, non-production zod union rejects invalid values — a property of zod, not of this repository.
Verification
pnpm jest remote-model-catalog.test.ts: 12 passed (was 13)pnpm jest(full@kilocode/cloud-agent-sdksuite): 1393 passedpnpm typecheck(tsgo): cleanoxlinton the changed file: 0 warnings, 0 errors