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
At main 5d64184, canonicalizeWorktreeActivity creates new state/context objects for identical catalogs. The renderer treats those references as changes and appends worktree_catalog_reconciled diagnostics for quiet sessions. LiveWorktreeReconciler.observe also replays up to 500 retained records for unrelated transcript batches.
Evidence
A production-module probe returned new projection references for 1000/1000 value-identical results. In a 120-second audit window, eight sessions each received ten reconciliation records with unchanged diagnostic payloads. A synthetic recorded-fixture benchmark measured approximately 2 ms per unrelated batch with 500 retained worktree events, versus approximately 0.003 ms with none. These are isolated costs, not an app-wide latency measurement.
Add meaningful regression tests and reproducible before/after measurements using sanitized fixtures.
Scope is renderer worktree reconciliation and the shared canonicalizer. Main-process index persistence, #763/#762/#767, and A6 issues #802-805 remain separate increments. No lifecycle/readiness or raw terminal input changes.
Implemented in #808 with seven identity/invalidation regressions and a checked-in benchmark. Both CI gates now pass. For 200 unrelated batches with 500 retained records, redundant projection identity changes fell from 200 to zero; isolated median reconciliation cost fell from 2.118166 ms to 0.000333 ms. Not an app-wide typing-latency claim. PR remains open pending review and explicit merge confirmation.
Review boundary recorded (from independent review of #808): sameCatalog compares head for every checkout, so ANY commit change in a worktree invalidates catalog identity for that cwd and triggers the full bounded retained-evidence replay at the next refresh. This is correct attribution behavior — an actual checkout change is genuinely relevant evidence — but it is a deliberate boundary of this optimization: a busy repo that moves main every few seconds will not see quiet-session replay savings for sessions on that cwd.
Activity
Juliusolsson05 commentedon Sep 5, 2026
Implemented in #808 with seven identity/invalidation regressions and a checked-in benchmark. Both CI gates now pass. For 200 unrelated batches with 500 retained records, redundant projection identity changes fell from 200 to zero; isolated median reconciliation cost fell from 2.118166 ms to 0.000333 ms. Not an app-wide typing-latency claim. PR remains open pending review and explicit merge confirmation.
test(worktrees): retitle replay-cache coverage as invalidation tests
Juliusolsson05 commentedon Sep 6, 2026
Review boundary recorded (from independent review of #808):
sameCatalogcomparesheadfor every checkout, so ANY commit change in a worktree invalidates catalog identity for that cwd and triggers the full bounded retained-evidence replay at the next refresh. This is correct attribution behavior — an actual checkout change is genuinely relevant evidence — but it is a deliberate boundary of this optimization: a busy repo that movesmainevery few seconds will not see quiet-session replay savings for sessions on that cwd.