Repository navigation
test(desktop-gpui): run the real app through Instant crashes, cancels and recovery in CI - #3109
Merged
Merged
Conversation
…ls and recovery against the mock server
Member
Author
|
hey @greptileai, please re-review the PR |
… cancelled start, and kill apps a failed case leaves running
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
marked this pull request as ready for review
October 24, 2026 15:40
…ts kill and hold the sweep to it
Member
Author
|
hey @greptileai, please re-review the PR |
…tory, and on fork changes only when they touch Instant code
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
changed the base branch from
fix/gpui-instant-crash-recovery
to
main
October 24, 2026 19:27
This branch was successfully deployed
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.
Instant mode's worst failures happen in the real app, across process deaths: a crash during start or capture, a start stopped while it is still in flight, a recovery on the next launch. The unit and mock-server tests cover each piece in isolation; nothing ran the whole app through them. This adds a suite that does, and a macOS job that runs it on every pull request touching the Instant path and nightly.
Builds on #3106.
flowchart LR T[cargo test real_app --ignored] --> M[MockCap on 127.0.0.1] T --> S["Sandbox: store pointing at the mock,<br/>own recordings and logs"] S --> A[Built cap-gpui binary] A -- "create, presign, segments,<br/>recording-complete, delete" --> M T -- "kill -9, relaunch,<br/>CAP_GPUI_AUTO_RECORD / AUTO_RECOVER" --> A T --> C["Check the mock's created, deleted and stored objects,<br/>and the sandbox's projects and journal"]Cases (
apps/desktop-gpui/src/upload/real_app_tests.rs)real_app_instant_recording_uploads_and_verifies: a normal recording reachesVerified, the mock holds its confirmation, nothing is deleted and the cleanup journal is empty.real_app_crashes_never_delete_a_recording_with_media: kills the app at 8 points, from the server video's creation through the first seconds of capture, noting each recording's folder and media right after its kill, then ages the leftovers and relaunches. A recording that held media keeps its folder, its media and its server video, and every crashed recording that held none in a folder still in progress has its server video deleted.real_app_recovered_recording_uploads: kills the app after four finished segments, relaunches withCAP_GPUI_AUTO_RECOVER=1, and requires the recovered recording to verify under the same video id with its segments stored.real_app_cancelled_start_deletes_its_video: stops a recording while its start is in flight. The server video it created is deleted and no project or journal entry is left.They are
#[ignore]d because they need a built app and screen recording permission:CAP_GPUI_REAL_APP_BIN=target/debug/cap-gpui \ cargo test --bin cap-gpui real_app -- --ignored --test-threads=1CAP_GPUI_REAL_APP_ARTIFACTSkeeps each sandbox (app logs, recordings, journal). If the app does not reach a step in time, its threads are sampled intohang-sample.txtbefore the test fails, so a hang can be diagnosed from the job's artifacts.Mock server
MockCapnow records the video ids it creates and deletes (created(),deleted()), so a test can tell which recording's video was removed.CI (
.github/workflows/instant-reliability.yml)verify-recording.ymldoes (the start chime plays before capture begins).

Confidence Score: 5/5
The changes since the previous review appear safe to merge.Summary
This revision restores the workflow’s own path trigger and adds a small job that decides whether to run the macOS suite.
All supplied previous threads were unnumbered and manually resolved by
richiemcilroywithout explanatory replies. The current code counts unfinished media, retries missed cancellations, stops child apps on drop, and removes the accessor comments.Reviews (5) · Last reviewed commit: "ci: run the Instant reliability job on i..." · Reviewed by Greptile