Repository navigation
Fix stale request reconciliation and document capacity policy - #8
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: 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".
| 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; |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Scope notes
keepAndUnmonitortodisabledwas made with a rollback snapshot; that external configuration change is not part of this PR.Validation
git diff origin/main...HEAD --checknode --check server.jsnode --check public/app.jsnpm test— 83 passing