Skip to content

test(runtime): trim 60 redundant session-manager tests - #2404

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

test(runtime): trim 60 redundant session-manager tests#2404
jackwener merged 1 commit into
mainfrom
chore/trim-session-manager-tests

Conversation

@jackwener

Copy link
Copy Markdown
Member

Summary

Trims 60 low-value/duplicated tests from the 23k-line packages/runtime/src/__tests__/session-manager.test.ts to speed up the runtime test suite (currently the heaviest test file in the repo).

320 → 260 tests (-19%), 23,632 → 21,306 lines (-9.6%)

What was removed

CategoryCountRationale
Near-identical copy-paste variants (≥75% similarity)11Assertions fully covered by the retained test (verified via assertion diff)
Trivial tests (≤25 lines, single-point asserts)29One-line behavior snapshots, low regression value
Similar variants (≥60%, kept the more complete one)13Same scenario matrix, shorter variant dropped
Edge variants (50–58%)7Marginal permutations of retained scenarios

Breakdown by area: getMessages read-model 15, permission/trivial asserts 15, startup recovery 9, next turn 4, markSessionRead 4, durable run ledger 4, hosted 3, child/concurrent 3, others 3.

Not touched

Core behavior matrices are fully retained: continuation claim/serialization, startup recovery, getMessages terminal-fact repair, child/stop session lifecycle, steering/followup queues, ledger/checkpoint durability.

Verification

  • babel AST full-file diff: 0 tests modified, 60/60 exact deletions matched
  • esbuild syntax check: pass
  • tsc build: 0 errors
  • node --test: 260/260 passing (~3.9s vs ~4.5s before)

Remove low-value and duplicated coverage from the 23k-line
session-manager.test.ts to speed up the runtime test suite:
- 11 near-identical copy-paste variants (>=75% similarity,
assertions fully covered by the retained test)
- 29 trivial tests (<=25 lines, single-point assertions)
- 13 similar variants (>=60%, kept the more complete one)
- 7 edge variants (50-58%)
320 -> 260 tests, -2,491 lines. Core behavior matrices
(continuation, startup recovery, getMessages repair, child/stop)
are untouched. Verified with babel AST (0 modified tests,
60/60 exact deletions), esbuild syntax check, tsc build, and
node --test 260/260 passing.
@jackwener
jackwener merged commit 4e2beac into mainAug 7, 2026
9 of 10 checks passed
@jackwener
jackwener deleted the chore/trim-session-manager-tests branch August 7, 2026 07:07
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