Skip to content

(janitor/test-prune): remove tautological constant and type-shape assertions - #5928

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/test-prune-tautological-assertions
Open

(janitor/test-prune): remove tautological constant and type-shape assertions#5928
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/test-prune-tautological-assertions

Conversation

@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Summary

Deletes four test blocks that re-list exported constants or assert a locally-constructed type shape, so they cannot detect any plausible production regression. 47 lines removed, no production code touched.

Removed tests and surviving coverage

Removed Why it cannot catch a regression Surviving coverage
packages/cloud-agent-sdk/src/remote-command-catalog.test.tsdescribe('RemoteCommandState') Builds a literal object (commands: [] as never[]) and asserts Array.isArray on it. RemoteCommandState is a pure TypeScript type with no runtime export; the test never exercises production code. Type relationship is enforced by tsgo. The parser behind the state (parseRemoteCommandCatalog / remoteCommandCatalogV1Schema) is covered by the remaining tests in the same file.
packages/event-service/src/__tests__/deadline.test.tsCONTROL_PLANE_DEADLINE_MS / SEND_DEADLINE_MS Re-states the exported literal constants (15_000 / 30_000); any change must edit both the constant and the test in lockstep, so the assertion adds no behavioral protection. The withDeadline and RequestDeadlineError suites exercise the actual deadline behavior.
packages/wl-sdk/src/dolthub/api.test.tsdescribe('constants') Re-states DOLTHUB_API_BASE / DOLTHUB_WEB_BASE literals. buildDoltUrl and doltFetch tests already exercise DOLTHUB_API_BASE indirectly through URL construction; the constants remain exported and referenced.

Validation

  • Ran the three affected suites before and after: event-service/deadline.test.ts (20→18), wl-sdk/dolthub/api.test.ts (12→11), cloud-agent-sdk/remote-command-catalog.test.ts (19→18) — all green after removal.
  • oxlint on the three files: 0 warnings, 0 errors.
  • tsgo --noEmit on all three packages: clean.

No postgres/redis needed — all three suites are pure unit tests.

Remove tests that re-list exported constants or assert a locally
constructed type shape, so they cannot detect any production regression:

- remote-command-catalog.test.ts: the RemoteCommandState block built a
  literal object and asserted Array.isArray on it; RemoteCommandState is
  a pure TypeScript type with no runtime surface to exercise.
- deadline.test.ts: CONTROL_PLANE_DEADLINE_MS / SEND_DEADLINE_MS blocks
  re-stated the exported literal constants; behavior is already covered
  by the withDeadline suite.
- dolthub/api.test.ts: the constants block re-stated DOLTHUB_API_BASE /
  DOLTHUB_WEB_BASE; buildDoltUrl and doltFetch tests already exercise the
  base URL indirectly.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 7, 2026
@kilo-code-bot
kilo-code-bot Bot enabled auto-merge (squash) September 7, 2026 07:30
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