Repository navigation
fleet(pools): refuse pool-drawn seatings at >=97% monthly, >1pp/h pace, or steward hard-stop (#2732) - #12895
fleet(pools): refuse pool-drawn seatings at >=97% monthly, >1pp/h pace, or steward hard-stop (#2732)#12895dezren39 wants to merge 1 commit into
Conversation
…e, or steward hard-stop (#2732) Slice 1 of #2732: the placement evaluator — the shared seating helper the triage suggested for the dispatcher and lane-shift paths — now enforces the monthly pace guard at seating time. A pool-drawn placement on a fresh quota read is refused (exit non-zero, pool + % + guard source on stderr) when pool_monthly_pct >= 97, pool_pace_pph > 1, or pool_hard_stop is set. Unknown state never refuses (B4 reliance, absent monthly data, non-pool options proceed); E1 exceptions bypass with their own record as the log. Prerequisite repair in the same package: policy version now decodes the v1.1 string form ("1.1") as well as the v1.0 int — all existing placement tests were failing at HEAD after the #2179 amendment.
|
Warning Review limit reachedYou'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 47 minutes. View limit details
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. |
Codex Review Summary: ✅ CompletedThis 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: 84f3cf9074
ℹ️ 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 reason := monthlyGuardRefusal(a); reason != "" { | ||
| return Record{}, fmt.Errorf("monthly-guard refusal: option %q on pool %q refused (%s)", optionID, guardPoolID(p, a, optionID), reason) |
There was a problem hiding this comment.
Exempt recorded E1 exceptions from the monthly guard
For an E1 exception choosing a pool-drawn option with a fresh read at ≥97%, pace >1pp/h, or a hard-stop, exceptionRecord still calls buildRecord, so this unconditional check rejects the exception instead of emitting its record. This contradicts the newly documented E1 bypass in placement/README.md and prevents dispatchers from using the advertised recorded override. Skip the monthly guard when ruleID == "exception", while preserving the existing quota-read checks.
Useful? React with 👍 / 👎.
Slice 1 of #2732 (feature-slice): one acceptance criterion — a seating attempt against a ≥97%-monthly pool is refused and logged.
What changed (pkgs/fleet/placement, the shared seating helper the triage pointed at):
Evidence:
Not in this slice: wiring into the live queue client / OpenChamber dispatcher, the weekly audit sample (still gated on #2024 review per the PoC README).
Refs #2732 — slice 1 of an effort/l; live wiring remains.