Share results anonymously: collection, outbox, sender, consent, ogc db measure #48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "contrib"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 3 of the community database design, on top of #47 (this branch contains it; merge #47 first).
Analysis prerequisites. The directory report splits bytes into compressible, No_COW and incompressible and aggregates per extension. With sharing on, a separate methods pass runs the samples already read through zstd 1/3/6/9/15 (and XPRESS 4K/8K/16K on Windows; LZX is measured only) at background priority, only when nothing else is asked; the visible estimate never waits for it. Levels 9 and 15 come from a deterministic subset of the samples (folders with ≥ 512 samples; every 8th sample of a file read whole, every 4th of a sampled file), scaled by the folder's ratio to level 6: CPU −68 to −80 % on real Steam folders, level 15 within 0.1–2.2 ‰ of the full estimate (owner's decision). The pass runs on AC power only (the timer's battery check; desktops count as AC);
ogc analyze --on-batteryoverrides it.estimate::GENERATIONis 2. The analysis cache keeps the estimator generation and size bucket. On Windows a measurement walk after a WOF run sumsGetCompressedFileSizeWand checks every file's algorithm.Contributions.
collect.rsapplies §3.6 (store key and build, fully installed, complete run, no exclusions or skip list, Windows measured only after a clean walk, not again within 180 days for methods already sent; excluded games are never shared). The outbox holds core values only, one item per game; the sender adds salt, PoW and padding, POSTs exactly 1024 bytes over a fresh ureq agent (no keep-alive, no TLS resumption, no cookies, constant User-Agent, SOCKS resolving remotely), random not-before 1–24 h, ≥ 2 h apart, ≤ 8 a day, only while the app is open or onogc db send; the timer only queues. 202 accepted; every 4xx deletes; 410 turns sharing off; 429/503 back off; 14-day expiry; a 30-day pause after failures on at least 3 days.UI. "Share results anonymously" switch with the §9.3 confirmation dialog, the one-time card after the first analysis, the outbox page (exact JSON, remove one, remove all), notices. CLI:
ogc db outbox [--show] [--clear],ogc db send,ogc db measure(curated measurement in ogc-db's format, no paths or names; on Windows real WOF runs with--restore).Review: 13 findings from two independent reviews (10 distinct, 1 high: Windows estimates and measurements replaced each other in the outbox), all fixed. Locally: fmt, clippy (both feature sets), 1850 tests incl. GUI under Broadway pass. Not run: the Windows GTK clippy (
check-gui.sh) — CI covers it.Fixed after the first CI run: the thread id comes from the system call instead of
gettid(), which glibc 2.28 (the bundle's floor) lacks.