Skip to content

Lab fetch: HTTP/1.1, fail fast on a stalled connection, retry network errors - #3

Merged
thinkinginmath merged 1 commit into
mainfrom
fix/lab-fetch-network
Sep 19, 2026
Merged

thinkinginmath merged 1 commit into
mainfrom
fix/lab-fetch-network

Conversation

@thinkinginmath

Copy link
Copy Markdown
Collaborator

On macOS, the first real run of the scimigo.com lab panel hit this in /labs/prepare. It waited a long time, then failed:

git fetch failed: fatal: unable to access 'https://github.com/SciMigo/restate-durable-agent-demo/': Error in the HTTP2 framing layer

That's git's HTTP/2 failing through a proxy or VPN.

  • HTTP/1.1 for the lab fetch (-c http.version=HTTP/1.1); a shallow fetch is no slower that way.
  • Stall detection: http.lowSpeedLimit=1000 and http.lowSpeedTime=30, so a dead connection fails in about 30 s instead of at the timeout. The per-command timeout drops from 300 s to 180 s.
  • Retries: network failures get up to 3 attempts, after 2 s and then 5 s. A missing commit or repository fails immediately.
  • Clearer error: the final message says how many attempts were made and to check that the computer can reach the host, e.g. through its proxy or VPN. Messages name the git subcommand.

Tests cover: the HTTP/1.1 and stall settings; two framing errors then success; giving up after three with the new message; and a missing commit not being retried. 171 passed; ruff, format and mypy clean. A real fetch of SciMigo/restate-durable-agent-demo@e7bdf44 with these settings took 0.2 s.

Workaround until this is released: start the runtime with GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=http.version GIT_CONFIG_VALUE_0=HTTP/1.1.

🤖 Generated with Claude Code

… errors

Reported from macOS on 2026-09-19. /labs/prepare waited a long time, then failed with
"git fetch failed: fatal: unable to access 'https://github.com/SciMigo/restate-durable-agent-demo/':
Error in the HTTP2 framing layer", a known git failure when HTTP/2 goes through some proxies and
VPNs.

- The fetch runs with http.version=HTTP/1.1; a shallow fetch is no slower that way.
- http.lowSpeedLimit=1000 / lowSpeedTime=30: under 1 KB/s for 30 s counts as stalled, so a dead
  connection fails in half a minute instead of at the timeout. The per-command timeout is now
  180 s.
- Network failures are retried up to 3 times (after 2 s, then 5 s). A missing commit or
  repository ("not our ref", "couldn't find remote ref", not found, credentials asked) fails at
  once.
- The final error says how many attempts were made and to check that the computer can reach the
  host, e.g. through its proxy or VPN.
- Error messages name the git subcommand, not "-c".

Tests: HTTP/1.1 and stall settings on the fetch, two framing errors then success, giving up
after three with the new message, and a missing commit not retried. 171 passed; ruff, format and
mypy clean. Fetching SciMigo/restate-durable-agent-demo@e7bdf44 from GitHub with these settings
took 0.2 s.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@thinkinginmath
thinkinginmath merged commit a112d80 into main Sep 19, 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.

1 participant