This repository was archived by the owner on Aug 6, 2026. It is now read-only.
trunk-merge/pr-3684/1d02ff63-0b0a-470d-93bc-c9b4d942cdf6 - #3691
Closed
trunk-io[bot] wants to merge 2 commits into
Closed
trunk-io[bot] wants to merge 2 commits into
trunk-io[bot] wants to merge 2 commits into
Conversation
Overlaps the best-effort existing-PR checkout with session startup so the branch is ready by the time the ACP session starts, instead of the agent paying for `gh pr checkout` on the critical path mid-task. Wraps the fire-and-await in try/finally so a throw from skill-bundle install / native-resume prep / MCP relay startup can never abandon an in-flight checkout mutating the working tree; bounds the checkout with an overall 60s deadline + AbortController so a hung `gh` can't stall session start; on an interrupted checkout it restores the original branch/HEAD (merge --abort, checkout --force, reset --hard) so the agent's fallback checkout starts clean; parses prUrl (and the workspace origin) and rejects PRs whose repository does not match the connected workspace before handing anything to `gh`; only skips checkout when HEAD is attached to the PR branch at its head commit (not detached, not just a SHA/branch-name match); and adds unit + gating tests. Review fixes for #3684 (subagent review + Greptile/veria-ai threads): dangling-checkout on the error path, startup-latency budget, prUrl validation + workspace repo-membership check, detached-HEAD vs branch-attached distinction, partial-checkout restore on interrupt/timeout, branch-name-vs-SHA mismatch, documented overlap safety (skill bundles install under gitignored .posthog/), and test coverage for checkout args, cwd forwarding, detached-HEAD-at-SHA, foreign-repo rejection, restore-on-interrupted-checkout, empty-branch, missing-OID fallback, view-succeeds/checkout-fails, and the auto-publish gating contract. Generated-By: PostHog Code Task-Id: 29c3cf5a-82e2-4f36-aeba-d0322ab741a5
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
trunk-io
Bot
deleted the
trunk-merge/pr-3684/1d02ff63-0b0a-470d-93bc-c9b4d942cdf6
branch
July 22, 2026 11:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created and is being managed by Trunk Merge.
This pull request is based on the main branch at SHA d2afabe38cc9865657f05c61a4570ed2cf6522cc.
See more details here.
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing the changes from pull request 3684.