Repository navigation
Description
Problem
Since the move to OpenShell 0.1.2 (#7233), e2e fails intermittently in TestAdminInstallUninstall at the triage run's pre-flight check:
• Checking GitHub API connectivity from sandbox
✗ GitHub API unreachable from sandbox
Error: pre-flight connectivity check: GitHub API connectivity check failed (exit 1):
... Get "https://api.github.com/rate_limit": EOF
Sandbox creation and bootstrap succeed just before it. Seen at least three times on 2026-09-30, one of which removed a PR from the merge queue:
- merge-queue run 36702113213
- run 36703682265
- run 36706250060
The same failure also hit the #7847 run on 2026-09-29.
What the logs show
The sandbox log (collected under output/fs-tri-*/logs/openshell-sandbox.log) of the failing run has no event for api.github.com. In passing runs of the same check, the sandbox logs three lines at that moment:
CONFIG:PUBLISHED Policy DNS mapped api.github.com resolved=140.82.x.x synthetic=198.18.0.2 ports=443
NET:OPEN ALLOWED /usr/bin/gh(0) -> api.github.com:443 [policy:_provider_github_ro engine:opa]
HTTP:GET ALLOWED GET http://api.github.com:443/rate_limit [policy:_provider_github_ro engine:l7]
In the failing run none of them appear, not even the Policy DNS mapping, and the gateway log has no warnings or errors. The connection is dropped before OpenShell 0.1's policy DNS maps the host, so gh sees EOF. That matches upstream ai-openshell/openshell#3577: a request to a hostname that is not (yet) in the policy DNS map terminates the connection instead of getting a clean denial. OpenShell 0.0.116 had no policy DNS layer, so this is new with the migration.
Why it isn't retried
internal/cli/preflight_github.go retries the check twice (after 2 s and 5 s), but isRetryablePreflightGitHubFailure only treats HTTP 403, connection refused and timed out as retryable. EOF falls through to non-retryable, so the run fails on the first attempt; the failing log has no attempt 1/3 … retrying line.
Proposed fix
- Treat a connection-level
EOFandconnection reset by peeras retryable inisRetryablePreflightGitHubFailure, and give them a retry reason inpreflightGitHubRetryReason. A fresh attempt re-resolves through the policy DNS, and the existing 2 s / 5 s delays should cover a transient miss. - Add unit tests: the observed output (
Get "https://api.github.com/rate_limit": EOF) retries,connection reset by peerretries, and 401/404 still do not.
This mitigates the transient case only. If the policy DNS mapping never succeeds, the check still fails after three attempts with the same diagnostic, which is the right outcome.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fullsend-ai-triage commentedon Sep 30, 2026
🤖 Finished Triage · ✅ Success · Started 11:32 AM UTC · Completed 11:35 AM UTC
Commit:
ec88ac7· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $0.33
fullsend-ai-triage commentedon Sep 30, 2026
This report is exceptionally well diagnosed. Fetching internal/cli/preflight_github.go from main confirms the described gap: isRetryablePreflightGitHubFailure currently checks only for 403/Forbidden, connection-refused, and timeout substrings, with no case for a bare EOF or connection-reset-by-peer, so the failure mode described here does fall through to the non-retryable path exactly as hypothesized.
A search of open issues and PRs for preflight-related and EOF/connection-reset keywords found no duplicate report and no in-flight PR already addressing this — #6855 (which added the original retry scaffold this issue extends) and the referenced OpenShell 0.1 migration work (#7233, #7847) are both already merged, so there's nothing blocking a fix from starting now.
Given the proposed fix is scoped to a pure function with existing unit-test infrastructure (fake sleep/exec hooks), this should be a small, low-risk, well-contained change.
Labels: Matches the established labeling pattern for this exact check (see #6855, #6853, #4016): a confirmed defect in the OpenShell sandbox pre-flight connectivity path.
Next steps:
/fs-code— agent creates a PR to implement this issue/fs-code <your instruction>— agent implements with your specific guidancefullsend-ai-coder commentedon Sep 30, 2026
🤖 Finished Code · ❌ Failure (pre-flight connectivity check: GitHub API connectivity check failed (exit 1): Get "https://api.github.com/rate_limit": EOF) · Started 11:37 AM UTC · Completed 11:38 AM UTC
Commit:
ec88ac7· View workflow run →Runtime: pi · Model: xai/grok-4.6 · Effort: high
waynesun09 commentedon Sep 30, 2026
/fs-code
Do not add a
Signed-off-bytrailer to commits (nogit commit -s); agent commits are DCO-exempt and the post-code guard rejects the trailer.The previous code run (36709501273) failed at this exact pre-flight check (
Get "https://api.github.com/rate_limit": EOF), so this bug also hits production agent runs, not only e2e. Retrying.Scope, per the issue:
internal/cli/preflight_github.go, makeisRetryablePreflightGitHubFailuretreat a connection-levelEOF(for exampleGet "https://api.github.com/rate_limit": EOF) andconnection reset by peeras retryable. Give them a matching reason inpreflightGitHubRetryReason. Keep 401/404 and other auth/config failures non-retryable.internal/cli/preflight_github_test.go: the exact observed EOF output retries,connection reset by peerretries, and 401 and 404 still don't retry.fullsend-ai-coder commentedon Sep 30, 2026
🤖 Finished Code · ✅ Success · Started 11:41 AM UTC · Completed 11:53 AM UTC
Commit:
ec88ac7· View workflow run →Runtime: pi · Model: xai/grok-4.6 · Effort: high · Cost: $3.27
fix(#7862): anchor the pre-flight EOF match and explain a persistent EOF
fix(#7862): retry GitHub preflight on EOF and reset
fix(#7862): anchor the pre-flight EOF match and explain a persistent EOF
Merge pull request fullsend-ai#7865 from fullsend-ai/agent/7862-prefl…