Repository navigation
WIP: work: start a resumed worktree at its pushed PR head - #1144
Open
oxa-agent[bot] wants to merge 2 commits into
Open
oxa-agent[bot] wants to merge 2 commits into
oxa-agent[bot] wants to merge 2 commits into
Conversation
Resuming a PR from a retained worktree audited whatever commit the earlier run left there. When the PR branch was pushed on from elsewhere, the local branch still pointed at the older commit, so the worker read an obsolete tree and a later push could drop the commits made in between. Before the base merge, a retained worktree whose lone remote-tracking tip of the same branch strictly extends its HEAD now starts at that published head through the sandboxed supervisor, as an ordinary fast-forward. No fetch, reset or force update is added: a tip that is not ahead, several diverging tips or a dangling tracking ref keep the retained commits, and a tip that stops being a fast-forward refuses the resume instead of rewriting it. The initial commit recorded for the run is taken after the advance. Tests: work_continue resumes a worktree after the PR branch was pushed on from another clone and checks the worktree head and tree, and checks that a pushed head the local commit is not an ancestor of is left untouched. Fixes #1006
Collaborator
|
First-pass review by oxa → oxc →
TIER: T3 🤖 Generated with Claude Code (oxa review lane) |
The resumed-worktree tests cloned the second checkout before `agent/test` existed on the remote, because oxa itself never pushes: a work run leaves the branch local. The clone therefore had only a remote-tracking ref for it, and the DWIM `git checkout agent/test` failed with "pathspec 'agent/test' did not match any file(s) known to git", failing the lane on the push-elsewhere fixture rather than on the resume behaviour it tests. Publish the branch from the source checkout first and start the clone's branch from `origin/agent/test` explicitly. The worktree and tree assertions are unchanged. Fixes #1006
This was referenced Nov 17, 2026
Collaborator
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Preservation draft for task i1006. Work is not submitted for review. CI and completion evidence remain pending; do not approve or merge this WIP.
Fixes #1052