Repository navigation
Commit dc67620
authored
perf(github): durable ETag read broker - 304s replace repeat quota charges (#1164)
Quota campaign PR 4/5: durable ETag read broker - unchanged GitHub responses stop costing quota.
No wrapper sent If-None-Match before this; every repeat read paid a full quota charge (measured repeat floors: item_metadata 21.5%, comments 17.6%, reviews 19.5%). The broker persists ETag + body + digest in the queue DO (publisher-HMAC endpoints per the #1163 pattern; 30-day TTL; 2048-entry/512KiB bounds), keyed by credential pool, sorted route/query, media type, and page - a page-1 304 can never validate page 2. Cached bodies are released only after a live 304 plus digest confirmation; final pre/post-mutation guards always revalidate (a 304 is a live authoritative answer, but no guard ever consumes an unrevalidated cache). Composes with #1161: generations cover within-run reuse, the broker covers cross-run revalidation.
Integrated at the highest-repeat sites first: apply issue/pull metadata, paged comment/review collections, dashboard run/job health reads. Telemetry counts 200-with-store, 304-from-cache, miss, and skip as distinct units - this PR reduces QUOTA CHARGES, not wire requests (5 wire calls / 3 charged 200s in the counted fixture).
Proof: loopback ETag semantics with byte-identical 304 replay (digest asserted), page isolation, final-guard revalidation; full gate 3446/0 + dashboard-strict; Crabbox local-container receipt at this exact head, machine-verified provenance. Verdict clean (no actionable findings, proof sufficient) on bd2ef95.1 parent 6a358d2 commit dc67620
25 files changed
Lines changed: 2126 additions & 17 deletions
File tree
- .github/workflows
- dashboard
- docs
- proof/etag-read-broker
- scripts
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
| 1420 | + | |
1420 | 1421 | | |
1421 | 1422 | | |
1422 | 1423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
665 | 667 | | |
666 | 668 | | |
667 | 669 | | |
| 670 | + | |
668 | 671 | | |
669 | 672 | | |
670 | 673 | | |
| |||
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
| 700 | + | |
697 | 701 | | |
698 | 702 | | |
699 | 703 | | |
| |||
3014 | 3018 | | |
3015 | 3019 | | |
3016 | 3020 | | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
3017 | 3049 | | |
3018 | 3050 | | |
3019 | 3051 | | |
| |||
7569 | 7601 | | |
7570 | 7602 | | |
7571 | 7603 | | |
| 7604 | + | |
7572 | 7605 | | |
7573 | 7606 | | |
7574 | 7607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
331 | 337 | | |
332 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
333 | 345 | | |
334 | 346 | | |
335 | 347 | | |
| |||
0 commit comments