Skip to content

gate-verdict-poller.js (#4273) has zero production callers and no real target endpoint #5450

Description

@JSONbored

Problem: packages/gittensory-miner/lib/gate-verdict-poller.js (#4273, built under Wave 2) has zero production callers anywhere in the package (confirmed via grep across lib/ and bin/), and — per its own header comment (added during #5394's investigation) — the endpoint it was built to poll doesn't have a real match today: the only real route serving a contributor their own open-PR state is GET /v1/contributors/:login/open-pr-monitor (src/api/routes.ts, backed by buildContributorOpenPrMonitor), but its response shape is a LIST of { repoFullName, number, classification: OpenPrWorkClassification, ... } packets across every open PR for a login, not the single decided { disposition | gateDisposition | verdict } field this module's own readGateDisposition expects for ONE targeted PR.

loop-cli.js's real CI/gate-status observation (#5394, shipped in #5429) uses ci-poller.js's real GitHub check-run polling instead as the documented fallback — a real, working signal, but a heuristic (check-run conclusion), not the authoritative server-side gate_decision state this module was designed to read.

Area: Miner / Governor

Proposal: Pick one, similar to the #5395 pattern (this needs a maintainer decision, not a contributor guess):

  1. Build a new single-PR gate-decision API route that returns this module's expected { disposition | gateDisposition | verdict } shape for one targeted PR, then wire pollGateVerdict into loop-cli.js alongside (or in place of) the ci-poller.js fallback.
  2. Rewrite readGateDisposition/mapGateDisposition to work against open-pr-monitor's real classification: OpenPrWorkClassification vocabulary instead, then wire it in.
  3. Remove the module as dead code if the ci-poller.js heuristic is judged good enough long-term.

Boundaries: Whichever direction, this needs real tests exercising the actual chosen response shape -- not the currently-untested-in-production { disposition } assumption.

Found via a maintainer audit auditing Wave 1-3.5 completion against Wave 4's actual issue list (2026-07-12).

Metadata

Metadata

Assignees

Labels

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

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions