Repository navigation
test: prune tests that can't catch a regression - #4452
Merged
Merged
Conversation
Delete tests that pin retired /api/v1 output, restate constants, defaults, getters or field copies, check what the compiler already checks, assert private state, call order or exact SQL/log text, or repeat a case another test already covers. Each removed duplicate names a surviving test that runs the same case, and every Postgres keeper is in a CI list. Remove the production code only those tests reached: the unused Legacy option of device login (the retired v1 start answer), jellycompat mapSortBy, and test-only wrappers in the API handlers. Tests that used the wrappers now call the live functions, and TestDeriveEpisodePairs moves to the filesplit package that owns it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Contributor
im85288
added a commit
to im85288/silo-server
that referenced
this pull request
Nov 18, 2026
Upstream's test pruning (Silo-Server#4452, Silo-Server#4465) removed the tests this branch extended for probe repair and the on-disk check; the probe-repair case moves to its own test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (no client-visible change)
About 80 Go and web tests, plus many table rows and single assertions, could not fail on a regression that matters. They pinned the JSON of retired
/api/v1handlers, restated constants and defaults, checked what the compiler or a startup panic already enforces, asserted private state, call order, CSS classes, or exact SQL and log text, or repeated a case another test already runs. They cost CI time and break on refactors without protecting behavior. This removes them, following "Decide what to test" in CONTRIBUTING.md.Approach
/api/v1output and of migrations that have already shipped; tests that no code change can fail; and tests tied to how the code is written rather than what it does. Expected values that were computed with the code's own formula are now literals.scripts/ci/db-contracts.txt, and no test indb-contracts.txtordb-pins.txtwas removed or edited.Legacyoption of device login, which only the retired v1 start route set;mapSortByin jellycompat; and test-only wrappers ininternal/api/handlers. Tests that used the wrappers now call the live functions.TestDeriveEpisodePairsmoves tointernal/catalog/filesplit, the package that owns the function.Removed duplicates and the tests that keep covering them
Go:
internal/scanner:TestCollectLogicalFilePathsAdmitsCommonVideoContainers→TestSupportsVideoFile;TestEnsureCopySafetyFailureRecordsNothing→TestEnsureCopySafetyFailureDisablesCopyWithoutCaching,TestScanCopySafetyErrorRecordsNothing;TestScanSubtreeAudiobookLibraryUsesAudiobookPipeline→TestScanSubtreeAudiobookMatchesLibraryScanBooks;TestScanFileAudiobookLibraryUsesAudiobookPipeline,TestScanFileAudiobookExplicitRequestScansExcludedFile→TestScanFileAudiobookMatchesLibraryScanBooks;TestScanFileEbookLibraryUsesEbookPipeline→TestScanFileEbookKeepsBookPublishedDuringSiblingScanDB(indb-contracts.txt);TestPartitionExtraPaths→TestClassifyExtraPathMovieLibraryinternal/jellycompat:TestDecodeProfileConditionIsRequiredDefault→TestDeviceProfileRoundTripKeepsOptionalConditions;TestTrickplayRouterDoesNotRequireSubtitles→TestTrickplayPlaylistGrantsSheetsByPlaySession;TestHandleVideoStream_KnownPlaySessionItemIDMediaSourceServesFile,TestHandleVideoStream_KnownPlaySessionUnknownMediaSourceRejected→TestVideoStreamTokenAuthRouteIdentity;TestUpstreamRecipeCardOverlaysDurableRoutingAssignment→TestCompatNetworkRouteIsMirroredAndRecoverable;TestRememberCompatTracksLeavesTheLatestClaimWhenWritesInterleave→TestRememberCompatTracksLeavesTheLatestClaimAfterManyInterleavedWrites;TestMapSortByDateLastContentAdded→TestParseItemsQueryDateLastContentAddedSortScope;TestCommaSeparatedFieldsStillParsed→TestHandleItems_BoxSetMovieChildrenHonorDetailFieldsinternal/api/handlers: the top, timeseries, and playback admin-stats invalidation tests →TestAdminDownloadsStatsProviderInvalidateClearsEveryVariant; the autoscan events, scans, connection-delete, and source-delete adapter tests →TestAdminAutoscanEvents,TestAdminAutoscanScans,TestAdminAutoscanConnectionDelete,TestAdminAutoscanSourceDeleteininternal/apiv2internal/apiv2:TestNoBuiltInDocsRoutes→TestCommittedArtifactMatchesRouterinternal/metadata:TestRatingSourcesFromStructKeepsDeclaredSources→TestRatingSourcesFromStructinternal/config:TestEffectiveAdminSettingsMarkerDefaultsPreserveExplicitModes→TestEffectiveAdminSettingsUsesRuntimeDefaultsinternal/markers:TestSubmissionErrorTextMasksSecretAtTheStartOfAGRPCDescription→TestSubmissionErrorTextMasksSecretsOutsideHTTPURLsinternal/mail:TestBuildMessageMultipart→TestBuildMessageEmbedsInlineImagesinternal/notifications:TestWebhooksDisabledByDefault→TestWebhookCreateAndTestBlockedWhenDisabledinternal/taskmanager/tasks:TestTaskHistoryCleanupTask→TestTaskHistoryCleanupTaskRejectsUnusableRetentioninternal/policy:TestVendorQualityTableMatchesAccessPackage→TestVendorRegoWeb (
web/src):pages/CollectionEditorPage.syncedEdit"keeps Max titles above 500" →components/collections/fields/OrderBlock.test.tsx"keeps max titles above 500 and clears it when blank"pages/settings/HomeScreenSettings.links, return-path and missing-row cases →pages/AdminHomeRows.links.test.tsx,lib/homeRows/rowLinks.test.tspages/ItemDetail/SeasonCarousel"renders independent season detail and direct-play targets" → "keeps the series page's library on season links but not on Play" in the same filecomponents/SectionItemCard"encodes item links while preserving library context" → the same test incomponents/ItemCard.test.tsxlib/queryInvalidation, the four library-scope cases →hooks/queries/mediaSurfaceRefresh.test.tslib/homeRows/payloads.golden, row copy and picker cases →hooks/queries/homeRows/useAdminHomeRows.test.tsx,lib/homeRows/catalog.test.tshooks/useNavigationDirection, back-then-forward →lib/navigationHistory.test.tshooks/queries/admin/collections, ID dedupe and batching →hooks/queries/sectionsBulkDelete.test.tsxhooks/appearanceCacheOwnership, pre-namespace cache →utils/storage.test.tsValidation
go build ./...,gofmt -l .,go mod tidy -diff,go vet ./...,make lint-changed(full tree), andmake lint-router-recoveryare clean.make test-gopasses except two tests that run real FFmpeg and fail the same way onmainwith the local FFmpeg 6.1.1:TestRunStatsWithRealFFmpegininternal/mediasampleand the seek cases ofTestCopyRemuxSubtitleRenditionRealFFmpegininternal/playback. Neither file is touched.pnpm run lint,format:check,build,budget:check, andmake test-webpass.TestCommittedArtifactMatchesRouter,verify-local-paths,verify-case-collisions,verify-size-ratchet,verify-bidi, andverify-migrationspass.verify-actionlint,verify-shellcheck, andverify-prometheus-rules, because actionlint, ShellCheck, and Docker are not installed on the machine I used. The change touches no workflow, shell script, or Prometheus rule.make test-db-pinswas not run; no test it names was removed or edited.Evidence
Nothing a user sees changes. This branch was checked at commit
1f663060ebby running the gate listed under Validation.Risks
A deleted test that was the only guard on some behavior would let that behavior regress silently. Two independent reviews looked for exactly that and found six such cases, all restored (see AI Disclosure). Removing
Legacyfrom device login changes nothing at runtime, because no caller set it after/api/v1retired.Checklist
AI Disclosure
pdfjs-dist.🤖 Generated with Claude Code
Note
Prune tests that can't catch a regression
Removes test cases, whole tests, and test helpers whose assertions restate the implementation or pass even when behavior breaks. The sweep spans the handler, jellycompat, scanner, config, playback, and web test suites.
finalizeSessionStop,findAlternateFile,planNodeSessionV3,remoteTransformationsPlanningV3,resolveItemUserStates,sizedBackdropPath, andmapSortByin query.go. Tests now call the underlying functions directly.deriveEpisodePairstest coverage from the handler package into the filesplit package, adding cases for duplicate versions, unlinked files, local targets, and movies in filesplit_test.go.DeviceLoginService.Startno longer selects a legacy TTL or browser-code link, andDeviceLoginStartInput.Legacyis removed in device_login.go.deviceLoginTTLand a completion URI built from the normalized user code; the legacy browser-code link path is gone. Web markup tests no longer pin CSS class names, and the PDF.js compatibility test checksgetDocumentexposure instead of a pinned version string.Macroscope summarized 1f66306.