Skip to content

fix(tasks): label snapshot restores correctly - #74615

Merged
trunk-io[bot] merged 1 commit into
masterfrom
fix/cloud-resume-progress-label
Jul 29, 2026
Merged

trunk-io[bot] merged 1 commit into
masterfrom
fix/cloud-resume-progress-label

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A cloud task resumed from a persisted sandbox snapshot initially reports "Setting up sandbox." The workflow is restoring an existing sandbox, so the progress label is misleading.

Changes

Classify a run as a snapshot resume only when it has both a source run and a snapshot ID. Both task workflows now emit "Restoring sandbox" for that path and keep "Setting up sandbox" for fresh setup.

@tatoalo tatoalo added the skip-inkeep-docs Use this label to skip an Inkeep docs PR in posthog.com label Jul 29, 2026
@tatoalo tatoalo self-assigned this Jul 29, 2026
@trunk-io

trunk-io Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@tatoalo tatoalo added the stamphog Request AI approval label Jul 29, 2026
@tatoalo
tatoalo marked this pull request as ready for review July 29, 2026 12:43
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team July 29, 2026 12:44
@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
Prompt To Fix All With AI
### Issue 1
products/tasks/backend/temporal/process_task/activities/get_task_processing_context.py:137
**Snapshot handoffs remain misclassified**

When a snapshot-backed cloud handoff has `handoff_resumed` and `snapshot_external_id` but no `resume_from_run_id`, this predicate returns false even though provisioning restores the snapshot, causing both workflows to continue displaying "Setting up sandbox" instead of "Restoring sandbox."

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix(tasks): label snapshot restores corr..." | Re-trigger Greptile

@stamphog stamphog Bot removed the stamphog Request AI approval label Jul 29, 2026
@PostHog PostHog deleted a comment from stamphog Bot Jul 29, 2026
@tatoalo
tatoalo force-pushed the fix/cloud-resume-progress-label branch from 2520d25 to ed711ea Compare July 29, 2026 13:05
@tatoalo tatoalo added the stamphog Request AI approval label Jul 29, 2026

@stamphog stamphog 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.

Small, contained progress-label fix in the tasks workflow; the one substantive Greptile finding was fixed and confirmed by Greptile's own 👍, with a parameterized test covering the fix.

  • Author wrote 50% of the modified lines and has 103 merged PRs in these paths (familiarity MODERATE).
  • 👍 on the PR from greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites ✓ all clear
deny-list ✓ no deny categories matched
size ✓ 12L, 3F substantive, 51L/4F incl. docs/generated/snapshots — within ceiling
tier ✓ T1-agent / T1b-small (51L, 4F, single-area, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ a7705a2 · reviewed head ed711ea

@tatoalo
tatoalo enabled auto-merge (squash) July 29, 2026 13:38
@github-actions

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Backend coverage — 15.0% of changed backend lines covered — 11 uncovered

🧪 Backend test coverage

Patch coverage — changed backend lines (products + core): ███░░░░░░░░░░░░░░░░░ 15.0% (2 / 13)

File Patch Uncovered changed lines
products/tasks/backend/temporal/execute_sandbox/workflow.py 0.0% 465–466
products/tasks/backend/temporal/process_task/activities/tests/test_get_task_processing_context.py 0.0% 41, 64–65, 77
products/tasks/backend/temporal/process_task/workflow.py 0.0% 1027–1028
products/tasks/backend/temporal/process_task/activities/get_task_processing_context.py 40.0% 138–140

🤖 Agents: add a test covering the lines above, or note why under "How did you test this code?". Machine-readable gap list: the patch-coverage artifact on this run (gh run download 30456266307 -n patch-coverage), or the coverage-data block at the end of this comment.

Per-product line coverage (touched products)
Product Coverage Lines
demo ███████████░░░░░░░░░ 56.2% 1,497 / 2,663
tasks ██████████████░░░░░░ 69.7% 31,933 / 45,814
cdp ████████████████░░░░ 81.0% 3,146 / 3,883
signals ████████████████░░░░ 81.1% 23,838 / 29,387
data_modeling █████████████████░░░ 85.3% 7,343 / 8,611
notebooks █████████████████░░░ 86.0% 7,794 / 9,060
actions █████████████████░░░ 86.6% 717 / 828
cohorts █████████████████░░░ 86.9% 5,648 / 6,496
product_tours ██████████████████░░ 87.9% 1,303 / 1,482
data_warehouse ██████████████████░░ 88.3% 12,036 / 13,635
exports ██████████████████░░ 88.4% 6,950 / 7,862
dashboards ██████████████████░░ 89.4% 5,983 / 6,693
engineering_analytics ██████████████████░░ 89.4% 6,441 / 7,202
conversations ██████████████████░░ 89.6% 17,234 / 19,241
alerts ██████████████████░░ 90.0% 4,342 / 4,827
mcp_analytics ██████████████████░░ 90.2% 2,883 / 3,198
streamlit_apps ██████████████████░░ 90.7% 2,630 / 2,901
error_tracking ██████████████████░░ 91.0% 10,925 / 12,004
slack_app ██████████████████░░ 91.1% 9,554 / 10,492
stamphog ██████████████████░░ 91.1% 4,056 / 4,450
marketing_analytics ██████████████████░░ 91.2% 12,058 / 13,222
product_analytics ███████████████████░ 92.5% 5,849 / 6,321
early_access_features ███████████████████░ 92.6% 1,287 / 1,390
ai_observability ███████████████████░ 92.8% 15,328 / 16,517
surveys ███████████████████░ 93.1% 5,771 / 6,197
web_analytics ███████████████████░ 93.2% 14,826 / 15,906
posthog_ai ███████████████████░ 93.2% 1,326 / 1,422
approvals ███████████████████░ 93.3% 3,437 / 3,682
reminders ███████████████████░ 93.4% 468 / 501
workflows ███████████████████░ 93.8% 6,943 / 7,399
endpoints ███████████████████░ 94.2% 8,655 / 9,192
skills ███████████████████░ 94.6% 3,158 / 3,337
review_hog ███████████████████░ 94.6% 6,912 / 7,303
experiments ███████████████████░ 95.4% 25,752 / 26,982
logs ███████████████████░ 95.5% 10,435 / 10,928
annotations ███████████████████░ 96.2% 732 / 761
revenue_analytics ███████████████████░ 96.3% 1,887 / 1,960
feature_flags ███████████████████░ 96.4% 17,371 / 18,023
replay_vision ███████████████████░ 96.4% 15,861 / 16,455
user_interviews ███████████████████░ 96.5% 2,638 / 2,734
customer_analytics ███████████████████░ 97.1% 9,797 / 10,085
warehouse_sources ███████████████████░ 97.2% 346,863 / 356,769
data_catalog ████████████████████ 97.7% 2,556 / 2,615
pulse ████████████████████ 98.4% 2,017 / 2,049

Report-only. Patch coverage = changed backend lines covered vs origin/master. Sorted lowest first.
Known gaps: lines covered only by Temporal tests show as uncovered; core line numbers may drift if master changed the same file.

@trunk-io
trunk-io Bot merged commit 98ee456 into master Jul 29, 2026
335 of 365 checks passed
@trunk-io
trunk-io Bot deleted the fix/cloud-resume-progress-label branch July 29, 2026 14:29
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-29 15:07 UTC Run
prod-us ✅ Deployed 2026-07-29 15:23 UTC Run
prod-eu ✅ Deployed 2026-07-29 15:27 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-inkeep-docs Use this label to skip an Inkeep docs PR in posthog.com stamphog Request AI approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant