{"id":50719734,"url":"https://github.com/git-fire/git-harness","last_synced_at":"2026-06-09T22:30:57.040Z","repository":{"id":351449227,"uuid":"1207675797","full_name":"git-fire/git-harness","owner":"git-fire","description":"Git Repository Management Library w/ Java and Python Interfaces","archived":false,"fork":false,"pushed_at":"2026-04-15T04:18:37.000Z","size":62,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-15T04:25:53.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/git-fire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-11T08:44:49.000Z","updated_at":"2026-04-14T07:36:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/git-fire/git-harness","commit_stats":null,"previous_names":["git-fire/git-harness"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/git-fire/git-harness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-fire%2Fgit-harness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-fire%2Fgit-harness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-fire%2Fgit-harness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-fire%2Fgit-harness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/git-fire","download_url":"https://codeload.github.com/git-fire/git-harness/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/git-fire%2Fgit-harness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34129072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-09T22:30:56.348Z","updated_at":"2026-06-09T22:30:57.035Z","avatar_url":"https://github.com/git-fire.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-harness\n\nGo library extracted from [git-fire](https://github.com/git-fire/git-fire): subprocess-oriented git helpers and small safety utilities.\n\n**Module:** `github.com/git-fire/git-harness`\n\n## Packages\n\n- **`git`** — repository scanning, status, commits, pushes, worktrees, and related helpers.\n- **`safety`** — redaction and secret-pattern scanning helpers used by git error paths.\n\n## Polyglot wrappers\n\nPython and Java clients use the same layout as [git-testkit](https://github.com/git-fire/git-testkit) under **`testkit/`**: build `cmd/git-harness-cli`, set **`GIT_HARNESS_CLI`** to that binary (or rely on `go run ./cmd/git-harness-cli` from the repo root). Code lives in `testkit/python` and `testkit/java`; runnable samples are `testkit/python/samples/` and the Java `Sample*Smoke` tests.\n\n## Requirements\n\n- Go **1.24**+ (see `go.mod`).\n- **`git`** on `PATH` for tests and runtime (package shells out to the git binary).\n\n## Development\n\n```bash\ngo build ./...\ngo vet ./...\ngo test -race -count=1 ./...\n```\n\n## Rewrite orchestration\n\nThe `git` package now includes bounded multi-pass rewrite orchestration via\n`RunRewriteScenario`, designed for flows that must:\n\n1. Detect whether intervention is needed.\n2. Intervene (run one rewrite pass).\n3. Verify the repo is clean.\n4. Rerun from detect until clean or attempts are exhausted.\n\nUse it for safety-first rewrite loops where you need deterministic stop\nconditions and pass-by-pass telemetry (`RewriteScenarioResult.Passes`).\n\n### Validate locally\n\n```bash\n# Targeted rewrite orchestration tests\ngo test -count=1 ./git -run RunRewriteScenario\n\n# Full module sanity\ngo test -count=1 ./...\n```\n\nExpected outcome:\n\n- Targeted run: `ok   github.com/git-fire/git-harness/git ...`\n- Full run: all packages return `ok` with no failing tests\n- If a rewrite loop never reaches clean within `MaxAttempts`, callers receive\n  `ErrRewriteAttemptsExceeded`\n\n## Stability\n\n`v0.x` releases may change APIs; pin a minor or patch version in consumers.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-fire%2Fgit-harness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgit-fire%2Fgit-harness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgit-fire%2Fgit-harness/lists"}