Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
|
||
| use crate::{auth, session::RecordingSession, store}; | ||
|
|
||
| const AUTOMATIC_PROBE_INTERVAL: Duration = Duration::from_secs(60 * 60); |
There was a problem hiding this comment.
Resolution limits expire between checks
Automatic checks run once an hour, but Measurement expires after 15 minutes. After a slow connection receives a resolution limit, recordings started between minutes 15 and 60 use the higher saved resolution, even if the connection has not changed.
Refresh before MEASUREMENT_TTL expires, or request a fresh check before starting Instant recording with an expired result.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/network_health.rs
Line: 15
Comment:
**Resolution limits expire between checks**
Automatic checks run once an hour, but `Measurement` expires after 15 minutes. After a slow connection receives a resolution limit, recordings started between minutes 15 and 60 use the higher saved resolution, even if the connection has not changed.
Refresh before `MEASUREMENT_TTL` expires, or request a fresh check before starting Instant recording with an expired result.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| if state.running.is_some() | ||
| || RecordingSession::recording_in_flight(cx) | ||
| || state | ||
| .attempted_at | ||
| .is_some_and(|at| at.elapsed().is_ok_and(|age| age < interval)) |
There was a problem hiding this comment.
Checks compete with background uploads
request() pauses checks during recording, but not during background uploads. The upload queue can resume saved recordings while RecordingSession is idle, so a check can send two 2 MiB samples alongside a real upload. This slows the upload and can produce a lower speed reading that unnecessarily reduces the next recording's resolution.
Include active queue transfers in the shared admission gate, including transfers that start after a check begins.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/src/network_health.rs
Line: 254-258
Comment:
**Checks compete with background uploads**
`request()` pauses checks during recording, but not during background uploads. The upload queue can resume saved recordings while `RecordingSession` is idle, so a check can send two 2 MiB samples alongside a real upload. This slows the upload and can produce a lower speed reading that unnecessarily reduces the next recording's resolution.
Include active queue transfers in the shared admission gate, including transfers that start after a check begins.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Thanks! Can you rebase on main to clear the conflicts and get Greptile to 5/5 on the latest commit? Then we'll take a look. |
5e0e18d to
3ac1bca
Compare
|
@richiemcilroy Rebased on latest |
| return put(key, bytes).pipe( | ||
| Effect.timeout("10 seconds"), | ||
| Effect.ensuring( | ||
| remove(key).pipe( | ||
| Effect.timeout("3 seconds"), |
There was a problem hiding this comment.
Timed-out probes leave objects behind
checkUploadStorage can leave probe objects behind when a storage write takes longer than 10 seconds. The S3 write runs through a promise without an abort signal, so the timeout stops waiting but does not stop the write. Cleanup can delete the key before the write finishes, leaving the completed object behind.
This is non-blocking, but slow or retrying storage connections can accumulate small probe objects. Wait for the write to settle before deleting, or arrange a later cleanup for timed-out writes.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/lib/upload-health.ts
Line: 55-59
Comment:
**Timed-out probes leave objects behind**
`checkUploadStorage` can leave probe objects behind when a storage write takes longer than 10 seconds. The S3 write runs through a promise without an abort signal, so the timeout stops waiting but does not stop the write. Cleanup can delete the key before the write finishes, leaving the completed object behind.
This is non-blocking, but slow or retrying storage connections can accumulate small probe objects. Wait for the write to settle before deleting, or arrange a later cleanup for timed-out writes.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Good catch, threaded Effect's AbortSignal into S3 putObject and Google Drive upload requests in 674e41f so timed-out probe writes abort before cleanup runs.
3ac1bca to
81e216b
Compare
|
Hi @richiemcilroy — just a quick heads-up that the follow-up Greptile point on |
Adds upload speed testing and storage write health checks across
apps/desktop-gpuiandapps/web.POST /api/desktop/upload-healthmeasures throughput against the active organization's recording storage target (S3 or Google Drive) using a temporary probe key under.cap-upload-health/that is deleted immediately after the check.On the desktop side,
apps/desktop-gpui/src/network_health.rsruns background probes every 10 minutes (pausing while active recordings or uploads hold aTransferLease), exposes a manual test button in General Settings and a status indicator in the recording window, and falls back from Instant Mode to Studio Mode when upload health is degraded or unverified.Fixes #73
/claim #73


Confidence Score: 5/5
The PR appears safe to merge; the remaining probe-cleanup issue is non-blocking.Findings
Fix with agent prompt
Summary
Adds upload checks to the GPUI desktop app and a matching authenticated API.
The refresh interval and background-upload fixes address the first two previous findings. No new actionable issues were found.
Reviews (3) · Last reviewed commit: "fix(desktop-gpui): refresh probes before..." · Reviewed by Greptile