Repository navigation
Studio: overwrite guard survives the raw/JSON cache collision; telemetry line reports in-session evictions (LAB-227) - #289
Merged
2 commits merged intoOct 29, 2026
Merged
2 commits merged into
2 commits merged into
Conversation
…uard miss) GitHub returns one ETag for the raw and the JSON form of a contents URL; after a raw read (?p= open, promote, previews) Chrome revalidated the cached raw body for the later JSON request and served it on the 304, so res.json() threw and every existence check (resolveRepoSaveTarget, the silent-fork guard) answered "no": a changed protocol overwrote the repo copy with no "Overwrite?" prompt. Found on ww18 during the LAB-227 private-repo test, 2026-10-29. GH.run now sends cache: 'no-store'; runBytes keeps caching since nothing JSON is stored. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… counter The ring block header's `dropped` is the controller's eviction count since its boot, so a Studio connected hours later logged "dropped 1929" with gaps 0 and read as in-run loss (ww18, 2026-10-29). The drainer now keeps the counter at its first block of a ring incarnation (`droppedBase`, reset on a fresh ring) and exposes `droppedSession`; the once-a-minute stats line leads with "evicted this session N (controller lifetime M)". `telemetry_dump` and the soak stats carry the new field; the raw `dropped` stays for the record. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
4 tasks
mbreiser
added a commit
that referenced
this pull request
Oct 29, 2026
…sion; telemetry line reports in-session evictions (LAB-227)
mbreiser
added a commit
that referenced
this pull request
Oct 29, 2026
mbreiser
added a commit
that referenced
this pull request
Oct 29, 2026
…sion; telemetry line reports in-session evictions (LAB-227)
mbreiser
added a commit
that referenced
this pull request
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two Studio fixes found during the LAB-227 private-repo test on ww18 (2026-10-29, Production 59a377b).
application/vnd.github.raw) and the JSON form of one contents URL. After a raw read (?p=open, promote, pattern previews viaGH.runBytes), Chrome revalidated the cached raw entry for the later JSONGH.runon the same URL, got a 304 and served the raw YAML;res.json()threw,datawasnull, andresolveRepoSaveTarget(and the silent-fork guard) concluded the file did not exist. A changed protocol then overwrote the repo copy with no "Overwrite?" prompt. Reproduced in the page: the default-cache JSON request returnedversion: 3…, the same request withcache: 'no-store'returned JSON withsha. Fix:GH.runsendscache: 'no-store'.runByteskeeps caching, since nothing JSON is ever stored now, the collision cannot happen in either order.droppedis the controller's lifetime eviction count since its boot; a Studio connected hours later logged "dropped 1929" with gaps 0. The drainer now keeps the counter at its first block of a ring incarnation (droppedBase, reset on a fresh ring and byreset()) and exposesdroppedSession; the once-a-minute stats line reads "evicted this session N (controller lifetime M)".telemetry_dumpsummaries and soak stats carry the new field; the rawdroppedstays for the record.docs/development/telemetry-logging-reference.mddocuments it.Linear: LAB-227 (findings posted there).
Tier
next candidate — together with #285, #286 and #288. The overwrite is recoverable from git history, so not a hotfix.
Release notes
Studio
Test plan
pixi run test— 72/72 filestests/test-studio-github.js:run()sendscache: 'no-store'; a non-JSON body yieldsdata: nullwithout throwingtests/test-arena-telemetry.js: first block withdropped 1929→droppedSession 0; next block1931→2;reset()clears the baseline?p=, change it, Save → "Overwrite …?" prompt appears🤖 Generated with Claude Code