<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-video-audio-recording-process-cleanup.el, branch load-graph-classify-start</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-start'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-05-15T21:55:18+00:00</updated>
<entry>
<title>test(recording): skip integration tests when screencast access fails</title>
<updated>2026-05-15T21:55:18+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-15T21:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=769cacb7d2719374df88626792914f240f74dbed'/>
<id>urn:sha1:769cacb7d2719374df88626792914f240f74dbed</id>
<content type='text'>
The three integration tests in test-video-audio-recording-process-cleanup spawn wf-recorder via cj/ffmpeg-record-video and assert on pgrep counts. They guard with executable-find and XDG_SESSION_TYPE checks, but neither catches the case where the subprocess can run wf-recorder yet lacks Wayland screencast permission. wf-recorder picks a region, retries "Failed to copy frame" 17 times, then exits with code 183 inside a second. The assertion fires against an empty pgrep.

I added test-cleanup--can-capture-frames, which calls cj/ffmpeg-record-video against a temp dir, waits 1s, and checks pgrep. If wf-recorder didn't survive, the three integration tests skip. The result is cached, so the ~2.5s cost is paid once per batch.

I added the same guard to test-integration-video-recording-multiple-start-stop-cycles. Its assertion is (= count initial-count), so it trivially passed in any environment where capture didn't work. Skipping is more honest than passing for the wrong reason.
</content>
</entry>
<entry>
<title>feat(recording): validate system audio device before recording</title>
<updated>2026-02-26T23:08:19+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-26T23:08:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=5f71d26440604eb3b45739463a65eb8ecd0dc32a'/>
<id>urn:sha1:5f71d26440604eb3b45739463a65eb8ecd0dc32a</id>
<content type='text'>
Add pre-recording validation that catches stale or drifted system audio
devices before they cause silent recordings. When the default audio
output changes (Bluetooth reconnect, device switch) between setup and
recording, the monitor device is auto-updated. Warns if no audio is
currently playing through the monitored sink.

Co-Authored-By: Craig Jennings &lt;c@cjennings.net&gt;
</content>
</entry>
<entry>
<title>feat(recording): rewrite device setup, fix video stop, update modeline icons</title>
<updated>2026-02-06T19:12:44+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-06T19:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=0a4f6da4f20979e0b3c1e808611a0a92ba33eb50'/>
<id>urn:sha1:0a4f6da4f20979e0b3c1e808611a0a92ba33eb50</id>
<content type='text'>
Video stop fix: kill wf-recorder (producer) first on Wayland so ffmpeg
gets clean EOF, then signal process group. Replaces sit-for with
poll-based wait-for-exit. Fixes zero-byte output files.

Device selection: rewrite quick setup to show all available mics with
PulseAudio descriptions, auto-detect default sink monitor for system
audio. Skip confirmation dialog, add Cancel option to mic list.

Modeline: replace red dot emoji with nerd font icons (mic/camcorder).
Rename quick-setup-for-calls to quick-setup, rebind C-; r s / C-; r S.

173 recording tests pass (was 165).
</content>
</entry>
<entry>
<title>test(video-recording): add process cleanup tests</title>
<updated>2026-02-03T14:57:10+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-03T14:57:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=7eede9264e069bb2e1479716852ee98b3def50f6'/>
<id>urn:sha1:7eede9264e069bb2e1479716852ee98b3def50f6</id>
<content type='text'>
Unit tests verify pkill wf-recorder is called:
- On Wayland video stop (to kill orphan wf-recorder)
- On Wayland video start (to clean previous orphans)
- NOT called on X11 (only relevant for Wayland pipeline)

Integration tests (tagged :integration :wayland) verify actual cleanup:
- No orphan processes after stop
- Start cleans up existing orphans
- Multiple start/stop cycles don't accumulate orphans
</content>
</entry>
</feed>
