Repository navigation
Conversation
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:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
The change is visible in the web admin: the marker-task card and task-history screen render submitted/skipped counts that this change alters. The run-count text is not before-and-after screen evidence and does not identify the capture builds or commits. Suggested fix: attach before-and-after captures of these results using the same test data, with desktop and phone-width captures where visible, and identify the surface and build/commit for each. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
The Share detected markers task picked candidates with the lowest minimum confidence across providers and a fixed TMDB, TVDB, IMDb claim key, and dropped a file only once every provider held a claim. A provider that declined a file without claiming it (a series missing an external ID the provider requires, or a marker below that provider's own minimum) left the file a candidate, so every run resolved and skipped it again. The candidate query now checks each provider on its own: the marker must meet its minimum confidence, the series must carry every ID it requires, and its claim is looked up under the key it submits with. A file every provider declines is no longer selected, and it becomes eligible again when the series gains the ID, the confidence rises, or the settings change. The provider list comes from the contribution service, so only registered submitters with automatic sharing on are considered. Closes Silo-Server#2468
1c2ab7f to
83ddbf4
Compare
|
Maintainer review of Rebase. The branch conflicted with main, so I rebased it onto current main and force-pushed with a lease on
Findings. No defects found. Two known limits remain for the maintainers:
Verification
Validated features. No passed case is affected. #1148 C2 (automatic sharing to TheIntroDB) is reached but not yet run, as the description says. User manual. Not affected: siloserver.org doesn't describe how this task selects files. Apple/Android. Server-only change: no API, client or jellycompat surface. Fit: 9/10 · Readiness: 9/10 — ready (assuming CI is green) Fit: a bounded fix to a server task's selection query. It derives eligibility from current data instead of storing declined rows, so a file becomes eligible again on its own when a series gains an ID or a marker's confidence rises. Readiness: the fix is shown by a test that fails on main. The remaining limits are pre-existing or disclosed, and they affect no plugin published today. Review by Claude Code (claude-opus-5-5) with a gpt-6.1-sol cross-check. |
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:
|
contribute.go: this branch imports regexp and main (Silo-Server#3000) imports math; keep both. Main (Silo-Server#1785, Silo-Server#2689) dropped the task's config argument: the providers that contribute automatically now come from the runner's AutoContributors. This branch's three tests set up a provider through the removed fakeAutoConfig; they now set the fake runner's auto contributors instead and call the three-argument constructor. What they check is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Problem
Closes #2468
Related issue: N/A
Validation tasks: reaches #1148 C2 (automatic sharing to TheIntroDB; case not run yet)
The Share detected markers task picked the same episode files on every run when a provider could never accept them. A provider declines a file without recording a claim when the series lacks an external ID the provider requires (TheIntroDB before v0.2.0 requires a TMDB ID), or when the marker's confidence is below that provider's own minimum. The candidate query didn't know about either rule: it filtered on the lowest minimum across providers, built the claim key TMDB first, and dropped a file only once every provider held a claim. So each run resolved the file's IDs again, skipped it, and added it to the task's skipped count. This affects servers with automatic sharing on, mostly libraries with TVDB-only series or several sharing providers with different minimums.
This change makes the candidate query check each provider on its own, so a file every provider declines is not selected. It becomes eligible again when the reason changes, for example when the series gains a TMDB ID or the intro is re-detected with higher confidence.
Approach
CandidateLocalMarkerFilesnow takes each provider's minimum confidence and required external IDs. A file is a candidate while at least one provider would submit it: the marker meets that provider's minimum, the series has every ID it requires, and the provider holds no claim under the key it submits with. That key is the same onecontributionTargetKeybuilds in Go (first required ID, else TMDB, TVDB, IMDb). Series with no external ID are excluded, matching the existingHasAnyIDcheck.The task now gets its providers from
ContributionService.AutoContributors()instead of reading the config store and askingAcceptsContributionsper provider. It lists the registered submitters with automatic sharing on, so fetch-only and unloaded providers stay excluded, as #1785 made them on main, andAcceptsContributionsis removed.The query reads current data instead of storing a "declined" row, so there is nothing to invalidate when the inputs change. Server-only change: no API, client, or jellycompat surface is affected.
docs/markers-api.mdstates the selection rule.Validation
mainit fails because the second run selects both declined files again. With this change it passes, and it also covers the files becoming eligible again. It is listed inscripts/ci/db-contracts.txtwith a new store test for the per-provider rules.go test ./internal/markers/... ./internal/taskmanager/...against Postgres: pass.make test-db-contracts: all 275 pass.make lint-changed: 0 issues.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2689/
The page shows the Share detected markers row of the web admin marker tasks card (Admin > Settings > Playback) and the task's execution history, at desktop and phone width, after two runs on the same seed data. Before is built from
365e3d436, after from1c2ab7f4d. Run counts from the end-to-end run, including the runs after the series gains a TMDB ID:Risks
Claims written before the
target_keymigration use TMDB-first keys. A provider that keys submissions by TVDB or IMDb would not see those legacy claims and could submit once more after upgrade. No current marker plugin keys that way: TheIntroDB v0.1.x keys by TMDB and v0.2.0 declares no required IDs.Checklist
AI Disclosure
Note
Apply per-provider rules in marker file candidate selection
ContributionService.AutoContributors, which lists enabled automatic providers with their settings, and the task gets this list from the runner instead of a separate configuration readerCandidateLocalMarkerFilesso a file is selected when at least one provider would submit it. A file declined by every provider is not returned again until a confidence, identifier, or claim condition changesContributionCandidateSourceandContributionRunnerinterfaces changed shape; any out-of-tree implementations must be updated. The old single-provider acceptance method and the shared threshold/provider-name arguments were removedMacroscope summarized 83ddbf4.