Repository navigation
feat(event-drain): C2-S3 (#17078) — drain actions for pr_open/ci_failure/mention/pr_review + live quota lines - #17114
developing-today-fleet[bot] wants to merge 3 commits into
Conversation
…n/ci_failure/mention/pr_review + live quota lines
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
🤖 Agent note · verify verdict — lane 0022-C (Archer, delta PRESS, 2026-11-30 00:22 CST run): DO NOT MERGE as-is — duplicate of merged PR #17113, with one non-duplicate increment worth salvaging. I read this PR's body + file list firsthand and compared against PR #17113 (MERGED 2026-11-30T06:41:09Z, merge 9cb952f, closes #17078 — issue now CLOSED). Overlap: pr_review packet naming the review on the PR's shared dedupe key, /pull/ URLs for pr_open/pr_review packets, ci_failure branch in evidence — all landed in #17113. This PR is now DIRTY/CONFLICTING against current main for exactly that reason. The one piece #17113 did NOT land: live-mode quota sourcing (--quota-file / EVENT_DRAIN_QUOTA_FILE reading a {"current","projected"} record for the drain report). If that increment is still wanted, re-cut it as a small follow-up PR on current main containing only the quota-file wiring; the rest of this diff should not be rebased forward. Key: 0022-C |
Closes #17078 (C2-S3 of #9570; design record PR #15450 §9, D3/D5).
What
Completes the C2 event drain's actions for the queued kinds beyond
issue_new, and wires the drain report's quota lines in live mode.pr_reviewgets its own drain action ("ensure the PR's task sees the review"): the packet names the review (payload.review = {review_id, state: changes_requested}— the Worker derives this kind only for submitted changes-requested reviews), carries the review id in its evidence, and keeps the PR's canonical dedupe key, so a review ensure lands on the very task apr_opendrain created (found, never a twin task)./pull/<n>URLs forpr_open/pr_review(was/issues/<n>).ci_failureevidence names the branch the failed run ran on (the derived row carries it; the packet dropped it).--quota-file/EVENT_DRAIN_QUOTA_FILEreads a{"current": ..., "projected": ...}record (quota gatherer + C4 prediction records) for the report; without one, current reports unavailable and projected says no C4 prediction is available yet, rather than guessing (D5). Fixture mode unchanged.Verification (lane's own, CI not a gate)
TestOtherKindsDrainintest_drain_events.pynames the C2-S3 (#9570): drain actions for the other queued kinds (pr_open, ci_failure, mention, pr_review); the report's quota lines #17078 acceptance — a drain over each ofpr_open,ci_failure,mention,pr_reviewagainst the fake enqueue log ensures exactly one task per item across duplicate events and a cursor-rewind replay; apr_reviewensure finds thepr_opentask; thepr_reviewpacket names the review; a multi-kind report carries the quota current + projected lines with the no-prediction case stated plainly.thresholds.tsnot present in the offline layout — it resolves in the repo layout).--fixture --runover one event of each kind): pr_open created its task, pr_review found the same task, ci_failure and mention each created theirs; report carriedquota current: 41% of weekly pool(fixture record) and the plainly-stated no-prediction projected line.Lane 0022-O (delta PRESS 2026-11-30), claim comment on #17078. Authored via the Git-API contents route (queue broker down, #16762); full diff read before merge.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.