Repository navigation
test: delete the tests that don't earn their keep, and tidy the rest - #192
Merged
Merged
Conversation
…hare its fixtures
…lips off the wall clock
ChristopherPHolder
force-pushed
the
f/test-cleanup
branch
from
November 22, 2026 14:57
b1f91db to
c255f6c
Compare
ChristopherPHolder
changed the base branch from
f/modest-newton-crdkfi
to
main
November 22, 2026 14:57
ChristopherPHolder
marked this pull request as ready for review
November 22, 2026 14:57
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.
What and why
I went through every test suite to delete the tests that don't earn their keep and to tidy the rest. A test went when it only restated a string or constant from the source, only exercised Effect, Schema or another library, duplicated another test's path and assertions, or checked something the type checker already guarantees. Bug-fix regression tests, contract and wire-encoding tests, the smoke tests and the full-program tests all stay. No production code changed.
apps/botapps/consolepageapps/consoleworkerapps/consolesmokelibs/activity-sign-inlibs/design-systemlibs/office-domainlibs/recording-requestsDeleted tests
Restates a string or constant from the source:
libs/office-domain/test/RecordingRequest.test.ts: "explains each ignore reason to the person who pressed the button"libs/office-domain/test/RecordingEdit.test.ts: "explains every reason it ignores an edit"apps/console/src/app/recorder/notices.spec.ts: "confirms a started recording", "says where the summary goes once stopped", "confirms a pause and a resume"apps/console/src/app/recorder/describe-phase.spec.ts: "asks for patience while connecting", "explains why nothing can start while the bot is away", "invites a start when idle"apps/console/src/app/edits/plan.spec.ts: "are offered by name, Brief first" (STYLE_OPTIONS)apps/console/src/app/history/describe-recording.spec.ts: "gives each state its badge"apps/bot/test/recording/SummaryWriter.test.ts: "leaves the action items out of every style, since they're pulled out on their own" (substrings of the prompt constants)Tests library behaviour, not ours:
libs/recording-requests/test/SignInHandlers.test.ts: "answers 404 to a path the API doesn't declare" (HttpApi routing)apps/bot/test/answering/CloudflareDecisionModel.test.ts: "rejects an answer with a label it wasn't offered" and "rejects probabilities that don't add up" (both checks live in Effect'sDecisionModel, not in our adapter)Duplicates another test:
libs/recording-requests/test/RecordingHistory.test.ts: "tells running, transcribing, finished and silent recordings apart" (stateOf, already covered byRecordingStates.test.ts)libs/recording-requests/test/ConsentRequests.test.ts: "is not agreed without a decision" (standingOf, already covered by "says someone who was never asked hasn't agreed")libs/design-system/src/components.spec.ts: "is named by the visible text, which is its label" (folded into "is a native checkbox named by its visible label")apps/console/src/app/recorder/notices.spec.ts: "includes the reason" (unreachableNotice, asserted inrecorder.spec.ts)apps/console/src/app/recorder/describe-phase.spec.ts: "explains a failed start" (asserted through the view inrecorder.spec.ts)apps/console/src/app/recorder/record-button.spec.ts: "says what pressing it does", "offers to start when nothing is recording" (both labels and presses are covered inrecorder.spec.ts; the file is gone)apps/bot/test/recording/audio/ClipAudio.test.ts: "has nothing for a clip it was never given" (same assertion as "gives every buffer its own audio")apps/bot/test/recording/audio/ClipCutter.test.ts: "finishes the partial clip when flushed, and starts empty again" (its one extra assertion moved into the first test)apps/bot/test/recording/RecordingWriter.test.ts: "leaves an item unassigned when its owner wasn't there" (covered byownedByinActionItems.test.ts)Type checker guarantees it, or a trivial pass-through:
apps/bot/test/recording/RecordingRequests.test.ts: "sends the recording status with times as ISO strings" (it checked a decoded value is aDateTime.Utc; the wire encoding is tested inoffice-domain)apps/console/src/app/main.spec.ts: "keeps the clock" (TickedClockwriting its payload tonow)Cleanups
libs/recording-requests/test/database.ts(migrations, an unreachable database, counted and stalling connections) andtest/api.ts(the HTTP app the handler tests build),apps/consolerecorder/fixtures.tsandconsent/fixtures.ts,answeringOnceinfakes.ts, andsignedInAs/withSessionin the bot'sfakes.ts.fakes.ts(addToThread, the recordedviews) and unexported its internal types.Capture.test.tsandRecorder.test.tsno longer stamp clips withDateTime.nowUnsafe(), and "keeps nothing from someone who hasn't agreed" waits for an admitted speaker's clip instead of a live 10 ms sleep.api.spec.tskeeps its retry reports per test instead of in module state that each test had to clear.it.effectinstead of wrapping each body inEffect.runPromise.Config.test.ts); the line it guarded only checkedRedacted's string form.Predicate.isTaggedinstead of comparing_tagorinstanceofby hand.Program.test.ts, and fixed misleading names inSlackMessage.test.tsandConfig.test.ts.describeinto its neighbour inoffice-domain.How I tested it
pnpm vp run cipasses: typecheck, lint and format, every package's tests, the build and the smoke test. I ran the changedCapture.test.tsseveral times to check it doesn't flake.Checklist
vp run cipasses