Skip to content

test: trim low-value tests across headless and desktop - #2406

Merged
jackwener merged 1 commit into
mainfrom
chore/trim-low-value-tests
Aug 7, 2026
Merged

test: trim low-value tests across headless and desktop#2406
jackwener merged 1 commit into
mainfrom
chore/trim-low-value-tests

Conversation

@jackwener

Copy link
Copy Markdown
Member

Summary

Removes low-value tests after a full-repo audit of 954 test files / 9,561 tests. -1,112 net lines, -17 test() declarations, zero product-coverage loss.

Changes

ChangeDetail
Delete meta-testcss-test-helpers.test.ts (600 lines): tests a pure test-infra helper (consumed only by 7 contract tests, whose correctness enforces it transitively). Product coverage: 0 loss.
Delete 10 near-duplicate variants (≥75% similarity, kept the more complete one)prompt-candidate-loop (4), harbor-cell (1), ab-run (1), harness-ab-cli (1), replay-decision (1), replay-identity (1), history-compact-artifacts (1)
Parameterize 3 fixed-prompt-controller clusters (8 → 3 loops)verifier-graded error classes (max_tokens/tool_step_cap_reached/policy_denied), execution-identity mismatch cases, stop-on-systemic-failure cases — same assertions, table-driven now

Audit findings (why this is the safe floor)

Full-repo scan found:

  • 0 byte-identical duplicate tests
  • 0 skipped/todo dead tests
  • Assertion-identical clusters exist only in session-manager (already trimmed in test(runtime): trim 60 redundant session-manager tests #2404)
  • All ≥75% similar pairs are different fail-closed guards (verified one-by-one) — deleting them would drop regression coverage
  • scripts/*.test.mjs (29 files / 4,170 lines) are CI/release infrastructure — kept

Runtime timings: biggest file (ai-sdk-backend, 15k lines) runs in 5s; CI slowness is dominated by build:test full tsc compile, not test execution.

Verification

  • esbuild syntax check: all 8 files pass
  • headless: 328/328 tests pass (7 affected files)
  • desktop history-compact-artifacts: 8/8 pass
  • tsc build: headless 0 errors

Remove 17 redundant test declarations + 1 meta-test file (-1,112 net
lines) after a full-repo low-value test audit:
- Delete css-test-helpers.test.ts (600 lines): pure test-infra meta
test - the helper is only consumed by other tests (7 contract tests),
its correctness is enforced transitively; zero product coverage loss.
- Delete 10 near-duplicate variants (>=75% similarity, kept the more
complete one): prompt-candidate-loop (4), harbor-cell, ab-run,
harness-ab-cli, replay-decision, replay-identity, history-compact.
- Parameterize 3 fixed-prompt-controller clusters (8 -> 3 loops):
verifier-graded error classes, execution-identity mismatch cases,
stop-on-systemic-failure cases.
All affected files verified: headless 7 files (328/328 pass), desktop
history-compact-artifacts (8/8 pass). Full-repo audit found zero
byte-identical duplicates and no skipped/todo dead tests, so this is
the safe floor for pure deletion; further cuts trade away guard
coverage.
@jackwener
jackwener merged commit 9a81132 into mainAug 7, 2026
9 of 10 checks passed
Astro-Han added a commit that referenced this pull request Aug 7, 2026
#2406 deleted the contract tests that imported these helpers; knip on the
desktop workspace then failed the typecheck lane for every PR on main.
Astro-Han added a commit that referenced this pull request Aug 7, 2026
#2406 deleted the contract tests that imported these helpers; knip on the
desktop workspace then failed the typecheck lane for every PR on main.
jackwener added a commit that referenced this pull request Aug 7, 2026
#2406 trimmed the tests that consumed findBadgeClassNames,
findUnreadableBadgeCallSites, cssMediaBody, findTextRoleOffenders,
mergeBySelector and assertCustomPropPinnedOnce, which turned them into
dead exports the typecheck job's knip gate rejects. Removes the six
functions plus the helpers only they consumed (readTsxTree,
jsxOpeningTags and the className regexes); every survivor keeps at
least one live consumer per the same knip run.
Astro-Han added a commit that referenced this pull request Aug 7, 2026
helper exports. Format residue was cleared in #2410; Knip still failed
the required typecheck lane on those unused exports. Remove them and
their exclusive private dependency graph, keep what live contracts import.
Astro-Han added a commit that referenced this pull request Aug 7, 2026
helper exports. Format residue was cleared in #2410; Knip still failed
the required typecheck lane on those unused exports. Remove them and
their exclusive private dependency graph, keep what live contracts import.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@jackwener