requestCounts property

  1. @visibleForTesting
({int notModified, int requests}) get requestCounts

What this backend's own HTTP client has spent, and how much of it was free.

Exposed because the cheapness claim could not otherwise be asserted. The quota GitHub publishes is counted per token, and the live suites share one while dart test runs their files concurrently — so an assertion against that counter reads every other suite's traffic too, which is exactly the cross-suite entanglement the per-run scratch branch was introduced to remove. Per instance, the question has an answer.

requests == notModified over a stretch of polling is the cheapness claim stated in observable terms: GitHub does not charge a conditional request it answers 304, so a poll that issues nothing but 304s costs no quota without anyone reading a quota counter.

A test seam: no surface shows it, so it is the suites' instrument — the live budget measurements and the poll-cheapness checks read it. A diagnostics surface that wanted to say "this session has issued N requests, M of them free" would make it product surface, and the annotation would go.

Implementation

@visibleForTesting
({int requests, int notModified}) get requestCounts =>
    _client?.requestCounts ?? (requests: 0, notModified: 0);