Skip to content

Harden git-bug sync workflow against transient failures - #3

Merged
yarikoptic merged 1 commit into
masterfrom
claude/gifted-brown-zxss4n
Sep 28, 2026
Merged

yarikoptic merged 1 commit into
masterfrom
claude/gifted-brown-zxss4n

Conversation

@yarikoptic-gitmate

Copy link
Copy Markdown
Collaborator

All 7 recent failures of "Sync git-bug issues from GitHub" (Aug 30 – Sep 24) fall into two transient classes; the other workflows are green.

1. Error: invalid parameter owner: (e.g. runs 35554884094, 36000366629)

git-bug bridge new (v0.10.1, bridge/github/config.go:validateUsername) validates --owner with an unauthenticated GET https://api.github.com/users/<owner> — --token isn't used for it. Shared runner IPs often exhaust the 60 req/h anonymous quota; the call returns non-200 and git-bug reports an empty owner.

Fix: retry bridge new up to 5×. Between attempts query /rate_limit (free); if the anonymous quota is exhausted wait for its reset (capped at 5 min), otherwise back off 30s·attempt. Nothing is persisted when that check fails, so retrying is safe.

2. git-bug: line 1: <!DOCTYPE html> (run 34963196357)

curl -sL without -f saved GitHub's HTML error page as the binary.

Fix: curl -fsSL --retry 5 --retry-all-errors plus sha256 verification of the pinned v0.10.1 binary.

Also

  • timeout-minutes: 30 on the sync job (normally < 1 min) so a wedged run can't hold the concurrency queue.
  • actions/checkout@v4 → @v5 in all workflows (Node.js 20 deprecation warning).

Testing

  • Extracted step scripts pass shellcheck; workflow YAML parses.
  • Retry loop exercised locally with a stubbed git-bug (fail→fail→succeed; always-fail → exit 1 after 5 attempts; simulated exhausted quota → waits for reset).
  • Install step verified against the real release asset; a wrong checksum fails the step.

Residual risk: if a runner IP stays rate-limited for >~15 min the run still fails, but the next hourly run catches up. A proper upstream fix would be for git-bug to authenticate validateUsername.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vcf1sCLxS4sABQXeYiGJen


Generated by Claude Code

All 7 recent "Sync git-bug issues from GitHub" failures fall into two
transient classes:

- "Error: invalid parameter owner: " (Sep 5 x3, Sep 20, Sep 24):
  `git-bug bridge new` validates --owner with an *unauthenticated*
  GET api.github.com/users/<owner> (--token is not used for it).  On
  shared runner IPs the 60 req/h anonymous quota is often exhausted,
  the call returns non-200 and git-bug reports an empty owner.
  Retry up to 5 times; when /rate_limit shows the anonymous quota is
  exhausted, wait for its reset (capped at 5 min), else back off.

- "git-bug: line 1: <!DOCTYPE html>" (Sep 15 x2): `curl -sL` without
  -f saved GitHub's HTML error page as the binary.  Use `curl -f` so
  HTTP errors fail the download (with --retry) instead of producing a
  bogus binary, and verify a pinned sha256 of the v0.10.1 release
  binary to catch any other truncated/garbled download.

Also cap the job at 30 min: a run normally takes well under a minute;
the cap leaves room for the rate-limit waits in "Configure bridge" but
stops a wedged run from blocking the concurrency queue for hours.

Bump actions/checkout to v5 in all workflows to drop the Node.js 20
deprecation warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vcf1sCLxS4sABQXeYiGJen
@yarikoptic
yarikoptic merged commit 5721a09 into master Sep 28, 2026
5 checks passed
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.

3 participants