Skip to content

fix(tasks): avoid redundant terminal history fetches#3744

Merged
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/faster-resumed-task-history
Jul 23, 2026
Merged

fix(tasks): avoid redundant terminal history fetches#3744
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/faster-resumed-task-history

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Problem

Opening a completed task with a long resume chain downloads overlapping history multiple times before the conversation can render.

Changes

Completed resumed runs now hydrate from the combined session-log response once. Run markers still preserve the leaf boundary used for transcript positioning and counts. Active runs keep the existing reconciliation path.

Generated-By: PostHog Code
Task-Id: a9c061a3-575e-42c6-815e-c0b6edd4b846
@tatoalo tatoalo self-assigned this Jul 23, 2026
@trunk-io

trunk-io Bot commented Jul 23, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 1f4120c.

@tatoalo tatoalo added the Stamphog This will request an autostamp by stamphog on small changes label Jul 23, 2026
@tatoalo
tatoalo marked this pull request as ready for review July 23, 2026 09:33
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(tasks): avoid redundant terminal his..." | Re-trigger Greptile

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contained single-file fix to session log hydration logic (no auth/billing/CI/dependency/migration surface); author has STRONG familiarity with this exact code and Greptile's automated review raised no concerns.

  • Author wrote 100% of the modified lines and has 15 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 122L, 1F substantive — within ceiling
tier T1-agent / T1c-medium (122L, 1F, single-area, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ ac15077 · reviewed head 1f4120c

@tatoalo
tatoalo enabled auto-merge (squash) July 23, 2026 09:47
@trunk-io
trunk-io Bot merged commit 5bbe70c into main Jul 23, 2026
41 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/faster-resumed-task-history branch July 23, 2026 09:51
tatoalo added a commit that referenced this pull request Jul 23, 2026
Main's #3744 (avoid redundant terminal history fetches) made a terminal
resume-chain hydration issue one whole-chain fetch instead of an
ancestor+current pair, so the expected call count after the terminal
watch drops from 4 to 3. The regression the test pins is unchanged: the
terminal hydration must start its own fetch rather than dedupe onto the
in-flight resume-chain hydration (count would stay 2 if mode-keying
broke).

Generated-By: PostHog Code
Task-Id: 0c511836-2180-455a-9b58-45df2a0661ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant