Skip to content

(janitor/test-prune): prune zod framework-behavior test in cloud-agent-sdk - #6072

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/test-prune/cloud-agent-sdk-zod-test
Open

(janitor/test-prune): prune zod framework-behavior test in cloud-agent-sdk#6072
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/test-prune/cloud-agent-sdk-zod-test

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Deletes one test in packages/cloud-agent-sdk/src/remote-model-catalog.test.ts that 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:

  • Executes no repository-owned production code — it never imports or calls remoteModelCatalogV1Schema / remoteModelCatalogWireV1Schema or any other module under test.
  • Verifies a dependency's behavior (zod's built-in enum rejection) rather than repo logic.
  • Cannot fail on a production regression — the only way it breaks is a zod behavior change or a lockstep edit to the test's own literals.

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 real remoteModelCatalogV1Schema against reasoning, reasoning_content, reasoning_details, and reasoning_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-sdk suite): 1393 passed
  • pnpm typecheck (tsgo): clean
  • oxlint on the changed file: 0 warnings, 0 errors

…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.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 11, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 11, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants