Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

account/getQuota is served from a process-lifetime cache; reset_date is the fetch timestamp

Aperta
#2,619 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Inizia dall’implementazione di account/getQuota ed esegui _bench/quota_cache_probe.py per confermare il comportamento della cache per tutta la durata del processo e il comportamento del timestamp di recupero. Il lavoro è completato quando le chiamate ripetute possono aggiornare i dati all’interno di un processo di lunga durata, oppure quando la semantica della memorizzazione nella cache e di reset_date è documentata chiaramente per i client SDK.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

SDK: github-copilot-sdk 1.0.8 (Python) · CLI/runtime: GitHub Copilot CLI 1.0.83 · Windows 11

Summary

client.rpc.account.get_quota() returns the same answer for the lifetime of the runtime
process. A long-lived client that polls it to show live usage never sees the figure move.
Separately, reset_date on each snapshot is the runtime's fetch timestamp, not a reset
instant.

What I observed (2026-09-11)

  • A client started 2026-09-08 09:32 read premium_interactions.used_requests = 190
    (of 5000) at startup. It re-called get_quota every 120 s for three days and got 190
    every time. Meanwhile the account went to 5000/5000 (copilot-cli statusline:
    Plan: 100% used; the runtime's own session-store.db ledger: 4,922 credits this
    month on this machine). A fresh process, started at that point, read 5000/5000 on its
    first call.
  • Two calls 40 s apart in ONE fresh process returned byte-identical snapshots, including
    reset_date (2026-09-11T05:03:07.217Z both times). A new process a minute later
    stamped 05:04:32Z. So reset_date records when the runtime fetched, and identical
    stamps mean "served from cache".
  • Passing git_hub_token in AccountGetQuotaRequest does bypass the cache (fresh stamp
    5 s later), but that needs the Copilot OAuth token itself, which the SDK does not expose.

Why it matters

Agents that run for days (batch relays, always-on assistants) are exactly the ones that
need to watch the allowance. Mine drained a month's credits overnight while its status
line still said 4,810 left.

Ask

Either of:

  1. A TTL or a force_refresh flag on account/getQuota, or
  2. Document the caching and the actual semantics of reset_date, so clients know to
    combine the snapshot with the local usage ledger (which is what I ended up doing).

Repro

_bench/quota_cache_probe.py in https://github.com/aweussom/agentry calls get_quota
twice in one process 40 s apart, then once from a fresh process. Same-process stamps
are byte-identical; the fresh process carries its own. Re-verified today at 0/30/60/120 s:
fresh processes always fetch, so the cache is per process, not server-side.

Lingua principale
TypeScript
Stelle
10.5k
Fork
1.5k
Merge medio
1g 7h
PR unite (30g)
98

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/copilot-sdk

Tutte le issue di github/copilot-sdk

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.