Skip to content

feat(fleet-queue): SEL-06 lane fairness policy interface (#9496) - #10677

Merged
dezren39 merged 1 commit into
mainfrom
queue/16091-9496-sel06-fairness
Nov 16, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/16091-9496-sel06-fairness

Conversation

@dezren39

@dezren39 dezren39 commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Implements SEL-06 (#9496, design parent #9204, program #9196): the lane fairness policy interface in pkgs/fleet/crates/fleet-queue/src/work/selection.rs. Gate verified fresh: design PR #9225 is merged; the slice's other named blocker #8097 is closed.

What lands

A pure, persistence-free model module (following the work/ per-slice pattern), with no change to live selection:

  • LaneFairnessPolicy — the interface: given the comparator-ordered eligible candidates and the per-lane service history, return the service order as a permutation of the input. The module documents the contract every policy must keep, straight from design(pm-orchestration): queue selection & bounded exploration (weighted sampling, density correction) #9204's "Fairness is separate": urgent order is exact (fairness never reorders ahead of urgent work), no eligibility bypass (input is Queue/lane design rules: no by-id blocking by default, optional platform selector, triage separate from fixes #8097's already-filtered eligible set — requirements AND claim-time filter; claimer identity is recorded, not a filter), no intrinsic-score change, within-lane order preserved.
  • FairCandidate / FairnessState — the candidate and service-history snapshot types.
  • NoFairness — the null policy representing today's live behaviour (comparator order unchanged), the baseline for comparison.
  • BoundedShareFairness — the model policy: urgent candidates first in exact input order; non-urgent service opportunities allocated round-robin across lanes by fewest recorded services (history + this round), lane id as tie-break — the model-based fairness bound from the slice text.

Tests

Per the family rule, the oracle was listed by exact name first (-- --list: exactly one match), then run:

  • pmo_selection_fairness_preserves_urgent_order — passes: urgent subsequence identical to input, no non-urgent candidate ahead of any urgent one, result is a permutation.
  • Four supporting tests: bounded-share interleaving, service-history respect, within-lane order + empty input, null-policy identity.
  • Full fleet-queue lib suite: 325/325 pass. cargo fmt clean.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 16, 2026 10:24
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2d8d665d-1329-4856-ac4e-d76210c11224
Commits

Reviewing files that changed from the base of the PR and between f05ec2b and 3f9352a.

Files selected for processing: 2

  • pkgs/fleet/crates/fleet-queue/src/work/mod.rs
  • pkgs/fleet/crates/fleet-queue/src/work/selection.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T10:24:06.457167Z
We couldn’t complete this review. Comment @codex review to try again.
3f9352a 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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit 3766d24 into main Nov 16, 2026
1 check passed
@dezren39
dezren39 deleted the queue/16091-9496-sel06-fairness branch November 16, 2026 10:25
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