Skip to content

Add commitrocket package with batching, LFS, resume and CI - #1

Merged
coldsofttech merged 1 commit into
mainfrom
feat/commitrocket-package
Oct 24, 2026
Merged

coldsofttech merged 1 commit into
mainfrom
feat/commitrocket-package

Conversation

@coldsofttech

Copy link
Copy Markdown
Owner

Summary

Turns the commit_and_push script into an installable Python package (commitrocket, uv + hatchling) that splits a large set of changes into size-limited batches, commits each batch and pushes it with live progress.

Batching and pushing

  • Batch types: deterministic (default), sequential, soft; --limit-mib / --max-mib.
  • Progress bar with an ETA based on the average speed of the whole run.
  • Push retries with backoff (rejections are never retried), post-push verification, http.postBuffer tuning, compression and LFS thread settings (repository-local config, restored afterwards).
  • --dry-run, --no-push, --remote / --branch, --message-template, --include / --exclude (+ -from files and .commitrocketignore).

Git LFS

  • --use-lfs stores files over a threshold (--lfs-threshold-mib, 0 = all) with LFS using local-only rules; nothing is committed unless --lfs-commit-rules is given.
  • Files over 100 MiB without --use-lfs stop the run before anything is committed.
  • LFS files are checked to be pointers before upload; hooks are kept while unpushed LFS commits remain.

Reliability

  • Resume after a failure or Ctrl+C (journal for staged files, unpushed commits pushed first).
  • Detects leftover commits containing files over 100 MiB and shows how to clean them up.
  • The run's own log and report files are never committed, even inside the repository.

Tooling and usability

  • Config file (commitrocket.toml or [tool.commitrocket]), commitrocket doctor, per-run log files in the OS log folder, --report JSON summary, --notify / --notify-webhook.
  • Pre-commit (ruff + unit tests), integration pytest marker, GitHub workflows for lint, tests and PyPI release, user docs in the README and technical docs in docs/.

Before merging / releasing

  • The Tests workflow has not run on GitHub yet; the first run on this PR will show the Ubuntu 3.11-3.15, Windows and macOS jobs. The 3.15 job is allowed to fail while that version is a pre-release.
  • Releasing needs a PYPI_API_TOKEN repository secret and a pypi environment; the release workflow runs on v*.*.* tags and checks the tag against the package version (0.1.0).

Test plan

  • uv run ruff check .
  • Unit tests (pytest -m "not integration"), run by the pre-commit hook
  • Integration tests (pytest -m integration) against a local bare repository
  • CI matrix on GitHub
  • Manual run against a real remote with --use-lfs (not yet done)

Turn the commit_and_push script into an installable package (uv, hatchling)
with a `commitrocket` command and `commitrocket doctor`.

- Batch pending files by size (deterministic, sequential, soft) and commit and
  push each batch with live progress and an average-speed ETA.
- Git LFS support for large files: local-only rules by default, optional
  committed rules, configurable threshold, grouped uploads and thread settings.
- Reliability: dry run, push retries, resume after failure or interruption,
  stuck-commit detection, post-push verification, http.postBuffer tuning.
- Usability: config file, include/exclude patterns, remote/branch selection,
  no-push mode, commit message templates, JSON report and notifications.
- Per-run log files in the OS-standard log folder.
- Never commit the run's own log or report files.
- Tests (unit and marked integration), pre-commit, and GitHub workflows for
  lint, tests and PyPI release.
@coldsofttech coldsofttech self-assigned this Oct 24, 2026
@coldsofttech
coldsofttech merged commit 96e4b3f into main Oct 24, 2026
8 checks passed
@coldsofttech
coldsofttech deleted the feat/commitrocket-package branch October 24, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant