Repository navigation
fix: recover Forge updater transport failures - #221
Merged
Merged
Conversation
commit: |
Contributor
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 168.7 ms | 2.8 ms | 162.2 ms | 172.7 ms |
| base | 177.1 ms | 9.8 ms | 166.4 ms | 195.2 ms |
Δ (PR vs base): ↓ -8.4 ms (-4.7%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
Contributor
|
LGTM |
edmundhung
approved these changes
Oct 6, 2026
edmundhung
left a comment
Member
There was a problem hiding this comment.
Looks good to me. I wonder if the retry logic is needed. But there's no harm including it anyway. 👍🏼
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Forge updater can push a generated update successfully and then fail to create its PR with only
fetch failedin the log, as seen in this updater run.Run subprocesses asynchronously through
tinyexecso HTTP socket events and idle timers can run during long builds. Explicitly preserve omitted environment variables becausetinyexecotherwise merges parent credentials back into sanitized Forge environments. Install the updater's dependencies before starting it, and report GitHub request methods, paths, and nested error causes/codes without dumping credential-bearing objects.Transient transport failures get up to three attempts with 1s/2s backoff and a 30s timeout per request. Reads and PR field updates can be repeated directly. After a failed PR creation request or response body read, look up the open PR for the managed branch before sending another POST; update the existing PR if creation succeeded despite the lost response. Reconcile the final failed attempt as well. Authentication, validation, certificate, and caller cancellation failures stop immediately.
Validation:
node --test scripts/update-forge.test.ts— 18 tests pass, covering retries, lost creation responses, response body failures, credential-safe diagnostics, and asynchronous subprocess arguments/cwd/env/failures, including a child-process check that stripped credentials stay absent.tsgocheck for the updater and its tests passes.pnpm checkpasses.node scripts/update-forge.ts --checksucceeds against GitHub without changing the update branch or PR.