fix(server): stop routine events from rescanning thread history - #8150
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityA prior Macroscope approval was dismissed. Re-evaluating ec7c00a… |
Dismissing prior approval to re-evaluate ec7c00a
- Evita que eventos de rotina reprocessem o histórico da thread (pingdotgg#8150) no ProjectionPipeline - Ajusta a lógica de projeção em `orchestration/Layers/ProjectionPipeline.ts` (+27 linhas) - Adiciona cobertura de testes nova em `ProjectionPipeline.test.ts` (+72 linhas) - Atualiza expectativas do teste do `ClaudeAdapter` para acompanhar a mudança - Sem conflitos: merge automático limpo, modificações do fork preservadas Sync automatico t3code-sync em 2026-08-24T22:15:01-03:00
## What's Changed * fix(server): stop routine events from rescanning thread history by @t3dotgg in pingdotgg/t3code#8150 * fix(deps): stop pnpm installs from changing the lockfile by @t3dotgg in pingdotgg/t3code#8163 **Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260825.1180...v0.0.34-nightly.20260825.1181 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260825.1181
Assistant messages and routine tool activity reload complete thread histories even when no thread summary can change. This slows both the default buffered mode and legacy streaming, and busy threads can delay other conversations.
Skip the summary refresh for assistant messages and routine activities. Keep existing refreshes for user messages, approvals, user input, plans, session changes, and reverts.
Thanks to @cheruvian for #5855, @dain for #7356, and @maria-rcks for #7486.
Fixes #4008.
Checks:
Model and harness: GPT-5.6 Sol in Codex.
Note
Medium Risk
Changes when derived
projection_threadssummary columns update; anything expecting fresh counts after assistant or routine tool activity may stay stale until a user message or allowlisted event.Overview
Stops expensive thread shell summary refreshes on events that cannot change sidebar/summary fields (
latestUserMessageAt, pending approval/input counts, actionable plans).Adds
shouldRefreshThreadShellSummaryand uses it beforerefreshThreadShellSummaryin the shared message/activity/plan handler. Assistantthread.message-sentevents and mostthread.activity-appendedkinds (e.g.tool.updated) no longer trigger a full history rescan; user messages and allowlisted approval/user-input activity kinds still do. Session, revert, and proposed-plan paths are unchanged.The projection pipeline test uses a
projection_threadsupdate trigger to assert assistant messages and routine tool activity each produce only the lightweightupdatedAtupsert—not an extra summary refresh.Reviewed by Cursor Bugbot for commit ec7c00a. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Guard
refreshThreadShellSummarycall inapplyProjectsProjectionto skip routine eventsIntroduces
shouldRefreshThreadShellSummaryto decide whether a given event warrants a thread shell summary refresh. It returnstruefor user messages and a specific set of activity kinds (approval.requested,approval.resolved,provider.approval.respond.failed,user-input.requested,user-input.resolved,provider.user-input.respond.failed), andfalsefor assistant messages and other activity kinds.refreshThreadShellSummary(threadId)call in ProjectionPipeline.ts with a conditional call guarded by this function. The thread row upsert withupdatedAtstill runs on every event.projection_threadsupdates, verifying that a user message triggers one refresh and a subsequenttool.updatedactivity does not trigger an additional one.Macroscope summarized ec7c00a.