|
44 | 44 | EXACT_REVIEW_BATCH_DISPATCH_ID: ${{ inputs.dispatch_id }} |
45 | 45 | EXACT_REVIEW_BATCH_DISPATCHED_AT: ${{ inputs.dispatched_at }} |
46 | 46 | EXACT_REVIEW_BATCH_MANIFEST: .artifacts/exact-review-batch/manifest.json |
| 47 | + CLAWSWEEPER_GITHUB_RATE_LIMIT_OBSERVATION_PATH: .artifacts/exact-review-batch/github-rate-limits.jsonl |
| 48 | + CLAWSWEEPER_GITHUB_REQUEST_METRICS_PATH: .artifacts/exact-review-batch/github-request-metrics.jsonl |
47 | 49 | # Scan the full queue window so owner filtering can still fill the 32-item lease cap. |
48 | 50 | EXACT_REVIEW_BATCH_MAX_ITEMS: "50" |
49 | 51 | EXACT_REVIEW_BATCH_PREPARE_CONCURRENCY: "1" |
@@ -204,9 +206,11 @@ jobs: |
204 | 206 | target_branch="$(jq -r '.decision.targetBranch' <<<"$item")" |
205 | 207 | item_number="$(jq -r '.decision.itemNumber' <<<"$item")" |
206 | 208 | source_action="$(jq -r '.decision.publication.producerDecision.sourceAction' <<<"$item")" |
| 209 | + repeat_revision="$(jq -r '.repeatRevision == true' <<<"$item")" |
207 | 210 | fence_key="$(jq -r '.itemKey' <<<"$item")" |
208 | 211 | revision="$(jq -r '.revision' <<<"$item")" |
209 | 212 | export TARGET_REPO="$target_repo" ITEM_NUMBER="$item_number" FENCE_KEY="$fence_key" REVISION="$revision" |
| 213 | + export EXACT_REVIEW_GITHUB_REQUEST_REPEAT="$repeat_revision" |
210 | 214 | lifecycle_terminal="" |
211 | 215 | lifecycle_router_outcome="" |
212 | 216 | lifecycle_deferred_coverage="false" |
@@ -262,12 +266,21 @@ jobs: |
262 | 266 | -f lookback_minutes="$CLAWSWEEPER_COMMENT_LOOKBACK_MINUTES" \ |
263 | 267 | -f max_comments="$CLAWSWEEPER_COMMENT_MAX_COMMENTS" \ |
264 | 268 | 2>"$github_apply_error"; then |
| 269 | + EXACT_REVIEW_GITHUB_RATE_LIMIT_SCOPE=repository_actions \ |
| 270 | + EXACT_REVIEW_GITHUB_REQUEST_OUTCOME=success \ |
| 271 | + pnpm run --silent repair:exact-review-batch request-metric |
265 | 272 | rm -f "$github_apply_error" |
266 | 273 | else |
267 | 274 | github_apply_status=$? |
268 | | - if grep -Eqi 'rate limit|HTTP 429' "$github_apply_error"; then |
| 275 | + if grep -Eqi 'rate limit|abuse detection|was submitted too quickly|HTTP 429' "$github_apply_error"; then |
| 276 | + EXACT_REVIEW_GITHUB_RATE_LIMIT_SCOPE=repository_actions \ |
| 277 | + pnpm run --silent repair:exact-review-batch rate-limit || true |
269 | 278 | EXACT_REVIEW_BATCH_OBSERVATION=github_throttle \ |
270 | 279 | pnpm run --silent repair:exact-review-batch observe || true |
| 280 | + else |
| 281 | + EXACT_REVIEW_GITHUB_RATE_LIMIT_SCOPE=repository_actions \ |
| 282 | + EXACT_REVIEW_GITHUB_REQUEST_OUTCOME=error \ |
| 283 | + pnpm run --silent repair:exact-review-batch request-metric || true |
271 | 284 | fi |
272 | 285 | cat "$github_apply_error" >&2 |
273 | 286 | rm -f "$github_apply_error" |
|
0 commit comments