iterate.com / git

git clone https://git.iterate.com/repos/git

Say what is enough of a kept entry in plain words

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

Misha Kaletsky, 2026-11-24 18:30 UTC · 05cc9eb0f698446c95eaa3931db569edf0854f73 · parent 7240218

1 file changed

M app.ts
@@ -83,7 +83,9 @@
         const found = text ? Kept.parse(JSON.parse(text)) : null;
         // a token that ends within a minute could end in the middle of this clone
         const tokenLasts = Boolean(found?.readToken && found.readToken.until > now + 60_000);
-        if (found && (tokenLasts || !anonymousRead)) kept = found;
+        // a request with its own token needs the remote alone; an anonymous read needs the token too
+        const enough = anonymousRead ? tokenLasts : true;
+        if (found && enough) kept = found;
         else {
           const artifacts = await itx.cfArtifacts.get(repo);
           kept = { remote: found ? found.remote : await artifacts.remote() };