You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(updater): a check's tag fetch gets five minutes, not the 30 s of an ordinary git command - #5080
Fixes part of #5056 (cause 2: the tag fetch timeout).
What happened
A check for updates fetches the release tags with git fetch --no-tags origin '+refs/tags/v*:refs/tags/v*' through the updater's ordinary git(), which kills any command after 30 s. On a shallow source checkout the first such fetch brings every newer release's objects, which takes longer than that on a slow link, so the check failed with "git timed out" every time until the user ran the fetch by hand. The unshallow fetch already had its own 10-minute bound for the same reason (#1252); the tag fetch did not.
Fix
The tag fetch goes through its own tagFetch with a five-minute bound (TAG_FETCH_TIMEOUT_MS); every other git command keeps 30 s. Two test fixtures that paused or failed the tag fetch by matching its arguments in git() now override tagFetch.
Not changed
Cause 1 (a detached, shallow tag checkout of a standalone install is refused with "Switch the source checkout to main to update.") is the documented policy for a non-plugin checkout and is left as is; the issue's workaround (git switch -c main) remains the path.
Verification
Real repro with a git wrapper on PATH that sleeps 35 s before every fetch, against a real upstream with a newer v0.2.0 tag:
main: check after 30 s: {"error":"git timed out","available":false}
this branch: check after 35 s: {"error":null,"available":true,"latest_version":"0.2.0"}
New test "gives a check's tag fetch five minutes" fails on main, passes here; server/updater.test.ts 57/57.
bun run check fast: typecheck and build ok; unit tests had one failure in tui/testing/entry-pty.test.ts (a 15 s flood deadline under load, unrelated to this change), which passes 24/24 when run alone.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Bug Fixes
Update checks now allow up to five minutes to fetch release tags, instead of timing out after 30 seconds. This helps checks complete when tag downloads are slow, including when discovering releases from a shallow checkout, and reduces “git timed out” failures. Other fetch behavior remains unchanged.
Release-tag discovery now uses a dedicated tag-fetch method with a five-minute timeout. Tests cover timeout use and cancellation behavior, and the changelog records the timeout change.
Changes: Release tag fetching
Layer / File(s)
Summary
Tag-fetch timeout and discovery server/updater.ts, server/updater.test.ts, changelog.d/updater-slow-tag-fetch.md
The updater routes tag discovery through tagFetch, which uses a five-minute timeout. Tests cover timeout use and cancellation. The changelog records the change.
devswha/ovis issue 5056: The change addresses the reported 30-second tag-fetch timeout on shallow checkouts, but does not address the separate detached-HEAD refusal.
Merge Risk: Minimal · previous review 9db01
Update checks that download release tags on a shallow checkout get five minutes instead of 30 seconds, so they no longer fail with "git timed out". Other git commands keep their existing timeout. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the check's release-tag fetch now gets a five-minute timeout instead of the 30 s limit for ordinary git commands. The changeset matches this (new tagFetch with TAG_FET…
Description check
The description follows the template. It has a Change section that states the problem (tag fetch killed by the 30 s git timeout on shallow checkouts), the resulting behavior, and the fix. It also has …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the check's release-tag fetch now gets a five-minute timeout instead of the 30 s limit for ordinary git commands. The changeset matches this (new tagFetch with TAG_FETCH_TIMEOUT_MS, test updates).
Full details: Description check
Explanation
The description follows the template. It has a Change section that states the problem (tag fetch killed by the 30 s git timeout on shallow checkouts), the resulting behavior, and the fix. It also has a Validation section listing the commands run, their results, and an unrelated failing test. It mentions the issue link (#5056) and a partial fix. The Change section does not link a maintainer-agreed issue, but this is a fix, not a feature, so the template does not require it.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between ed5c9aa and 9db0107.
Files selected for processing: 3
changelog.d/updater-slow-tag-fetch.md
server/updater.test.ts
server/updater.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
Review round (omo gate + Codex via axwith), fixed in the commit above:
MEDIUM (both reviewers): cancelling an install while its check's tag fetch is in flight left the fetch running for up to five minutes and then reported the git error. cancel() now ends a tag fetch in flight (its own abort signal, not the updater's shutdown one), the run reports update_cancelled and keeps the offered revision from installing by itself; a tag fetch that starts after the cancel keeps the ordinary 30 s bound. A cancel that comes before the fetch still lets the check finish, so the offer stays shown (the existing "stops an install cancelled while it still checks" test).
LOW (both): the timeout test now checks that the five-minute deadline is set by the tag fetch itself, not only that one exists somewhere.
New test "ends a check's tag fetch in flight when its install is cancelled" uses a git whose tag fetch never ends; it times out on the previous head and passes here.
Not changed: a stalled fetch on the timer's own check still holds the next 5-minute tick (LOW, unchanged in kind from main's 30 s). The CI failure on the previous head was key-bar-pinned-history-regression.ts, the flake #5073 addresses, not this change.
…UI retries a failed terminal list, a newly waiting agent shows through the resting fold (#5092)
Three bug fixes from the issue triage, bundled to cut CI reruns (each
already passed its own review round on its own PR; this PR adds no code
of its own).
- #5056: an update check's tag fetch gets five minutes (was #5080)
- #4493 item 6: the native TUI retries a failed terminal list read while
Online (was #5083)
- #3439 items 1-2: a newly waiting agent shows through the resting fold;
a short phone's row sheet stays usable (was #5091)
The combined diff is exactly the sum of the three branches: the same 16
files, each byte-identical to its original branch tip (checked file by
file).
Addresses #5056 (cause 2; cause 1 is kept as documented policy), items
1-2 of #3439 and item 6 of #4493; no closing keywords, since #4493 and
#3439 keep other items open. #5056 is closed by hand after the merge.
---
## #5056: updater tag fetch timeout (was #5080)
Fixes part of #5056 (cause 2: the tag fetch timeout).
### What happened
A check for updates fetches the release tags with `git fetch --no-tags
origin '+refs/tags/v*:refs/tags/v*'` through the updater's ordinary
`git()`, which kills any command after 30 s. On a shallow source
checkout the first such fetch brings every newer release's objects,
which takes longer than that on a slow link, so the check failed with
"git timed out" every time until the user ran the fetch by hand. The
unshallow fetch already had its own 10-minute bound for the same reason
(#1252); the tag fetch did not.
### Fix
The tag fetch goes through its own `tagFetch` with a five-minute bound
(`TAG_FETCH_TIMEOUT_MS`); every other git command keeps 30 s. Two test
fixtures that paused or failed the tag fetch by matching its arguments
in `git()` now override `tagFetch`.
### Not changed
Cause 1 (a detached, shallow tag checkout of a standalone install is
refused with "Switch the source checkout to main to update.") is the
documented policy for a non-plugin checkout and is left as is; the
issue's workaround (`git switch -c main`) remains the path.
### Verification
- Real repro with a `git` wrapper on PATH that sleeps 35 s before every
`fetch`, against a real upstream with a newer `v0.2.0` tag:
- main: `check after 30 s: {"error":"git timed out","available":false}`
- this branch: `check after 35 s:
{"error":null,"available":true,"latest_version":"0.2.0"}`
- New test "gives a check's tag fetch five minutes" fails on main,
passes here; `server/updater.test.ts` 57/57.
- `bun run check fast`: typecheck and build ok; unit tests had one
failure in `tui/testing/entry-pty.test.ts` (a 15 s flood deadline under
load, unrelated to this change), which passes 24/24 when run alone.
### Review round
Review round (omo gate + Codex via axwith), fixed in the commit above:
- MEDIUM (both reviewers): cancelling an install while its check's tag
fetch is in flight left the fetch running for up to five minutes and
then reported the git error. `cancel()` now ends a tag fetch in flight
(its own abort signal, not the updater's shutdown one), the run reports
`update_cancelled` and keeps the offered revision from installing by
itself; a tag fetch that starts after the cancel keeps the ordinary 30 s
bound. A cancel that comes before the fetch still lets the check finish,
so the offer stays shown (the existing "stops an install cancelled while
it still checks" test).
- LOW (both): the timeout test now checks that the five-minute deadline
is set by the tag fetch itself, not only that one exists somewhere.
- New test "ends a check's tag fetch in flight when its install is
cancelled" uses a git whose tag fetch never ends; it times out on the
previous head and passes here.
Not changed: a stalled fetch on the timer's own check still holds the
next 5-minute tick (LOW, unchanged in kind from main's 30 s). The CI
failure on the previous head was `key-bar-pinned-history-regression.ts`,
the flake #5073 addresses, not this change.
updater tests 58/58, typecheck ok.
---
## #4493 item 6: TUI terminal list retry (was #5083)
Fixes item 6 of #4493 (`tui/core/world.ts`: retry a failed terminal list
read while the link stays Online). The other items of #4493 are
untouched.
### What happened
In the native TUI, `CoreWorld` reads `terminal.list` once after a
change. When that read failed while the link stayed Online, nothing
asked again: the screen kept the old terminal list (a new terminal
stayed missing) until another change, a snapshot or a reconnect.
`world.test.ts` pinned that behavior.
### Fix
- A failed read while Online is retried after 250 ms, 500 ms and 1 s
(`TERMINAL_LIST_RETRY_MS` in `tui/model/deadlines.ts`), through the
loop's one timer as a `terminal_list` deadline; after the last one the
world waits for the next change, whose own read gets the same backoff
again.
- A snapshot, or the link leaving Online, drops the read in flight and
any retry due; a newer read for a change replaces a retry due.
- `readCore()` reads only while the link is Online.
### Verification
- New `tui/loop-terminal-list.test.ts` (fake core, fake clock, no
sleeps): a failed read shows the added terminal 250 ms later without
another event; a persistently failing list backs off 0/250/750/1750 ms
and stops, then a new change's failed read is retried at +250 ms; a
newer read supersedes the retry; no read while Offline and none extra
after reconnect. The first two fail on main (`0 pass, 4 fail` over two
runs). Removing the Online guards makes the Offline test fail. 3
consecutive runs green.
- `tui/core/world.test.ts` updated from pinning no retry to the retry.
- `bun run check fast` at the second commit: unit: 1367 test files unit:
28059 pass, 0 fail, 276 skip in 1367 files, 8 at a time, 262.3s;
typecheck, build and the other steps ok.
### Reviews
omo gate and Codex (via axwith, gpt-6.2-sol-fast xhigh) on `aa5f96180c`
both found the production change correct (no offline reads, no stale
answers applied, no timer spin) and flagged the Offline test for
checking the earliest timer of any kind (a repaint can be due first).
Fixed in the second commit: it now checks list reads while Offline; the
backoff test also covers a fresh read failing after the backoff (Codex
LOW).
---
## #3439 items 1-2: sidebar waiting row and row sheet (was #5091)
Fixes items 1 and 2 of #3439. Items 3-5 of that issue are done or
already decided there.
### What happened
1. With "Waiting first", a resting agent that started waiting while
focus was in the Agents section stayed hidden under the closed "+N
resting" line, because the list holds its order while focus is there.
2. On a short phone (375x500), a long agent title or workspace path made
the row menu sheet's header take the whole height: the actions got 0 px
and Cancel sat off screen.
### Fix
1. While the order is held, a newly waiting row shows through the closed
resting line in its held place (as the selected row already does), and
"+N resting" counts the rows still folded. If the focused "+N resting"
line disappears because its last row started waiting, focus moves to the
row that takes its place (or the Agents heading), so the hold still ends
when focus leaves.
2. `.row-sheet-head` is capped at 30vh and scrolls; the reason and token
parts inside it no longer scroll on their own (no nested scrollers).
When the header overflows it becomes a keyboard-focusable region (Tab
reaches it, arrows scroll it); the sheet still opens on its first
action.
Changes what the sidebar shows (item 1), so the screenshots are below;
DESIGN.md is updated.
### Before / after
Row menu sheet, 375x500, a long agent title:
| Before (main) | After |
|---|---|
|

|

|
Keyboard: Tab now reaches the scrolling header (focus ring):
| Before | After |
|---|---|
|

|

|
Sidebar 1280x800: a resting agent starts waiting while focus is in
Agents:
| Before (main) | After |
|---|---|
|

|

|
### Verification
- 375x500 measurement: before, header 393 px, actions 0 px, Cancel at
462-506 px (off screen); after, header 150 px, actions 96 px, Cancel at
435-479 px.
- `AgentSidebar.test.tsx`: the old test that pinned the hidden row now
expects it shown; a new test focuses the "+N resting" button itself and
checks focus stays in the list and the hold ends when focus leaves
(fails before). A touch test's held order and the "+N resting" count
changed deliberately with item 1.
- `scripts/sidebar-tokens-demo-regression.ts`: the 375x500 cases check
the actions and Cancel are hit-testable, and that Tab reaches the header
and ArrowDown scrolls it (fails on the first commit; `overflow-y:
hidden` fails it too).
- Sidebar and row menu tests 64/64 after merging main, typecheck ok;
`bun run check fast` green on the first commit.
### Reviews
omo gate and Codex (via axwith, gpt-6.2-sol-fast xhigh) on ec232a4:
both confirmed the two fixes and flagged two keyboard regressions (focus
lost with the disappearing "+N resting" line; the scrolling header
unreachable by Tab), fixed in bdeacd8. Left as is: a 320x150 viewport
(400% zoom) still leaves no room for the actions (it had none before
either), and the demo regression does not check which element scrolls
when a wheel starts over the reason or tokens.
---------
Co-authored-by: sisyphus-dev-ai <[email protected]>
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
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.
Fixes part of #5056 (cause 2: the tag fetch timeout).
What happened
A check for updates fetches the release tags with
git fetch --no-tags origin '+refs/tags/v*:refs/tags/v*'through the updater's ordinarygit(), which kills any command after 30 s. On a shallow source checkout the first such fetch brings every newer release's objects, which takes longer than that on a slow link, so the check failed with "git timed out" every time until the user ran the fetch by hand. The unshallow fetch already had its own 10-minute bound for the same reason (#1252); the tag fetch did not.Fix
The tag fetch goes through its own
tagFetchwith a five-minute bound (TAG_FETCH_TIMEOUT_MS); every other git command keeps 30 s. Two test fixtures that paused or failed the tag fetch by matching its arguments ingit()now overridetagFetch.Not changed
Cause 1 (a detached, shallow tag checkout of a standalone install is refused with "Switch the source checkout to main to update.") is the documented policy for a non-plugin checkout and is left as is; the issue's workaround (
git switch -c main) remains the path.Verification
gitwrapper on PATH that sleeps 35 s before everyfetch, against a real upstream with a newerv0.2.0tag:check after 30 s: {"error":"git timed out","available":false}check after 35 s: {"error":null,"available":true,"latest_version":"0.2.0"}server/updater.test.ts57/57.bun run check fast: typecheck and build ok; unit tests had one failure intui/testing/entry-pty.test.ts(a 15 s flood deadline under load, unrelated to this change), which passes 24/24 when run alone.