Skip to content

feat(event-drain): C2-S3 (#17078) — drain actions for pr_open/ci_failure/mention/pr_review + live quota lines - #17114

Closed
developing-today-fleet[bot] wants to merge 3 commits into
mainfrom
lane/0022-o-c2s3-17078
Closed

developing-today-fleet[bot] wants to merge 3 commits into
mainfrom
lane/0022-o-c2s3-17078

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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_review gets 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 a pr_open drain created (found, never a twin task).
  • PR packets link the PR properly: /pull/<n> URLs for pr_open/pr_review (was /issues/<n>).
  • ci_failure evidence names the branch the failed run ran on (the derived row carries it; the packet dropped it).
  • Quota lines sourced in live mode: --quota-file / EVENT_DRAIN_QUOTA_FILE reads 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.
  • README + module docstrings updated for the slice.

Verification (lane's own, CI not a gate)

  • Oracles: new TestOtherKindsDrain in test_drain_events.py names 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 of pr_open, ci_failure, mention, pr_review against the fake enqueue log ensures exactly one task per item across duplicate events and a cursor-rewind replay; a pr_review ensure finds the pr_open task; the pr_review packet names the review; a multi-kind report carries the quota current + projected lines with the no-prediction case stated plainly.
  • Full suite on the branch head's files, byte-identical to the tested copies: 14 tests, OK (1 skip: thresholds drift guard, thresholds.ts not present in the offline layout — it resolves in the repo layout).
  • Fixture CLI smoke (--fixture --run over one event of each kind): pr_open created its task, pr_review found the same task, ci_failure and mention each created theirs; report carried quota 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-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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: 0165342b-2414-4c05-855c-2e8193cc59c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@dezren39

Copy link
Copy Markdown
Member

🤖 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

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.

C2-S3 (#9570): drain actions for the other queued kinds (pr_open, ci_failure, mention, pr_review); the report's quota lines

1 participant