Repository navigation
Fix episode skips and add Marvin repair dashboard (0.42.11) - #14
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7238b80936
ℹ️ 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".
| episode.LastSuccess = now; | ||
| // Native indexing establishes observation success, not | ||
| // success of a later source refresh. Preserve its failure. | ||
| if (episode.LeaseUntil <= now) { episode.Lease = null; episode.LeaseUntil = null; } |
There was a problem hiding this comment.
Clear resolved missing-file failure diagnostics
When a non-upgrade repair previously failed and its file is later restored and indexed outside this resolver, this branch now preserves Failure even though the missing-file condition has been resolved. Because the state does not record whether the failure came from an existing-file refresh or a missing-file fill, the API can continue reporting source_unavailable, transport_failure, or publication_failed for a healthy indexed episode. Preserve the diagnostic only for failed upgrades, or persist the failure's provenance.
Useful? React with 👍 / 👎.
| try { await _db.PersistMetadataAsync("import_last_run", System.Text.Json.JsonSerializer.Serialize(new | ||
| { Id = runId, Status = status, FinishedAt = _clock(), Scanned = scanned, Attempts = attempts, Metadata = metadata, Published = published, | ||
| Upgrades = upgrades, ElapsedSeconds = elapsed.Elapsed.TotalSeconds, | ||
| Upgrades = upgrades, Refreshed = refreshed, SourceFailures = sourceFailures, |
There was a problem hiding this comment.
Show successful refreshes instead of all publications
A missing-file fill increments published but not refreshed, so these new counters correctly distinguish the operations; however, the inspected Marvin status page at UI/Settings/SyncAndMarvinTabView.cs:128-129 still reads Published and labels it “items refreshed,” never consuming Refreshed. Consequently, a gap-only pass with zero version upgrades is still presented to administrators as successful refreshes; wire the new field into the summary, with a fallback for older reports if needed.
Useful? React with 👍 / 👎.
A missing or duplicate provider episode currently blocks every episode in a series. Check aired numbering per key so confirmed siblings can publish while unmatched, duplicate and unverified keys remain excluded. Recheck the old derived whole-series gate once without resetting identity exclusions or stream backoff.
Catch-up alternates first priority between missing-file fills and existing-file refreshes across native slices; the other lane can borrow unused credits. Deferred calls recheck generation, authorization, leases and retry timing under the mutation lock. Keep failed refresh diagnostics when an old file indexes, and report successful refreshes separately from attempts and source/transport failures.
The Marvin page now separates the active worker phase from repair-pass results, with compact native rows, a rolling allowance and next-credit time, source outcomes, actual publications, stage timings and recent reports. Live counters stay in memory; completed reports persist for seven days in an additive table. Refreshing the dashboard only reads status. Matched sources, written episode groups and successful playback remain distinct.
Validation: 219/219 tests passed against pinned Emby 4.10.0.40 and real SQLite; repository checks passed. Frozen native beta verified partial numbering, sibling publication/indexing, restart persistence and subsequent recovery without a DB reset. Synthetic targets do not prove playback. The production DLL excludes the QA harness.
Release 0.42.11. The 40,000 rolling attempt ceiling, provider policy, cadence, catch-up window and retention/owned-media safeguards remain unchanged. Roll back the reviewed prior DLL while preserving newer database and user state; retain additive coverage fields.