Skip to content

orb(public-stats): fleetAccuracy has no minimum instanceCount — at N=1 it publishes one operator's self-report as a fleet aggregate, and the anti-gaming detector it cites cannot fire #9168

Description

@JSONbored

Problem

fleetAccuracy has a per-instance volume floor but no minimum instance count. With one registered
instance it publishes a single operator's own decision volume under fleet framing — and that operator is
the same party whose guarantee the number substantiates.

computeFleetAnalytics (src/orb/analytics.ts:258) filters:

const eligible = instances.filter((i) => i.decided >= MIN_DECIDED && registered.has(i.instanceId));

MIN_DECIDED bounds each instance's volume. Nothing bounds eligible.length. instanceCount is then
eligible.length (:313), and pooled is a plain sum over eligible (:299-306), so at N=1 the pooled
counts are that one instance's counts. The code says so itself
(src/review/public-stats.ts:471-472):

with one registered instance — the fleet today — pooled and median views coincide exactly.

Live state (not hypothetical)

GET https://api.loopover.ai/v1/public/stats returns 200 today — the flag is on in production:

"fleetAccuracy": {
  "accuracyPct": 94.6, "accuracyCiPct": {"lo": 93.9, "hi": 95.2},
  "mergePrecisionPct": 93.6, "closePrecisionPct": 96.7,
  "coveragePct": 64.7, "decidedCount": 4804,
  "guaranteed": {"close": {"alpha": 0.05, "lambda": 0.62, "coveragePct": 57.1, "n": 129}, "merge": null},
  "instanceCount": 1, "windowDays": 90, "gamingFlagsCaught": 0
}

The numbers are real and instanceCount: 1 is disclosed in the same payload — this is not dishonesty.
The problem is that three separate claims built on top of it do not survive N=1.

What breaks at N=1

1. The median's stated robustness property is absent. analytics.ts:256-257 justifies the design as
"median across REGISTERED instances … robust to a single bad contributor and to unregistered/untrusted
senders."
A median of one is that one value. The robustness the comment claims is doing no work, and at
N=2 a median is just the mean of two — still no robustness.

2. gamingFlagsCaught is mathematically unsatisfiable, and is published as evidence. The detector
(analytics.ts:281-296) compares each instance against the fleet median. At N=1 the instance is the
median, so:

  • highVolume = i.decided > fleetMedianDecided * GAMING_VOLUME_MULTIPLIERd > d * m, false for m ≥ 1
  • highPrecision = i.mergePrecision - fleetMergeP > GAMING_PRECISION_BAND0 > band, false

Both conjuncts are false by construction, so the flag count is structurally 0. Its doc comment
(public-stats.ts:265-267) presents that zero as "proof the fleet actively polices for gaming, not just
a claim of it."
A zero that cannot be non-zero is not proof of policing. This is the mechanism behind
#9068's "structurally always 0" observation
— that issue reports the symptom; the root cause is that
the detector needs N ≥ 3 to mean anything.

3. It is circular as guarantee evidence. guaranteed.close is published by a registered instance's
own risk-control calibration (#8835), and fleetAccuracy is that same instance's outcomes. The
"fleet-wide" framing invites a reader to treat the two as independent corroboration. They are one
operator's self-report.

What breaks when hosted goes live

This is the reason to fix it now rather than when it becomes urgent.

  • Per-tenant volume becomes derivable by subtraction. At N=2, a reader who knows one instance's
    volume (ours is public via byProject/own-ledger totals) gets the other tenant's decision volume
    exactly. At N=3 it is still a tight bound. Publishing pooled counts alongside instanceCount leaks
    more than either alone.
  • A hosted tenant's decision volume is their business metric — how many PRs they ship, how many get
    closed. Folding that into a public aggregate needs an explicit tenant-facing decision (opt-in, opt-out,
    or never) made before the first tenant is onboarded, not retrofitted after.
  • The anti-farming detector only starts working at N ≥ 3, which is exactly when the fleet contains
    parties we do not control — i.e. when it first matters. Its thresholds have never been exercised
    against real multi-instance data.

Requirements

  • Add a minimum instanceCount before fleetAccuracy publishes fleet-framed figures. Below it, either
    suppress the block or relabel it explicitly as single-instance self-report — the honest fallback the
    caller already has for the null case.
  • Gate gamingFlagsCaught on N ≥ 3 and publish it as null/absent below that, rather than 0. Correct
    its doc comment: a zero must be distinguishable from "the detector cannot fire".
  • Correct the median-robustness comment in analytics.ts to state the N it actually requires.
  • Decide the hosted-tenant policy before the first tenant lands and record it here: does a hosted
    tenant's outcome data enter the public fleet aggregate at all, and if so, opt-in or opt-out? If yes,
    suppress pooled counts at small N so per-tenant volume is not derivable by subtraction — publish the
    median view only, or add k-anonymity on decidedCount.
  • Exercise the outlier and gaming thresholds against synthetic multi-instance fixtures before N ≥ 3
    happens in production; they are currently untested against the shape they were written for.

Test Coverage Requirements

99%+ patch coverage, branch-counted. Both arms of the instance-count floor; a fixture asserting
gamingFlagsCaught is null (not 0) below the floor; a multi-instance fixture exercising the outlier
and gaming detectors for the first time.

Links & Resources

Boundaries

Public-stats fleet framing and the hosted-tenant data policy. No change to how any instance computes its
own accuracy, and no change to the risk-control guarantee itself.

maintainer-only — public claims accuracy and tenant confidentiality.

Metadata

Metadata

Assignees

Labels

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

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions