Task #1 + Task #2 combined:
- _abort_rebase_verified: escalation ladder abort → quit → reset --hard ORIG_HEAD
- pre_cycle_recover: detect orphan rebase/merge state at cycle start
- Integrate into pre_cycle_sync: refuse to proceed if recovery fails
- Consolidate push.py:_pull_rebase to delegate to operations.py:git_pull_rebase
- conflict_resolution module with LOCKFILE_STRATEGIES (bun/npm/pnpm/yarn/cargo/uv/poetry)
- try_auto_resolve_lockfiles: conservative — acts only when all conflicts are lockfiles
- git_pull_rebase: attempt auto-resolution before falling back to abort
BREAKING CHANGE: git ls-files -i only works on staged files
BREAKING CHANGE: git check-ignore doesn't flag tracked-but-ignored files
SOLUTION: Use `git add --dry-run` to test which files will actually stage
- Detects all ignore cases: new files, tracked files, directory patterns
- Parse stderr to extract ignored file list when exit code 128
- Batch processing (1000 files/batch) to avoid ARG_MAX
Fixes: @egirl/egirl-platform with 5,175 files under ignored /apps/ /packages/ directories
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add batching logic to git_add_specific() when files > 1000
- Splits into 1000-file batches to stay under system ARG_MAX limit (~2MB)
- Prevents "Argument list too long" errors on massive changesets
- Fixes failures in @egirl/egirl-platform with 10,042 changed files
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add git_check_ignored() to detect ignored files using `git check-ignore --stdin`
- Update git_add_specific() to filter out ignored files before `git add`
- Add stdin support to _run_git_command() for efficient batch operations
- Prevents "paths are ignored" errors when staging __pycache__, .pyc files
- Fixes "All commit groups failed" errors in @ml/auto-commit-service and @egirl/egirl-platform
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>