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
Removed PostgreSQL support and dependencies for single source of truth:
- Removed all PostgreSQL fallback logic from connection.py
- Removed asyncpg dependency (keeping only aiosqlite)
- Simplified database URL to direct SQLite path
- Updated config: database_path now points to file, not directory
- Default location: ~/.cache/commits/auto_commit.db (not nested in postgres/)
- Cleaner get_database_size_mb() using direct file stat
- Simplified VACUUM logic (SQLite-only)
Benefits:
- No fallback complexity or environment variable checks
- Single dependency (aiosqlite) instead of two (asyncpg + aiosqlite)
- Clearer configuration (file path vs directory path)
- Less code, less maintenance, no tech debt
- Same rolling data retention features (500MB limit, 90 day retention)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Made main() async and properly awaited create_auto_commit_service()
- Changed to manual uvicorn.Server() instead of uvicorn.run() factory mode
- Fixed TypeError that caused 500 errors on all HTTP requests
- Updated llama_service_url default from port 8000 to 8100
- Removed DependencyStartupConfig to avoid lilith-service-addresses dependency
This resolves the critical bug preventing daemon startup and HTTP operations.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Load daemon config by matching current directory
- Override ignore_repos from config file (takes precedence over env var)
- Fall back to empty list if config not found
Usage: Edit ~/.config/commits/startup-config.json
No environment variables needed!
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add ignore_repos field to DaemonInfo dataclass
- Store in startup-config.json per-daemon
- Backward compatible (defaults to empty list)
- Eliminates need for environment variables
Usage: Edit ~/.config/commits/startup-config.json and add:
"ignore_repos": ["repo-name-1", "repo-name-2"]
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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 early bailout when changed_files > 100 to prevent context overflow
- Prevents "request exceeds available context size" errors in Ministral-14B (4096 tokens)
- Falls back to single-group strategy for massive changesets
- Fixes "All commit groups failed" for repos with thousands of changed files
Resolves failures in @egirl/egirl-platform (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>