Repository navigation
fix(browser): evict each failed load and drop writes stuck behind an eviction - #37
Conversation
…eviction Evictions are now keyed to the shared engine load rather than its rejection, so a retry that rejects with a reused error object still evicts its own download. A cache write waiting behind an eviction is dropped after 30 seconds instead of holding its response indefinitely. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Comments Outside DiffThese findings could not be posted inline.
|
Devin left two findings on #36 after it merged.
The corrupt-model eviction was keyed to the load's rejection object. A retry is a new load, but if the runtime rejected it with the same error object, the lookup returned the first eviction and skipped deleting the retry's corrupt download, which stayed cached for later visits. Evictions are now keyed to the shared engine load itself. Every caller that joined a load still shares one eviction, and each retry gets its own.
A cache write that starts during an eviction waits for that eviction's delayed delete. If an earlier write hangs, the eviction never finishes, and each later write held a model-sized response forever without caching it. The write now waits at most 30 seconds and is then dropped. A dropped write only means the next visit downloads the model again.
Root
bun run lint,typecheck,testandbuildpass. The new tests for a retry that reuses its error object and for a write stuck behind a slow eviction fail on main and pass here. No real browser or device was exercised.Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code