fix: backlog draining, per-bracket viability and matcher-aware waiter counts#13
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReworks BgAutoQueue’s internal queue bookkeeping to store cached player state, add bracket-relative CFBG-aware waiter counting, revise viability and parity logic, and schedule backlog drains. It also updates config handling, operator messages, and documentation for the new behavior. ChangesBgAutoQueue core logic and docs
Estimated code review effort: 4 (Complex) | ~60 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/BgAutoQueue.cpp`:
- Around line 232-235: Apply the runtime-disable gate consistently in
ResolvePool() and UpdatePendingDrains() so disabled battleground entries are not
retained or scheduled. When
sDisableMgr->IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, ...) is true, skip pushing
the bgTypeId into _pool and ensure the pending-drain path also filters disabled
entries before selection, using the same BgAutoQueue logic and pool-building
flow so reloads cannot keep scheduling disabled BGs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 11ca9199-9a25-47fe-afc0-82624c917f60
📒 Files selected for processing (6)
README.mdconf/mod-bg-auto-queue.conf.distdocs/how-it-works.mdsrc/BgAutoQueue.cppsrc/BgAutoQueue.hsrc/cs_bg_auto_queue.cpp
There was a problem hiding this comment.
Pull request overview
This PR improves the battleground auto-queue module’s reliability and operator visibility by making viability and waiter-counting bracket-accurate (and matcher-aware), and by actively draining large backlogs after a queue pass so multiple instances can open quickly when enough players remain queued.
Changes:
- Added per-candidate-bracket partitioning for viability/parity decisions and updated waiter counting to only include queue buckets the active matcher can actually pop.
- Implemented post-pass backlog draining that periodically re-schedules queue updates while a bracket still has enough uninvited waiters for another instance.
- Expanded operator-facing messages and documentation around AFK skipping, pool resolution/disable handling, CFBG.Enable toggles, and manual re-join behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/cs_bg_auto_queue.cpp | Refines .bgevents run output to better explain skip/drop reasons. |
| src/BgAutoQueue.h | Adds bracket partitioning + pending-drain APIs/state and clarifies behavior in comments. |
| src/BgAutoQueue.cpp | Implements matcher-aware waiter counting, per-bracket viability, deserter-template selection, timer clamping, and backlog draining. |
| README.md | Documents new selection/reinforcement behavior and operational caveats. |
| docs/how-it-works.md | Adds AFK skip explanation and clarifies manual re-join limitations after auto-queue. |
| conf/mod-bg-auto-queue.conf.dist | Documents seeded-queue side effects, pool validation behavior, and AFK skip wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation