What happens
ensure_branch() in reconcile-repos.sh force-resets the fullsend/onboard branch to the default branch tip before writing the updated shim. During the reset the branch momentarily has zero diff from main, causing GitHub to auto-close the existing enrollment PR. The subsequent write_shim_to_branch() pushes new content (branch is 1 commit ahead again), but GitHub does not reopen auto-closed PRs.
The script's gh pr list check then sees no open PR and may or may not successfully create a replacement, depending on timing and error handling.
What should happen
The branch update should avoid the zero-diff state. Options:
- Write the updated shim content in the same commit as the branch reset (atomic update)
- Detect and
gh pr reopen auto-closed PRs after the push
- Use
git commit --amend or rebase instead of resetting to base then re-committing
Context
Observed during the v0.5.0 upgrade of fullsend-ai. The experiments enrollment PR (fullsend-ai/experiments#18) survived because its shim content differed enough to avoid the zero-diff window, but the fullsend enrollment PR (fullsend-ai/fullsend#696) was auto-closed and had to be manually reopened.
Related
What happens
ensure_branch()inreconcile-repos.shforce-resets thefullsend/onboardbranch to the default branch tip before writing the updated shim. During the reset the branch momentarily has zero diff frommain, causing GitHub to auto-close the existing enrollment PR. The subsequentwrite_shim_to_branch()pushes new content (branch is 1 commit ahead again), but GitHub does not reopen auto-closed PRs.The script's
gh pr listcheck then sees no open PR and may or may not successfully create a replacement, depending on timing and error handling.What should happen
The branch update should avoid the zero-diff state. Options:
gh pr reopenauto-closed PRs after the pushgit commit --amendorrebaseinstead of resetting to base then re-committingContext
Observed during the v0.5.0 upgrade of
fullsend-ai. The experiments enrollment PR (fullsend-ai/experiments#18) survived because its shim content differed enough to avoid the zero-diff window, but the fullsend enrollment PR (fullsend-ai/fullsend#696) was auto-closed and had to be manually reopened.Related