@feigi/fleet-ctl 3.47.0 → 3.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.47.0",
3
+ "version": "3.47.1",
4
4
  "description": "Agent fleet: run-team controller, merge bot, PR reviewer, and the ticket pipeline they share",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -2185,9 +2185,13 @@ while :; do # one tick
2185
2185
  cap_out=
2186
2186
  fi
2187
2187
  # gh pr list is GraphQL, so $rl still holds. The pass is budgeted at 4 core
2188
- # REST units per listed PR on top of the 200 floor — an allowance, not a
2189
- # count: one ci-state.mjs call makes several REST reads (more for a PR whose
2190
- # head dropped required jobs). A shortfall pauses this tick's pass.
2188
+ # REST units per listed PR on top of the 200 floor. The 4 is the measured
2189
+ # ceiling of one ci-state.mjs call on the counter `gh api rate_limit`
2190
+ # reports, for single-page reads: 2 on the common path, 4 for a PR whose
2191
+ # head dropped required jobs.
2192
+ # The workflow and run lookups bill a second core bucket that `rate_limit`
2193
+ # does not report and this gate does not guard. A shortfall pauses this
2194
+ # tick's pass.
2191
2195
  if [ "$rl" -lt $((200 + 4 * count)) ]; then
2192
2196
  if [ -z "$budget_out" ]; then
2193
2197
  echo "WATCHER DEGRADED: core REST budget=$rl < $((200 + 4 * count)) needed for $count PRs — CI polling paused, silence is NOT green"
@@ -2283,12 +2287,21 @@ DEGRADED line names the rest as unwatched until a pass comes back under the cap.
2283
2287
 
2284
2288
  **The budget is gated twice, and only the second gate announces recovery.** The
2285
2289
  tick-top floor (`200`) covers the probes themselves. Once the open-PR list is
2286
- read, the pass gate reserves `200 + 4 × count` core REST units — an allowance of
2287
- 4 per listed PR on top of the floor, so the reserve grows with the list instead
2288
- of staying a flat 200 that a long list drains mid-pass. It is an allowance, not
2289
- a count: one `ci-state.mjs` call makes several REST reads, more for a PR whose
2290
- head dropped required jobs. A shortfall at either gate pauses the **whole** pass
2291
- through the one budget latch and never polls a prefix of the list: a prefix runs
2290
+ read, the pass gate reserves `200 + 4 × count` core REST units — 4 per listed PR
2291
+ on top of the floor, so the reserve grows with the list instead of staying a
2292
+ flat 200 that a long list drains mid-pass. The 4 is the measured ceiling of one
2293
+ `ci-state.mjs` call's cost on the counter `gh api rate_limit` reports (measured
2294
+ 2026-10-13): 2 on the common path, 4 when the head dropped required jobs, for up
2295
+ to 100 jobs and 100 rules — more pages cost more. That counter is not the only
2296
+ core bucket one call bills. The lookups `actions/workflows`,
2297
+ `actions/workflows/<id>`, `actions/workflows/<id>/runs` and `actions/runs/<id>`
2298
+ bill a second one that `rate_limit` does not report and the gate does not
2299
+ guard; the boundary is per route, so `actions/runs/<id>/jobs` is on the gated
2300
+ counter. Every response says `X-Ratelimit-Resource: core`, so only the reset
2301
+ epoch and the used sequence tell the two apart. An exhausted unreported bucket
2302
+ shows up only as per-PR `rate-limited` verdicts, which the blind-PR path
2303
+ already latches. A shortfall at either gate pauses the **whole** pass through
2304
+ the one budget latch and never polls a prefix of the list: a prefix runs
2292
2305
  in list order, so the same tail PRs would go unread every tick with no line at
2293
2306
  all (never polled, so nothing marks them blind), while the PRs that were polled
2294
2307
  would run dry mid-pass and each emit a blind line. The DEGRADED line from the