Skip to content

Fix stale request reconciliation and document capacity policy - #8

Merged
ksudo-dev merged 5 commits into
mainfrom
fix/request-reconciliation-capacity-policy
Oct 16, 2026
Merged

ksudo-dev merged 5 commits into
mainfrom
fix/request-reconciliation-capacity-policy

Conversation

@ksudo-dev

Copy link
Copy Markdown
Owner

Summary

  • Revalidate accepted Provisionarr request records against the live Sonarr/Radarr library before duplicate suppression.
  • Make storage-held messages explicitly state that no Sonarr/Radarr request was sent.
  • Add regression coverage for stale accepted records and storage-held requests.
  • Document the capacity workflow, verified destination/Emby path matrix, rolling-cache policy, and non-destructive retirement requirements.

Scope notes

  • The capacity workflow documentation is design-only; it does not move media, change services, or automate deletion.
  • A separate live Radarr listSyncLevel change from keepAndUnmonitor to disabled was made with a rollback snapshot; that external configuration change is not part of this PR.
  • PR Fix public-safety scan after Code of Conduct update #7's public-safety cleanup is intentionally separate.

Validation

  • git diff origin/main...HEAD --check
  • node --check server.js
  • node --check public/app.js
  • npm test — 83 passing

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-10-16T02:53:31.718071Z c4ac5f2 PR opened
🔒 Security Review ✅ Completed 2026-10-16T02:56:19.136883Z c4ac5f2 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: c4ac5f23ad

ℹ️ 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 server.js Outdated
if(response.status<200||response.status>=300||!Array.isArray(response.data))return pending||accepted[0];
const library=response.data;
const live=accepted.find(record=>library.some(row=>String(row.id)===String(record.arrId)||titleKey(canonicalTitle(row.title))===titleKey(canonicalTitle(record.title))));
return pending||live||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 Retire stale records during reconciliation

When the ARR library proves that none of the accepted candidates still exists, returning null leaves those records stored with status accepted. requestPolicyFor() calls requestHistory() before this function, and missing library entries retain that accepted status, so a user whose stale records reach userActiveRequestLimit is held for approval and can never reach this reconciliation; below the limit, a successful retry leaves both the stale and replacement records counted as active. Mark or replace the disproven records as stale when reconciling them so they no longer consume the request allotment.

Useful? React with 👍 / 👎.

@ksudo-dev
ksudo-dev merged commit c76b589 into main Oct 16, 2026
7 checks passed
@ksudo-dev
ksudo-dev deleted the fix/request-reconciliation-capacity-policy branch October 16, 2026 06:00
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