Skip to content

Add safe preview, marker protection and bounded scans - #23

Merged
Pasithea0 merged 4 commits into
TheIntroDB:mainfrom
Serph91P:feature/safe-bounded-scans
Aug 16, 2026
Merged

Add safe preview, marker protection and bounded scans#23
Pasithea0 merged 4 commits into
TheIntroDB:mainfrom
Serph91P:feature/safe-bounded-scans

Conversation

@Serph91P

@Serph91P Serph91P commented Aug 15, 2026

Copy link
Copy Markdown

Summary

  • add a metadata-only TheIntroDB preview task
  • use the same repository read implementation and library filtering for Preview and Apply
  • open Preview SQLite through a fresh immutable read-only session without schema initialization or sidecar writes
  • checkpoint legacy WAL state and use DELETE journaling before immutable Preview reads
  • suppress Preview configuration migration and anonymous usage reporting
  • protect complete and partial existing intro and credits markers by default
  • add opt-in ReplaceExistingMarkers with durable per-chapter ownership tokens
  • remove at most one exact host chapter for each matching ownership ledger entry
  • never adopt or remove legacy, native, manual or foreign chapters based only on name or timestamp
  • preserve unrelated and duplicate Emby chapters
  • add an exact per-scan lookup budget and stop immediately after the first HTTP 429
  • keep on-demand fetch, preview segments, replacement and anonymous reporting disabled by default

Preview writes operational logs for observability. It does not write plugin configuration, segment or ownership data, Emby chapters, or anonymous analytics.

Verification

  • clean Release build: 0 errors, 0 warnings
  • tests: 20 passed
  • vulnerable package audit: no findings
  • Gitleaks 8.30.1: no leaks
  • git diff --check: clean
  • no typographic en dash or em dash characters in changed C#, JavaScript or HTML files

Closes #22

Upbeat7898 added 2 commits August 15, 2026 19:19
Finish the remaining acceptance criteria from TheIntroDB#22 with durable per-chapter ownership tokens and identical read paths for Preview and Apply. Keep Preview immutable apart from operational logs and preserve unmatched host chapters.
Do not treat legacy Recap or Preview labels as owned repair state. Require a matching persisted ownership token while preserving all unmatched host chapters.
@Pasithea0

Copy link
Copy Markdown
Member

Reviewed 677e0a8 — both remaining points are resolved: Preview/Apply now share the same repository reads, and ReplaceExistingMarkers is opt-in and only ever removes durably owned chapters. Tests cover the ownership and read-only paths well. Resolves #22

@Pasithea0
Pasithea0 merged commit d2f86e3 into TheIntroDB:main Aug 16, 2026
@Serph91P

Copy link
Copy Markdown
Author

Thanks for merging this. Could you please publish a new plugin release containing merge commit d2f86e3 when convenient? The latest available release is still v1.0.7.3, so a new signed-off release artifact is needed before the updated Preview and Apply workflow can be rolled out.

@Pasithea0

Copy link
Copy Markdown
Member

Thanks for merging this. Could you please publish a new plugin release containing merge commit d2f86e3 when convenient? The latest available release is still v1.0.7.3, so a new signed-off release artifact is needed before the updated Preview and Apply workflow can be rolled out.

Yup, just crossing some other issues off in #25. https://github.com/TheIntroDB/emby-plugin/releases/tag/v1.0.8.0 is now available through GitHub and the Emby marketplace.

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.

Add safe preview, existing-marker protection and bounded scans

2 participants