Skip to content

feat: add global library search and safe release upgrades (#12) - #36

Open
mahoshojoHCG wants to merge 21 commits into
mainfrom
codex/issue-12
Open

feat: add global library search and safe release upgrades (#12)#36
mahoshojoHCG wants to merge 21 commits into
mainfrom
codex/issue-12

Conversation

@mahoshojoHCG

@mahoshojoHCG mahoshojoHCG commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add indexed global library search, missing-episode visibility, and bounded release path summaries
  • add policy-driven release upgrades with attempt-scoped submission/cancellation leases, atomic mapping and filesystem identity swaps, playback-state migration, rollback, and durable recovery
  • keep inactive alternatives in staging so unvalidated files never enter the live virtual filesystem; activation consumes staging atomically
  • preserve established canonical owners during legacy migration and bind mutable pagination to monotonic catalog revisions
  • harden multi-instance candidate claiming, namespace conflicts, duplicate torrent discovery, remote submission ambiguity, incident retry routing, and rollback reconciliation
  • treat legacy rows without score provenance as manual-only incumbents so their placeholder zero can never trigger an automatic downgrade

Boundaries

  • Existing unscored releases remain available for an explicit manual replacement; only automatic comparison is disabled.
  • No tests, test-only scripts, workflow assertions, or other regression checks are added by this PR.

Closes #12

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 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-08-31T12:28:54.994783Z eea53b1 Manual request
ℹ️ 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: b2c685c5d6

ℹ️ 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 thread SecondDimensionWatcherReDive/Repositories/ReleaseUpgradeRepository.cs Outdated
Comment thread SecondDimensionWatcherReDive/Repositories/ReleaseUpgradeRepository.cs Outdated
Comment thread SecondDimensionWatcherReDive/Repositories/ReleaseUpgradeRepository.cs Outdated
# Conflicts:
#	SecondDimensionWatcherReDive.Client/src/components/AppHeader.tsx
#	SecondDimensionWatcherReDive.Client/src/i18n/locales/en/common.json
#	SecondDimensionWatcherReDive.Client/src/i18n/locales/ja/common.json
#	SecondDimensionWatcherReDive.Client/src/i18n/locales/zh-CN/common.json
#	SecondDimensionWatcherReDive/Controllers/External/AppJsonSerializerContext.cs
#	SecondDimensionWatcherReDive/Models/ApplicationContext.cs
#	SecondDimensionWatcherReDive/Program.cs
#	SecondDimensionWatcherReDive/Repositories/AnimationInfoRepository.cs
#	SecondDimensionWatcherReDive/Repositories/MetadataReviewRepository.cs
#	SecondDimensionWatcherReDive/Services/SyncFeed.cs
@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 330b8c29c9

ℹ️ 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 thread SecondDimensionWatcherReDive/Repositories/FileMappingRepository.cs
Comment thread SecondDimensionWatcherReDive/Repositories/ReleaseUpgradeRepository.cs Outdated
Comment thread SecondDimensionWatcherReDive/Repositories/LibrarySearchRepository.cs Outdated
@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 81903d5444

ℹ️ 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".

@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 95b6506bb2

ℹ️ 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".

@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 52fbe5e3bf

ℹ️ 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".

@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 07d669e75b

ℹ️ 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 thread SecondDimensionWatcherReDive/Repositories/ReleaseUpgradeRepository.cs Outdated
Comment thread SecondDimensionWatcherReDive/Repositories/AnimationInfoRepository.cs Outdated
@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: ab6432b7d7

ℹ️ 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 thread SecondDimensionWatcherReDive/Utils/ReleaseUpgrades/ReleaseUpgradeCoordinator.cs Outdated
Comment thread SecondDimensionWatcherReDive.Client/src/pages/SearchPage.tsx
@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 87cc75f68d

ℹ️ 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 thread SecondDimensionWatcherReDive.Test/AnimationInfoControllerTests.cs Outdated
@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: e3a60fb235

ℹ️ 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 thread SecondDimensionWatcherReDive/Utils/Incidents/IncidentRetryService.cs Outdated
@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: b282862af4

ℹ️ 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".

@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 337763cadd

ℹ️ 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".

@mahoshojoHCG

Copy link
Copy Markdown
Contributor Author

@codex review

@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: eea53b1ce2

ℹ️ 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 +38 to +44
let automatic = current.ReleaseScoreReasonsJson != null &&
candidate.SourceFeedId != null &&
context.SubscriptionAutomationPolicies.Any(policy =>
policy.FeedId == candidate.SourceFeedId &&
policy.EnableVersionUpgrade &&
candidate.ReleaseScore - current.ReleaseScore >=
policy.MinimumUpgradeScore)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Recompute upgrade scores under one policy

When automatic upgrades are enabled, these stored scores are not comparable because each release is scored once using the policy that existed at its own ingestion time. For example, after adding a subtitle group to a policy, a new release identical to the incumbent can receive an extra 50 points while the incumbent retains its old score, satisfying MinimumUpgradeScore and triggering an unnecessary automatic replacement; releases from different feeds have the same problem. Rescore both releases using one current policy before evaluating the upgrade.

Useful? React with 👍 / 👎.

Comment on lines +94 to +101
if (result.Season is { } inferredSeason)
{
var expectedEpisodeCount = await tmdbTool.GetExpectedEpisodeCountAsync(
tmdbIdInt,
inferredSeason,
cancellationToken);
if (expectedEpisodeCount is not null)
item = item with { ExpectedEpisodeCount = expectedEpisodeCount };

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 stale expected counts when inference changes season

When inference is retried and identifies a different show or season, item still carries the previous ExpectedEpisodeCount, and this branch replaces it only when the new TMDB lookup returns a non-null count. A transient lookup failure, an absent season, or a newly null season therefore leaves the old count attached to the new metadata; BuildIntegrity then takes the maximum persisted count and reports nonexistent episodes as missing. Clear the count before inference and assign the lookup result even when it is null.

Useful? React with 👍 / 👎.

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.

[P1] 实现全局搜索、缺集检测与版本升级策略

1 participant