fix(review): count manual work carried on non-deciding verdicts in the automation rate - #10089
Conversation
…e automation rate queryAutomationRows restricted rows by action IN (merge, close, hold), so a human signal recorded on a non-deciding verdict -- a reevaluation_actor or a reevaluation_reason of maintainer_request riding a label or update_branch row -- never reached buildAutomationRateSeries. The PR's only surviving row was its clean merge, so a pull request a person actually touched was published as automated, inflating the rate. Select every decision_records row in the window and let the fold classify: it already ORs verdictShowsHumanAction across a PR's rows, so seeing the human-signal row is all it needs. The published decided/automated/manual definitions are unchanged -- only which verdicts the fold gets to see. Closes JSONbored#10013
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 06:53:14 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10089 +/- ##
==========================================
+ Coverage 79.57% 79.59% +0.01%
==========================================
Files 282 283 +1
Lines 58664 58721 +57
Branches 6842 6859 +17
==========================================
+ Hits 46682 46739 +57
Misses 11694 11694
Partials 288 288
Flags with carried forward coverage won't be shown. Click here to find out more.
|
What & why
The published automation-rate series answers "how much of this is decided with no human in the path?" from the
decision_recordsledger. Its read,queryAutomationRows, restricted rows to the deciding actions:But a human signal —
reevaluation_actor, orreevaluation_reason = 'maintainer_request'(#9742) — can ride a non-deciding verdict: a re-labelled PR, or a maintainer-triggered re-run recorded as alabel/update_branchrow. Thataction IN (...)filter dropped exactly those rows beforebuildAutomationRateSeriesever saw them. A PR's only surviving row was then its cleanmerge, so a pull request a person actually touched was published as automated — inflating the very rate the series exists to report honestly.The fix
Select every
decision_recordsrow in the window and let the fold classify:buildAutomationRateSeriesalready ORsverdictShowsHumanActionacross a PR's rows, so once the human-signal row reaches it, the PR folds tomanualcorrectly. The published definitions are unchanged —decidedstill requires an enacted-or-held verdict,automatedstill requiresenacted && !human, the week is still the PR's first verdict, andverdictShowsHumanActionkeeps its three conditions. Only which verdicts the fold gets to see changes.AUTOMATION_COUNTED_ACTIONSstays the published deciding-set the fold keysdecidedon; it just no longer gates the read.Tests (
test/unit/automation-rate.test.ts)mergeverdict is clean but whose non-decidinglabelverdict carriesreevaluationActornow folds tomanual(automated: 0,manual: 1) — and the same for amaintainer_requestreason riding anupdate_branchrow. Onmainthe query never delivered those rows, so the PR read as automated.action IN (and must bind exactly one placeholder (thecreated_at >= ?window bound) — fails onmain, which still emits the action list.Validation
npm run typecheckclean for these files (the only local errors are a pre-existing missing-release-please-dep phantom in unrelated release tooling, present on baremain).npm run engine-parity:drift-checkpasses;npm run ui:openapi:checkclean (the response shape is unchanged — only which rows the internal query selects).src/review/automation-rate.tsis 100% line and branch.git diff --checkclean; single-file source change + its test.Closes #10013