Skip to content

ci: dead-exports:check is red on a clean main — AUTOMATION_COUNTED_ACTIONS has no consumer #10109

Description

@JSONbored

dead-exports:check fails on a clean main

npm run dead-exports:check — which test:ci runs — is red on main with nothing checked out on top of it:

check-dead-exports found 1 exported symbol(s) with no reference outside their own file:
  src/review/automation-rate.ts: AUTOMATION_COUNTED_ACTIONS (no uses at all — delete it, or wire up the consumer it was written for)

Every open PR inherits this failure, so no PR can go green until it is fixed. Same class of breakage as #9944.

Root cause

AUTOMATION_COUNTED_ACTIONS was written for exactly one consumer: the action IN (...) restriction in queryAutomationRows. #10013 removed that filter deliberately — the read now selects every verdict in the window, because a human signal (reevaluation_actor, reevaluation_reason = 'maintainer_request') can ride a non-deciding verdict such as a label or an update_branch, and the old filter dropped those rows so a PR a human actually touched read as automated.

buildAutomationRateSeries still classifies enacted / held, but it tests AUTOMATION_ENACTING_ACTIONS and AUTOMATION_HOLD_ACTION separately — it needs to know which half matched, so a union of the two is of no use to it. The constant has had no reference of any kind since that change; #10089 touched the file without re-homing it.

Fix

Delete the export. Its documentation value — "these two sets together are what DECIDES a PR" — moves onto AUTOMATION_HOLD_ACTION, along with the reason there is deliberately no exported union: a constant naming a set that nothing selects on invites a reader to believe the read still restricts by it, which is the precise misreading #10013 existed to correct.

No behaviour change; test/unit/automation-rate.test.ts (25 tests) passes untouched, which is itself the evidence the symbol was load-bearing for nothing.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions