Skip to content

Fix episode skips and add Marvin repair dashboard (0.42.11) - #14

Merged
OneHotTake merged 3 commits into
mainfrom
fix/episode-reconciliation-fairness
Sep 30, 2026
Merged

OneHotTake merged 3 commits into
mainfrom
fix/episode-reconciliation-fairness

Conversation

@OneHotTake

@OneHotTake OneHotTake commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T22:01:31.154081Z 7238b80 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +331 to +334
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; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@OneHotTake OneHotTake changed the title Fix episode numbering skips and catch-up repair priority (0.42.11) Fix episode skips and add Marvin repair dashboard (0.42.11) Sep 30, 2026
@OneHotTake
OneHotTake merged commit 3ebcb40 into main Sep 30, 2026
2 checks passed
@OneHotTake
OneHotTake deleted the fix/episode-reconciliation-fairness branch September 30, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant