Go: apply typed evaluations at an explicit timestamp without resolving twice

Aperta
#653 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #654 di @williamhogman — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, wasm
Ambito
api

Direzione di ricerca

Start in the Go typed evaluation path that handles _confidence_skip_apply and discards the resolve token, then trace how ApplyFlags is called on the WASM protocol. Check the existing real-WASM test for exposure counts and the tutorial fixture benchmark. Done means an opt-in WithApplyTime that applies the original token once at the given timestamp, with suppression and zero-time behavior covered by tests. Confirm the API shape with maintainers before implementing.

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

Descrizione

Typed Go evaluations can suppress exposure collection with _confidence_skip_apply, but they discard the response's resolve token. Recording an exposure at an explicit event timestamp therefore requires a second Resolve to obtain a token, followed by ApplyFlags, or duplicating the provider's typed decoding/error handling.

Would an opt-in WithApplyTime(ctx, timestamp) API fit the provider? The typed evaluation would resolve once with apply=false, preserve its existing validation and decoding, and apply the original token at the requested timestamp after a successful typed evaluation, including fallthrough exposures that request application without a variant. Exposure suppression and ShouldApply=false would still win; zero time would restore normal behavior; an apply failure would not discard a valid flag value.

I have a small prototype against 4e1a5f1f4f4c31a328361108c715a2d9dab6a444 using the existing ApplyFlags/WASM protocol. In five alternating real-WASM runs with the public tutorial fixture and dedup enabled, process CPU falls from 102.7 to 59.8 microseconds per evaluation (41.7%), with identical typed results. Allocation drops from 83,048 to 54,328 bytes and 251 to 150 allocations per evaluation. A real-WASM test confirms exactly one backdated exposure.

I will open a focused PR with the implementation, contract coverage and reproducible benchmark. No Rust, protobuf or embedded WASM changes are needed.

Lingua principale
Rust
Stelle
17
Fork
18
Merge medio
1h 25m
PR unite (30g)
3

Preparare l'ambiente

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 spotify/confidence-resolver

Tutte le issue di spotify/confidence-resolver

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.