Repository navigation
Report failed screen recording starts instead of exiting 0 - #18803
ThePrimeagen wants to merge 3 commits into
Conversation
When every recorder backend died before creating its file, start_screenrecording now sends a critical notification and returns a distinct failure code, and its caller exits 1 after cleanup. Picker cancellations still return silently with 0. This also fixes the menu and webcam-wrapper paths, which rely on the main script's notification and exit status.
[Medium impact] The PR appears safe to merge; no actionable issues remain. SummaryFailed recording starts now show a warning and exit with status 1.
Reviews (3) · Last reviewed commit: "Stay silent on a late cancel, and say ho..." · Reviewed by Greptile |
The failed-start case discarded the exit status, so it passed whether a start that found no working recorder exited 0 or 1. It now checks for exit status 1 and the failed-start notification. Co-authored-by: Cursor <cursoragent@cursor.com>
A cancel that lands while the last recorder is being stopped after its ready timeout reached the failure notification, so cancelling could report a failed start and exit 1. The notification now also points at OMARCHY_SCREENRECORD_DEBUG, since the recorder's stderr goes to /dev/null without it. Both come from omacom#7189. Co-Authored-By: Literato2 <317679755+Literato2@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed 994e570 on top of this branch, so this is ready for the maintainer. What changed.
Both come from @Literato2's earlier #7189 for the same bug, so they are credited as co-author on the commit. What was proved, on a worker built from the Omarchy ISO.
Tests. The test this PR adds stays as it is. It extends the existing "a recorder that cannot start" case by a few lines, runs the real script with a recorder that fails, and checks the exit status and the notification, so it fails on the base and catches a regression of this fix. No test was added for the late-cancel guard. Reaching that window needs a stub that turns a TERM into a cancel plus a 15-second timeout, which is far bigger than a one-line guard, so the harness run above is the evidence instead. Second opinion. Codex Medium reviewed the new commit and found no defects. It confirmed that the guard covers both late-cancel paths, that the catalog key is well-formed, and that the PR's test is proportionate. Its agreement is not guaranteed to be independent. |
|
This isn't helpful enough. If the notification actually gave you some clear direction on what was happening, okay, maybe. But otherwise no. Even better would just be to fix whatever is preventing this from succeeding. This feels like paving over bugs. |
Starting a screen recording in
bin/omarchy-capture-screenrecordingreports success when the recorder crashes before writing a file: it exits 0 with no warning, even though--statusshows nothing is recording.Screenshots
Reproduce
omarchy capture screenrecording --fullscreen --with-microphone-audio; echo START:$?.omarchy capture screenrecording --status; echo ST:$?.START:0and no failed-start warning, whileST:1shows no recording is running.More cases
Capture menu: With desktop + microphone audio
Webcam wrapper
Related