fix(shell): pass explicit origin and branch to git pull --rebase#182
fix(shell): pass explicit origin and branch to git pull --rebase#182skulidropek merged 4 commits intoProverCoderAI:mainfrom
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#181
Resolve current branch via `git rev-parse --abbrev-ref HEAD` and pass `origin <branch>` explicitly so that `git pull --rebase origin main` (or the tracked branch) is called instead of the bare `git pull --rebase`, which can fail or pull the wrong branch in some git configurations. - Fix statePullInternal in state-repo.ts (used by autoPullState) - Fix statePull in pull-push.ts (used by the manual pull command) - Falls back to "main" when HEAD is detached Fixes: ProverCoderAI#181 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 895e77a.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (731KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable. |
…se on pull failure - Replace Effect.catchAll with Effect.orElse in state-repo.ts and pull-push.ts to comply with no-restricted-syntax lint rule that forbids catchAll - Add Effect.tapError in autoPullState to run git rebase --abort when pull fails, preventing conflict markers from being left in the working tree when git pull --rebase encounters merge commits in the local history INVARIANT: ∀ pull_failure ∈ RebaseFailures: rebase_aborted(failure) → clean_working_tree(root) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (2040KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 2)Reason: Uncommitted changes detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable. |
🔄 Auto-restart-until-mergeable Log (iteration 2)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (2274KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Fixes #181
Previously `git pull --rebase` was called without explicit `origin ` parameters in both `statePullInternal` (used by `autoPullState` at startup) and `statePull` (used by the manual pull command). This can fail or pull the wrong branch in certain git configurations.
Changes
Mathematical guarantees
Invariant: `∀ pull ∈ PullOperations: explicit_remote(pull) ∧ explicit_branch(pull) → deterministic_target(pull)`
Invariant: `∀ pull_failure ∈ RebaseFailures: rebase_aborted(failure) → clean_working_tree(root)`
Precondition: `git repo with origin remote exists`
Postcondition: `git pull --rebase origin ` is called with the resolved branch name; on failure the rebase is cleanly aborted
Test plan