You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Defer lastAssistantPreview peek-migrate off Store constructor #644
After the field is persisted, boot envelope parse is ~14 ms. On first upgrade every thread lacks lastAssistantPreview, so Store construct still skip-scans messagesByThread once to peek-migrate (~270 ms on the live 194 MB / 624-thread store). That puts the upgrade hitch on the constructor, before first paint.
Move that one-time peek off the constructor (on first threads:summaries, then save) so time-to-first-interactive-paint stays envelope-only even on upgrade. Do not hydrate messagesByThread.
Tests:
construct against a large fixture returns before any skip-scan
first summaries or a deferred migrate fills lastAssistantPreview
second boot is a no-op
Treat ~/Library/Application Support/Solenta/coder-store.json as read-only.
Implemented on coder/fork-fork-fork-boot-600-ms-synchronous-j-3f0c95 (on top of the #639 lazy-hydrate + lastAssistantPreview work).
Store construct no longer peek-migrates lastAssistantPreview. First threads:summaries (or store.ensureLastAssistantPreviews()) skip-scans once, stamps the envelope, and save()s. Second boot is a no-op.
Tests: construct of a 32-thread unmigrated fixture does not call _ensureMessagesIndexed; first summaries fills without hydrating; second boot does not skip-scan.
Live store (read-only): 194 MB, 626 threads, envelope parse 14.9 ms, all 626 still lack the field. Did not construct Store against it.
Activity
currentbits commentedon Aug 21, 2026
Implemented on
coder/fork-fork-fork-boot-600-ms-synchronous-j-3f0c95(on top of the #639 lazy-hydrate + lastAssistantPreview work).Store construct no longer peek-migrates
lastAssistantPreview. Firstthreads:summaries(orstore.ensureLastAssistantPreviews()) skip-scans once, stamps the envelope, andsave()s. Second boot is a no-op.Tests: construct of a 32-thread unmigrated fixture does not call
_ensureMessagesIndexed; first summaries fills without hydrating; second boot does not skip-scan.Live store (read-only): 194 MB, 626 threads, envelope parse 14.9 ms, all 626 still lack the field. Did not construct
Storeagainst it.currentbits commentedon Aug 21, 2026
Implemented on this thread; peek-migrate is off the constructor.