Skip to content

selfhost(stats): an Orb reports totals.handled = 0 while its ledger holds 2,123 verdicts #9963

Description

@JSONbored

Found by turning on LOOPOVER_PUBLIC_STATS on edge-nl-01 to test #9940's option C. Caught immediately by the public verifier (#9723) and reverted within minutes — the flag is back off and nothing contradictory was left published.

The contradiction

$ npx -p @loopover/mcp loopover-verify --base-url https://shots.loopover.ai
FAIL  Published headline stats agree with the ledger-derived parity rollups
      parity rollups report 2123 verdict(s) over their window, exceeding the all-time handled count of 0

On the same deployment, in the same payload:

  • reviewParity.verdicts = 2123 — read from decision_records, matching the ledger's ~2,200 rows
  • totals.handled = 0

An Orb that has decided 2,123 pull requests reporting zero handled is not a rounding difference; one of the two reads is looking at the wrong place.

Why it matters beyond cosmetics

This is the deployment that actually performs reviews. If self-hosters enable public stats, they publish a headline of 0 next to a parity block describing thousands of verdicts — and accuracyPct derives from the same handled/auto-action population, so it is suspect too. That is worse than publishing nothing, which is why the flag was reverted rather than left on.

Likely cause

totals.handled is built from audit_events (github_app.pr_public_surface_published, agent.action.*) joined to the pull_requests cache and folded with orb_pr_outcomes, while reviewParity reads decision_records directly. On this Orb the primary store is Postgres, not Cloudflare D1 — so the audit/outcome side of the stats query is very likely reading a store that is empty here, while the decision_records side reads the populated one.

If that is right, every totals.*-derived figure (handled, reviewed, merged, closed, accuracyPct, minutesSaved) is wrong in self-host mode, and only the reviewParity block is correct.

Acceptance

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