-
-
Notifications
You must be signed in to change notification settings - Fork 65
Add conditional-GET caching for policy-doc fetches #4842
Copy link
Copy link
Closed
Labels
gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is neededExtra attention is needed
Description
Metadata
Metadata
Assignees
Labels
gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is neededExtra attention is needed
Problem: Policy documents (contribution/AI-usage guidance) are refetched from GitHub on every single
discoverinvocation even though they rarely change, burning rate-limit budget on essentially static content.Area: AMS / Performance
Proposal: Add ETag/If-None-Match conditional-GET support to the policy-doc fetch path.
Deliverables:
Acceptance criteria:
discoverrun against an unchanged repo makes a conditional request and consumes no additional rate-limit budget when the doc hasn't changed.Scope note: this issue is limited to the HTTP-level fetch mechanism (ETag / If-None-Match) for the policy document. It must not change how the fetched content is parsed or how a policy verdict is derived from it — that logic stays out of scope. On any error, timeout, or ambiguous cache state, the fetch must fail safe by refetching the full document rather than serving a possibly-stale cached copy: silently serving stale policy content that could let the autonomous loop treat a now-opted-out repo as eligible is out of scope for this issue and stays maintainer-owned.