Introducing a new way to review your PRs.

Read the announcement

capsoftware / cap

Open source Loom alternative. Beautiful, shareable screen recordings.

View on GitHub

31 documents · Updated Nov 23, 2026

docs / build-and-release-automation

Build and release automation

Cap's automation turns source changes into checked builds and user-facing releases for the web service, media server, desktop app, Chrome extension, and status app. GitHub Actions scopes work to affected areas, validates product behavior on supported platforms, and publishes only artifacts that pass their platform checks. The desktop packaging and delivery path has more detail in Desktop build and distribution. Recording and media checks have more detail in Recording and media verification.

Automation boundaries

GitHub Actions is the control layer for repeatable validation and delivery. Workflows use event and path scope to avoid unrelated work, while merge-queue runs re-apply those path rules to the queued change because GitHub does not apply pull-request path filters in the queue.

AreaSystem aimMain output or signal
Pull request and main validationFind source, platform, migration, self-hosting, media, profile, status-app, and delivery regressionsPassing checks
Merge queueMake every workflow that declares queue support part of the queued commit's gateOne queue verdict
Engine and capture verificationCheck playback, export, recording, editing, captions, and real capture against expected resultsRequired verification verdicts and reports
Desktop reliabilityCheck the real GPUI app on supported desktop sessions and display systemsPlatform results and evidence
Performance analysisCompare risky changes with a base revision on controlled machinesBudget, benchmark, or profile reports
Desktop releaseBuild, check, sign, and publish supported desktop packagesStable or nightly release assets
Web and media containersBuild CPU-specific images and join them into one image tagMulti-architecture registry manifests
Browser and status clientsValidate and deliver the Chrome extension and status appStore package or passing status-app build
Service and data validationCheck self-hosting, profile, billing, upload, and migration contractsIntegration and deployment signals

Merge queue coordination

The merge queue workflow is the final waiter for queued changes. It checks the queue helper on pull requests, then waits for all queue-aware workflows on the queued commit and fails when one fails. This lets a new queue-aware workflow become a merge gate without a separate ruleset change (.github/…/merge-queue.yml).

Each queue-aware workflow has a small scope job that compares the queue base and head. The job enables the main work only when the queued change touches that workflow's normal input paths. This preserves the speed of path-aware checks without allowing a queue run to skip a needed validation.

References: .github/…/merge-queue.yml• L1-46 .github/…/ci.yml• L1-43 .github/…/arch-package.yml• L14-42 .github/…/recording-reliability.yml• L33-62

Validation gates

Validation protects contracts that cross package, platform, service, and data boundaries. The main CI workflow runs shared web, mobile, iOS, format, and type checks, then enables Rust, GPUI, patch, or iOS work when its change detector finds a related change (.github/…/ci.yml).

Change-aware checks

The change detector groups files into Rust, GPUI desktop, GPUI patch, and iOS areas. The resulting jobs cover Apple Silicon macOS, Windows, and Linux desktop builds; Intel macOS remains a nightly and release target. iOS changes enable CapKit tests and an iOS simulator build.

The desktop gate checks build preparation, native dependencies, the GPUI app, kernel and glass crates, and Linux package preparation. Rust changes also enable platform lint and desktop regression checks. GPUI patch changes enable device-backed tests on macOS, Windows, and Linux. This keeps a desktop change tied to both compilation and the platform behavior it can affect.

The shared checks keep JavaScript types, generated web types, formatting, workspace tools, the recorder SDK, render-farm paths, Chrome extension tests, and selected web clients usable. The status app has its own locked-dependency test and production-build gate.

References: .github/…/ci.yml• L20-87 .github/…/ci.yml• L89-163 .github/…/ci.yml• L165-238 .github/…/ci.yml• L254-312 .github/…/ci.yml• L313-410 .github/…/ci.yml• L418-488 .github/…/status.yml• L20-59

Engine verification

Engine verification is an oracle-based gate for playback, export, recording, editing, and captions. It plans only the suites that changed code can affect, then selects a FAST or FULL tier from the change risk, pull request state, merge queue, and scheduled-run context.

The platform matrix runs the selected suites on the platforms where they matter. The final gate checks both the platform results and the planned-case floor, so an incomplete run cannot look like a passing verification.

References: .github/…/engine-verify.yml• L1-14 .github/…/engine-verify.yml• L68-79 .github/…/engine-verify.yml• L160-214 .github/…/engine-verify.yml• L236-314

Audio and video synchronization

The A/V sync workflow checks timestamp, encoder, muxer, playback, export, audio, and recording behavior with controlled inputs. Synthetic cameras, screens, and microphones cover frame-rate, sample-rate, channel, jitter, drop, and gap cases without physical hardware.

The matrix runs on macOS, Windows, and Linux. Windows installs a verified virtual audio device so loopback checks reach a real audio endpoint. A final step turns a reported synthetic-matrix failure into a failed job even when the matrix continues long enough to publish all findings.

References: .github/…/sync-tests.yml• L1-12 .github/…/sync-tests.yml• L14-43 .github/…/sync-tests.yml• L84-110 .github/…/sync-tests.yml• L173-214 .github/…/sync-tests.yml• L283-359

Recording and media contracts

Recording reliability checks the contracts between the desktop recorder, web service, media server, storage, playback, sharing, and recovery. It runs focused suites when recording, media, database, or related web code changes, so a source change cannot silently break ownership or preservation of recorded output.

The media-server image workflow adds a second boundary check. It checks audio metric alignment, builds both the Railway and standalone images, runs media and transfer suites inside the production image, checks non-root operation and required paths, and runs bounded long-recording checks before a digest can enter the multi-architecture manifest.

References: .github/…/recording-reliability.yml• L1-91 .github/…/docker-build-media-server.yml• L61-99 .github/…/docker-build-media-server.yml• L136-237

Real-capture verification

Real-capture verification records a known display and audio stimulus through Cap's actual Studio and Instant paths. It compares frames and audio markers with host-clock truth on macOS and Windows, which covers failures that synthetic devices cannot show (.github/…/verify-recording.yml).

The workflow plans a FAST or FULL tier from the changed files and risk. Pull requests use a Blacksmith macOS path and hosted Windows path; scheduled runs add hosted macOS lanes. The final gate requires all selected runners to pass and checks that the planned number of cases ran. Reports, raw capture data, and environment evidence remain available for failures.

The related Recording and media verification page describes this verification family in more detail.

References: .github/…/verify-recording.yml• L1-29 .github/…/verify-recording.yml• L76-169 .github/…/verify-recording.yml• L171-205 .github/…/verify-recording.yml• L465-518

Real-app reliability

Instant reliability drives the real GPUI app against an in-process mock Cap server. It checks normal upload, slow start, cancellation, server-side termination, crash recovery, and camera recording by comparing the mock server's result with files left on disk (.github/…/instant-reliability.yml).

The workflow scopes pull requests to Instant-related paths and applies the same scope in the merge queue. macOS uses a real display and audio setup. Linux uses Xvfb and a virtual audio sink, then adds a hosted camera lane because the camera kernel module is not available on the build runner. Failed jobs keep recording sandboxes so upload and recovery failures can be inspected.

References: .github/…/instant-reliability.yml• L1-51 .github/…/instant-reliability.yml• L53-105 .github/…/instant-reliability.yml• L102-217 .github/…/instant-reliability.yml• L219-317 .github/…/instant-reliability.yml• L318-403

Desktop surface probes

The glass and picker probes test the real GPUI app rather than only model or unit behavior. The glass probe compares rendered scenes with a CPU model on macOS, Windows, and Linux. The picker probe selects a live target window on macOS, Windows, and Linux X11 and also checks Windows area recording.

Both probes prepare the display, target window, graphics path, and required permissions before collecting logs or captures. Fork pull requests run the expensive matrix only when application behavior is affected. This keeps environment failures distinct from product regressions.

References: .github/…/glass-probe.yml• L1-18 .github/…/glass-probe.yml• L77-225 .github/…/picker-smoke.yml• L1-22 .github/…/picker-smoke.yml• L81-197 .github/…/picker-smoke.yml• L198-337

Linux desktop reliability

Linux desktop reliability checks the built app inside real desktop sessions and package environments. It covers portals, shortcuts, tray controls, screen and camera capture, audio, editing, export, clipboard, compositor behavior, and AppImage library isolation across GNOME, Hyprland, niri, X11, and an AppImage host path (.github/…/linux-desktop-reliability.yml).

One Linux build feeds several compositor jobs so each scenario tests the same binary. Hosted runners provide kernel-backed display and camera devices where the main build runner cannot. The workflow also checks pinned package fixtures, real portal flows, and the shipped AppImage library layout before it verifies result files. This exposes failures that a Linux compile or synthetic display cannot expose.

References: .github/…/linux-desktop-reliability.yml• L1-40 .github/…/linux-desktop-reliability.yml• L42-151 .github/…/linux-desktop-reliability.yml• L153-309 .github/…/linux-desktop-reliability.yml• L457-606 .github/…/linux-desktop-reliability.yml• L615-660 .github/…/linux-desktop-reliability.yml• L662-735

Windows platform safeguards

The Windows target workflow protects native window discovery against changes in capture targets, CLI target handling, and the Windows implementation. It runs the discovery tests and compares the changed implementation with the pull request base before applying the warning and lint checks (.github/…/windows-targets.yml).

The Windows encoder workflow protects segmented recording when a hardware encoder fails during capture. It also checks Media Foundation selection and odd-size export recovery. These checks run on Windows with the native media dependencies that the recovery path needs (.github/…/windows-recording-encoder.yml).

References: .github/…/windows-targets.yml• L1-87 .github/…/windows-recording-encoder.yml• L1-114

Performance comparisons

The performance budget measures high-risk or engine changes against their base revision on one controlled macOS machine. Interleaved base and head runs reduce the effect of machine drift, and a separate verdict turns a measured regression into a merge failure (.github/…/perf-budget.yml).

GPUI benchmarks compare patched and base builds on macOS, Windows, and Linux. The app benchmark uses a reference recording on macOS. These workflows retain timing and scene reports for review rather than acting as the general release path.

References: .github/…/perf-budget.yml• L1-73 .github/…/perf-budget.yml• L75-167 .github/…/gpui-bench.yml• L1-78 .github/…/gpui-bench.yml• L110-197 .github/…/gpui-app-bench.yml• L1-24 .github/…/gpui-app-bench.yml• L98-169

Service and data validation

The service checks validate the boundaries that a source build cannot prove. Self-hosting starts the database, object store, media server, and web service with Docker Compose and checks that each service is healthy. The infrastructure database workflow is path-scoped, applies migrations to MySQL, and checks billing, upload, preferences, space, messaging, passkey, and email-change paths against the migrated schema.

The infrastructure suites use a schema shape that matches their scratch-database contract; this gate does not test foreign-key behavior. Profile reliability checks profile activation, source, consent, lifecycle, and watchdog behavior against MySQL. Migration validation keeps the journal version, dialect, and existing entries unchanged so deployed migration history stays append-only.

References: .github/…/test-self-hosting.yml• L49-164 .github/…/infra-database.yml• L1-144 .github/…/database-profile-reliability.yml• L1-87 .github/…/validate-migration-journal.yml• L1-104

Desktop release lifecycle

The desktop release system uses one reusable workflow for stable releases, nightly builds, and nightly promotion. A caller supplies the version, release channel, and exact commit. The workflow creates the release record, builds each target, checks packages, uploads assets, and publishes only when the channel rules allow it (.github/…/desktop-release.yml).

The release flow follows this sequence:

  1. Select a commit and version. Stable uses the desktop version source. Nightly creates a time-stamped pre-release version.
  2. Create or reuse the release record and stable tag. Incomplete releases stay in draft form.
  3. Build the desktop app, sidecars, and platform package for each target.
  4. Check signatures, embedded web content, native libraries, metadata, and required executables.
  5. Upload packages and update artifacts to CrabNebula.
  6. Publish according to the channel. Stable remains a manual action. Nightly publishes automatically.

This diagram shows the shared build path and the different visibility rules for stable and nightly releases.

flowchart TD
    A[Stable release] --> D[Reusable desktop release]
    B[Nightly release] --> D
    C[Nightly promotion] --> D
    D --> E[Prepare tag and draft record]
    E --> F[Build platform packages]
    F --> G[Check packages and signatures]
    G --> H[Upload CrabNebula assets]
    H --> I{Automatic publication?}
    I -->|No| J[Manual stable publication]
    I -->|Yes| K[Publish nightly channel]

The desktop package includes the GPUI app and the native executables required by its recording and export paths. Linux produces Debian, RPM, AppImage, and Arch outputs. Detailed target and distribution behavior is in Desktop build and distribution.

Stable channel

The stable workflow is a manual entry point. It reads the committed desktop version, creates a cap-v<version> tag, and leaves the CrabNebula and GitHub releases in a draft or manual-publish state (.github/…/publish.yml). A published stable tag cannot be reused, so a retry cannot replace an already shipped version.

References: .github/…/publish.yml• L1-43 .github/…/desktop-release.yml• L45-190

Nightly channel

The nightly workflow runs on a schedule or by manual dispatch. It skips a commit that already shipped unless force is set, then publishes a time-stamped version to the CrabNebula nightly channel (.github/…/publish-nightly.yml). Nightly artifacts stay out of the normal update endpoint and website download links.

References: .github/…/publish-nightly.yml• L1-109 .github/…/desktop-release.yml• L1-15

Nightly promotion

Promotion turns a shipped nightly into a stable release without changing its source commit. It resolves the nightly tag, checks the plain stable version, and rebuilds that exact commit so the stable binary has the stable version embedded in it (.github/…/promote-nightly.yml).

References: .github/…/promote-nightly.yml• L1-73

Platform and client packaging

Packaging gives each supported client a form that its delivery system can install or update. Desktop uses signed native packages. Web and media server use multi-architecture container manifests. Chrome uses a versioned store package. The status app uses its own web build path.

Desktop packages

The desktop release matrix builds Intel and Apple Silicon macOS packages, Windows installers, and Linux packages. macOS checks signing, notarization, hardened runtime, updater metadata, and the disk image. Windows checks the installer and its payload signatures. Linux checks embedded web content, executables, FFmpeg libraries, runtime dependencies, and package-specific files (.github/…/desktop-release.yml).

The package environment is part of the release contract. Native signing inputs, deployment targets, memory capacity, sidecar names, and bundled libraries must remain compatible with the installed app and its updater.

References: .github/…/desktop-release.yml• L192-428 .github/…/desktop-release.yml• L430-589 .github/…/desktop-release.yml• L591-1022 scripts/build-macos-packages.mjs• L15-45 scripts/build-macos-packages.mjs• L146-220

Arch package validation

The Arch package workflow checks the Linux conversion path in an Arch package environment. It validates package version, payload, ordering, and test execution. This is a focused gate for the conversion path; the desktop release still produces the shipped Arch artifact from the checked Linux package (.github/…/arch-package.yml).

References: .github/…/arch-package.yml• L1-58

Container images

The web and media-server workflows build separate amd64 and arm64 images. Each platform publishes a digest, and a merge job joins both digests under one tag. A host can then pull the image that matches its CPU type.

The media-server path checks the production image before it contributes its digest. It runs media, recording, transfer, route, security, and bounded performance checks inside the image. The latest merge step rejects an older build when a newer relevant change has reached main during the build. The web image carries the traced web runtime, static output, public files, and migrations.

References: .github/…/docker-build-media-server.yml• L99-177 .github/…/docker-build-media-server.yml• L209-237 .github/…/docker-build-media-server.yml• L239-314 .github/…/docker-build-web.yml• L1-110 apps/…/Dockerfile• L1-39 apps/…/Dockerfile.standalone• L1-20

Chrome extension

The Chrome extension workflow checks, packages, and publishes the browser client from the default branch. It supports draft, trusted-tester, and public publication. Store publication requires the package and manifest versions to match. A draft upload does not change the source version (.github/…/publish-chrome-extension.yml).

References: .github/…/publish-chrome-extension.yml• L1-143 .github/…/publish-chrome-extension.yml• L145-269

Release visibility

Release channels control which users can discover a build. Stable desktop artifacts use the normal release and updater path. Nightly artifacts use a separate CrabNebula channel and require an explicit nightly opt-in. Container tags, Chrome Web Store targets, and the status app follow their own delivery rules.

Stable release completion can also report back to the release request source when a Discord interaction ID is supplied. This links a human request to the release record without changing the artifact path (.github/…/desktop-release.yml).

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep queue-aware workflow declarations and queue scope helpers aligned with each workflow's normal path filters.
  • Keep CI change groups aligned with the jobs that consume Rust, GPUI, GPUI patches, iOS, native setup, and desktop package inputs.
  • Keep engine suite planning, risk tiers, platform matrices, report names, and executed-case floors aligned with engine changes.
  • Keep the desktop version source, stable tag format, nightly version rule, and post-promotion version bump aligned.
  • Keep each desktop target mapped to a runner that can build its native dependencies and complete its package checks.
  • Keep sidecar names, package contents, updater signatures, embedded web output, native library names, and declared Linux dependencies aligned.
  • Keep Arch package checks aligned with the Debian-to-Arch conversion used by the release artifact.
  • Keep container platform digests, merge artifacts, media-image checks, and the latest race check aligned.
  • Keep media-server paths aligned with media source, audio metrics, benchmark, verification, and Dockerfile changes.
  • Keep recording, real-capture, Instant, Windows encoder, picker, glass, and Linux desktop scope rules aligned with their behavior and runner needs.
  • Keep planned case counts, report names, platform lanes, and final gates aligned when adding verification cases.
  • Keep virtual display and audio setup hard requirements. A missing device must fail the check rather than turn it into a silent skip.
  • Keep performance base selection, fixtures, labels, and report inputs aligned with the question being measured.
  • Keep service workflow paths aligned with database, migration, billing, upload, self-hosting, profile, and consent contracts.
  • Keep status-app locked install settings aligned with the environment that produces its production build.
  • Keep signing, notarization, store credentials, and release-channel flags mapped to the artifacts that consume them.

Important failure modes

TriggerConsequenceGuard
A changed path is missing from a workflow scope ruleA needed check does not runPath filters and merge-queue scope compare the full affected path set
A queue-aware workflow omits its merge_group scope pathThe queue can merge without that workflow's resultThe merge queue waits for all declared queue workflows and their scope jobs
A planned capture or engine case report is missingA partial run can look completeFinal gates check runner results and executed-case floors
Engine or high-risk code maps to the wrong suite or tierA needed oracle check does not run, or a costly full run is skippedThe planner maps changed paths and risk to suites, platforms, and FAST or FULL tiers
A real-capture runner lacks display or audio supportThe check fails before it tests recording behavior or silently loses coverageRunner setup grants permissions, creates devices, and requires supported cases
An Instant failure does not retain its sandboxDisk state needed to explain upload or recovery loss disappearsFailed jobs upload platform sandbox artifacts
A Linux reliability job uses the wrong compositor, portal, package, or binaryA supported desktop regression is missedNamed desktop scenarios share a checked build and verify result files
A Windows encoder change bypasses the encoder workflowHardware fallback or odd-size export can regress unnoticedEncoder, Media Foundation, media-info, output, export, lockfile, and workflow paths trigger the job
A performance run compares different fixtures or only one revisionThe result describes build drift instead of the changeBase and head use the same machine, fixture, and comparison contract
A stable release reuses a published cap-v<version> tagA new build can target an already shipped versionThe reusable release flow rejects a published stable record
A nightly repeats an already shipped commit without forceThe nightly channel receives a duplicate buildNightly preparation compares the commit with the latest shipped nightly
A desktop package lacks web output, a required library, or a valid signatureThe installed app can fail at launch or updatePlatform package checks inspect content, dependencies, signatures, and metadata
A container digest or production-image check is missingA multi-architecture tag can point to incomplete or unsafe outputThe merge job waits for both digests and each image passes in-image checks
main advances with a relevant media-server change during an image buildAn older image can replace the latest tagThe merge step compares current main with the build commit and relevant paths
A migration journal entry is changed or removedExisting deployments can lose migration historyThe migration workflow enforces stable version, dialect, and append-only entries
Infra tests use an unmigrated or unsupported schema shapeThe gate fails for setup reasons or tests the wrong data modelThe workflow applies migrations and prepares the intended MySQL test schema

Key files

FileWhy to read it
.github/…/merge-queue.ymlQueue gate and the contract that makes queue-aware workflows merge checks
.github/…/ci.ymlMain change-aware validation flow and desktop, iOS, Rust, GPUI, and shared checks
.github/…/engine-verify.ymlEngine suite planning, risk tiers, platform runs, reports, and completeness gate
.github/…/verify-recording.ymlReal-capture scope, platform runners, reports, and final case-count gate
.github/…/instant-reliability.ymlReal-app upload, cancellation, crash, recovery, camera, and sandbox flow
.github/…/linux-desktop-reliability.ymlReal Linux desktop sessions, package fixtures, compositor paths, and result checks
.github/…/sync-tests.ymlCross-platform A/V timing checks, virtual devices, matrix reports, and failure gate
.github/…/desktop-release.ymlShared desktop build, package validation, signing, upload, and publication lifecycle
.github/…/publish.ymlStable release entry point and version source
.github/…/publish-nightly.ymlNightly versioning, duplicate guard, and channel publication
.github/…/promote-nightly.ymlExact-commit rebuild from a shipped nightly to a stable release
.github/…/docker-build-media-server.ymlMedia image checks, platform digests, and manifest race protection
.github/…/arch-package.ymlArch package version, ordering, payload, and no-skip validation
.github/…/publish-chrome-extension.ymlBrowser package validation, version rules, and store publication
.github/…/test-self-hosting.ymlDocker Compose startup and self-hosted service checks
.github/…/infra-database.ymlMigrated MySQL billing, upload, account, and data integration gate
.github/…/validate-migration-journal.ymlAppend-only migration history contract
Desktop build and distributionDetailed desktop target, package, signing, and distribution behavior
Recording and media verificationDetailed recording, media timing, and real-capture verification behavior