Repository navigation
test: prune duplicate tests and add DB contract CI list - #1869
Conversation
- Delete low-value and duplicate unit tests; fold unique assertions into the surviving tests - Replace real-time sleeps in LLM client retry tests with synctest - Drop the Redis settings-check adapter and call the cache client directly - Add scripts/ci/db-contracts.txt and `make test-db-contracts`, run by `make test-db-pins` - Document in CONTRIBUTING.md how to retire a duplicate test
Codex Review SummaryThis 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. |
|
Important Review skippedToo many files! This PR contains 1061 files, which is 911 over the limit of 150. To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
📒 Files selected for processing (1061)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a6018b7d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| op := paths[Prefix+"/notifications/email/"+tc.path].(map[string]any)[tc.method].(map[string]any) | ||
| if op["operationId"] != tc.id || op["x-silo-raw-protocol"] != "html-callback" || op["requestBody"] != nil { | ||
| t.Fatalf("callback declaration: %v", op) | ||
| } | ||
| if security, ok := op["security"].([]any); ok && len(security) != 0 { |
There was a problem hiding this comment.
Retain the email callback contract test
This test is not duplicated elsewhere: a repo-wide search finds no remaining notification-specific assertion for these three callbacks, while the surviving raw-protocol tests only exercise synthetic routes. Deleting it removes the only guard that the emailed verification/unsubscribe links remain public HTML callbacks with their stable operation IDs; a later registration change could add login security or alter the contract without failing CI, breaking links opened from email. Preserve these assertions in a surviving generated-document test before removing this file.
AGENTS.md reference: AGENTS.md:L245-L250
Useful? React with 👍 / 👎.
- Replace the fork's consumed Silo-Server#1534 breaking-change approvals with upstream's own records for the changes this sync brings in: the device sign-in canceled status (Silo-Server#1799) and invitation links without email delivery (Silo-Server#1788, approved as Silo-Server#1390). The fork's gate compares against the pre-sync fork main, so it still sees them. - Give each fork row in the sample-entry admission table its own expected rejection. Upstream's Silo-Server#1869 now asserts its rows' message; the fork's extra rows are rejected by the fork's more specific checks. - Type the incomplete person in the person page test as a real Person instead of casting a number id and a null birth date. - Drop the two season plugin notice tests from the Silo-Server#700 draft; upstream's final Silo-Server#700 folded the same assertions into the image selection test. - Fix changed-line lint on inherited upstream code: reuse the If-None-Match and header parameter constants, and name the image cache provider and content-type strings and the auto subtitle sync off value.
Resolve conflicts with main's ratings, logo, and play-target changes, drop the three EpisodeContent tests main pruned in #1869, and pass the ratings selection main added to catalogItemOf* in the provenance test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
Related issue: N/A
Validation tasks: none
The Go suite had accumulated tests that asserted the same production behavior as another test, or that exercised test-only seams rather than behavior. They slow the suite and add review noise, and several duplicates were the only place a unique assertion lived. Some of the tests that should have kept those assertions need Postgres, so
make test-goskipped them and CI never ran them. This change retires the duplicates, moves their unique assertions into the surviving tests, and makes sure the surviving database tests run in CI.Approach
Each deleted test had a named keeper that covers the production path. Where the deleted test asserted something the keeper did not (for example the Content-Disposition filename sanitizing, the snake_case marker stats shape, the
verbose_jsonhint on missing segments, and the environment-managed effective settings values), that assertion moved into the keeper before the deletion.Database-backed keepers go in a new list,
scripts/ci/db-contracts.txt.make test-db-contractsruns it with the samedbpinsrunner as the query budgets, so a missing or skipped keeper fails.make test-db-pinsnow runs the budget list and then the contract list, so the existingGo DB pinsCI job covers both.CONTRIBUTING.mdexplains when a test belongs in each list.A few non-test files lose seams that only tests used. The Redis settings check now calls
cache.NewRedisClientForRoledirectly instead of going through an injectable adapter, with the same behavior.Slow retry tests in
internal/ai/llmnow usetesting/synctestwith a fake transport instead of real HTTP servers and wall-clock waits.Validation
Not run when this description was drafted. Before merge, fill in the results of:
go testfor the touched packagesmake test-gomake test-db-pinsagainst a migrated disposable database, to confirm every entry inscripts/ci/db-contracts.txtexists and runsmake lint-changedRisks
Coverage shrinks wherever a duplicate is removed. The risk is a deleted test whose unique assertion was not carried over. Review should check that each retired test still has a keeper. The new CI list adds Postgres-backed tests to the
Go DB pinsjob, which makes that job somewhat longer.Checklist
AI Disclosure
Note
Prune duplicate tests and add DB contract CI list
make test-db-contractstarget;make test-db-pinsnow runs both the query-budget list and the contract list against a disposable migrated database.synctest/deterministic timing replacing wall-clock sleeps in several suites.useSettingsFormdrops its hook-owned before-unload listener;useDeleteAutoscanWebhook,usePluginSettingsDetail,useUpdatePluginSettings,useHomeSections,useLibrarySections,useWatchlist,useCheckPlexPin,useHistory, anduseWatchTonightare removed from their modules;normalizeJellyfinCompatVersionbecomes private;flattenLibraryCollectionsandsetCachedItemDetailare removed;CATALOG_MEDIA_SCOPE_OPTIONSis no longer exported.useSettingsFormno longer blocks tab close for dirty forms (in-app navigation guard remains).Macroscope summarized e1e54f5.