Skip to content

fix(git): handle missing remote branch comparisons - #3881

Merged
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/handle-missing-cloud-branch
Jul 28, 2026
Merged

fix(git): handle missing remote branch comparisons#3881
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/handle-missing-cloud-branch

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Problem

Cloud runs can expose their branch name before the branch has been pushed to GitHub. Polling the compare endpoint during that window returns 404 and produces repeated internal errors in the development console.

Changes

Treat a 404 from the branch comparison as an empty diff while preserving all other failures. Add regression coverage for missing branches, successful comparisons, and non-404 errors

Generated-By: PostHog Code
Task-Id: 1d6efd63-cb24-47c2-aa8b-b05239df349f
@trunk-io

trunk-io Bot commented Jul 28, 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 e7d17dc.

@tatoalo tatoalo self-assigned this Jul 28, 2026
@tatoalo
tatoalo marked this pull request as ready for review July 28, 2026 15:47
@tatoalo
tatoalo requested a review from a team July 28, 2026 15:49
@tatoalo tatoalo added the Stamphog This will request an autostamp by stamphog on small changes label Jul 28, 2026
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(git): handle missing remote branch c..." | 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.

Small, contained fix in workspace-server's git service treating a 404 from branch comparison as an empty diff, with new regression tests; not risky territory (no auth, billing, data model, deps, or CI changes) and diff matches the stated description.

  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 3L, 1F substantive, 90L/2F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1b-small (90L, 2F, single-area, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ 943ba3b · reviewed head e7d17dc

@tatoalo
tatoalo enabled auto-merge (squash) July 28, 2026 15:59
@trunk-io
trunk-io Bot merged commit 5dd41ee into main Jul 28, 2026
41 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/handle-missing-cloud-branch branch July 28, 2026 16:12
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