Skip to content

ci(verify): real-capture recording oracle on GitHub-hosted Windows - #2667

Open
richiemcilroy wants to merge 12 commits into
mainfrom
ci/windows-real-capture
Open

richiemcilroy wants to merge 12 commits into
mainfrom
ci/windows-real-capture

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Runs the real-capture recording oracle (crates/verify/tests/recording.rs) on Windows. It records a marker stimulus through Cap's real Studio and Instant pipelines, with Windows Graphics Capture and Media Foundation, and checks every frame and audio marker against the host-clock truth, as it already does on macOS.

Where it runs

Verify recording gains a real-capture (windows-2022) job on GitHub-hosted Windows, and the required Verify recording gate now requires it too.

  • Runner choice. Blacksmith Windows VMs run jobs in session 0, which has no desktop to capture (CopyFromScreen: "The handle is invalid", probe runs 38997642473 and 38997747111). Hosted runners run jobs in the interactive console session, where Windows Graphics Capture works.
  • No audio endpoints. Hosted Windows has none: the stimulus stays silent, Cap records without system audio, and recording/instant/system-only is allowed to report unsupported. The microphone and camera are the harness's synthetic feeds, as on macOS.
  • Build time. The job builds with the ci-verify profile through engine-verify-setup: about 4 minutes with a warm cache.

Harness changes

Piece macOS Windows
Host clock mach ticks QueryPerformanceCounter, the clock Cap stamps Windows capture with
Input thread scheduling (cap_verify::sched) time-constraint policy THREAD_PRIORITY_TIME_CRITICAL, 1 ms timer resolution, high-resolution waitable timer waits
Stimulus presentation softbuffer layered window updated with UpdateLayeredWindow
Synthetic camera frames CVPixelBuffer sample buffers NV12 in a Media Foundation memory buffer, as the Windows camera feed hands them over
Crash snapshot APFS clone (cp -cR) file-by-file copy
  • Stimulus tearing. softbuffer presents on Windows with a GDI blit that the compositor captured half done: markers with the new picture's top rows and the old picture's bottom rows (3 to 19 unreadable frames per recording). A flip-model DXGI swap chain was rejected by the hosted Hyper-V display. A layered window hands the compositor whole pictures: 0 unreadable frames since.
  • Synthetic microphone (crates/recording/src/feeds/microphone.rs, test-utils only). It now registers its stream health, which a recording subscription on Windows and Linux attaches to and a real input registers when it opens.

First results, fast tier (run 39005636945)

Case Windows
recording/studio-screen/fragmented pass
recording/studio-screen/gated pass
recording/instant/screen-mic-system pass
recording/instant/gated pass
recording/studio-recovery/crash pass
recording/instant/late-mic xfail: the existing late-microphone mechanism, now listed for Windows too
recording/studio-camera/startup-drops xfail: Windows camera frame pacing (below)
recording/instant/system-only unsupported: no audio device

What it found

  • Windows camera frame pacing (in cap-v0.6.0 too). When no camera frame arrives within one frame interval, the Windows camera encoders re-encode the last frame stamped one interval later. That is the slot a slightly late real frame is stamped for, so the real frame lands on the same timestamp and the muxer moves it by one tick. Recordings had 11 to 41 duplicated camera frames, and camera-mic sync of -18 to -38 ms. The fix is a separate pull request, proven against this job.
  • Camera start offset on Windows. For the first 3.5 s, camera frames sit 66.7 ms off their steady offset. Under investigation.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no new blocking issues found.

Summary

Adds real recording checks on GitHub-hosted Windows and requires them in the recording gate.

  • Recording checks now run on Windows and macOS.
  • Windows recording checks now compare captured markers with Windows-clock times.
  • Crash recovery now preserves live recording snapshots on Windows.

No new actionable issues were found in the changes since the previous review.

Reviews (2) · Last reviewed commit: "fix(verify): Windows stimulus audio uses..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cap-status Ready Ready Preview Oct 17, 2026 11:02pm UTC

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found 1 potential issue (1 medium).

View 2 other findings in Capy.

Open in Capy

Comment thread crates/verify/tests/recording.rs Outdated
Comment thread crates/verify/tests/recording.rs Outdated
Comment thread crates/verify-stimulus/src/main.rs Outdated
Comment thread crates/verify/src/sched_windows.rs Outdated
Comment thread crates/verify/src/sched_windows.rs Outdated
…ots survive fragment renames, required system audio fails without an output device
@richiemcilroy

Copy link
Copy Markdown
Member Author

@greptileai review

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

This branch was successfully deployed

2 active deployments
Preview – cap-web — f8e18e01 Deployed Oct 17, 2026 by vercel[bot]
Preview – cap-status — f8e18e01 Deployed Oct 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant