Skip to content

fix: suppress repeated transient git-sync tracebacks - #786

Open
ibrahimmaq14 wants to merge 1 commit into
OpenHands:mainfrom
ibrahimmaq14:fix/596-git-sync-log-throttling
Open

ibrahimmaq14 wants to merge 1 commit into
OpenHands:mainfrom
ibrahimmaq14:fix/596-git-sync-log-throttling

Conversation

@ibrahimmaq14

@ibrahimmaq14 ibrahimmaq14 commented Nov 21, 2026 •

Copy link
Copy Markdown

Fixes #596

Before this change, the periodic Git sync loop logged a full traceback every time a transient Git error recurred. The first three consecutive failures with the same sync destination, exception type, and normalized message now log full tracebacks. Starting with failure four, each cycle emits one warning with the organization, redacted repository URL, and failure count. Git Sync status still shows the latest error and its timestamp.

The fingerprint and count live on the existing organization sync row, so a restarted worker continues the streak. A changed error or destination starts a new streak. Success clears it and logs recovery. Transient retries still use the configured interval, and authentication failures still use their existing backoff. Cycle and logging code

Migration 041 adds two small fields for the fingerprint and count. Both fields have neutral defaults for existing rows. Putting the streak on the sync row keeps it out of the operator-visible error text and avoids rewriting the repository and credential overrides from the sync job. Migration

Verification

  • Reproduced the fourth-cycle traceback on upstream main. The focused regression run passed all nine selected tests after the fix.
  • Started a fresh Python process against the same SQLite database and observed the warning at failure five.
  • Verified migration 040 → 041 → 040 preserves existing errors and authentication streaks on SQLite and PostgreSQL.
  • Full Linux suite with coverage on Docker-backed services had 3,505 passes, 8 skips, and 80.82% coverage. Three workflow-script tests initially failed because Node was missing from the container's PATH. All three passed on rerun with Node available.
  • Linux pre-commit and Pyright passed. The Windows CI test selection had 105 passes and 26 skips. The wider Windows Git-sync sweep had 216 passes and three failures, all reproduced on unmodified upstream main (two symlink privilege errors and one SSH timeout fixture error).

AI disclosure

OpenAI Codex investigated the issue, implemented the fix and tests, ran the verification, and drafted this pull request.

Jev-Fast-Audit

⚡ Jev fast audit · estimates · 0.36s · commit 94a2587
Strongest signal: No primary concern selected.
Evidence: No primary concern to locate.
Coverage: complete supplied coverage; 14/14 hunks, 4/4 files.

All estimates and evidence
Estimate Likelihood / value Direct evidence
SQL injection 4.0% No direct hunk selected
Command injection 4.0% No direct hunk selected
Weakened authentication 3.0% No direct hunk selected
Weakened authorization 5.0% No direct hunk selected
Contract regression 15.0% F002H004 · openhands/automation/git_sync/loop.py:1254–1261
Data loss 9.0% No direct hunk selected
Sensitive data disclosure 8.0% No direct hunk selected
Unexpected data transfer 4.0% No direct hunk selected
Credential misuse 6.0% No direct hunk selected
Untrusted instruction authority 2.0% No direct hunk selected
Package source redirection 3.0% No direct hunk selected
Unverified remote execution 4.0% No direct hunk selected
Privileged environment access 4.0% No direct hunk selected
Security assessment bypass 4.0% No direct hunk selected
Prohibited workload 2.0% No direct hunk selected
Primary concern None selected; confidence 71.0% No primary concern to locate

@github-actions github-actions Bot added the type: fix A bug fix label Nov 21, 2026
@ibrahimmaq14
ibrahimmaq14 marked this pull request as ready for review November 24, 2026 10:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transient git-sync failures log a full exception every cycle; aggregate or rate-limit repeat failure logging per org/repo

1 participant