Files
tty7/crates
63bf3b885c perf(github): revalidate the GitHub panel's reads by ETag (#1117)
* perf(github): revalidate the GitHub panel's reads by ETag

HttpTransport keeps each plain GET's last answer and ETag and re-asks
with If-None-Match; a 304 replays the stored answer. A signed-in 304 is
not counted against the rate limit, so revalidations and polls stop
draining the hourly allowance the panel shares with gh. get_full is not
cached because its signed attachment URLs expire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(github): replay the answer that went with the ETag that was sent

The tag and the stored answer were read under two separate locks. If the
cache started over (or the entry was replaced) between them, a 304 found
no answer, fell through to classify() and surfaced as HTTP 304 in the
panel. Read both as one snapshot and replay that on a 304.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
2026-10-07 21:22:53 +08:00
..