Repository navigation
fix: bind recorder signals to owned process identity - #63
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bf380ee6c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def _cleanup_stale_pid(self) -> None: | ||
| """Entfernt PID-File wenn Prozess nicht mehr laeuft (Stale-PID-Schutz).""" | ||
| if not self._pid_file.is_file(): | ||
| return | ||
| pid = self._read_pid() | ||
| if pid is None: | ||
| self._pid_file.unlink(missing_ok=True) | ||
| return | ||
| """Clean up markers without adopting or signalling unowned processes.""" | ||
| self._live_pid() |
There was a problem hiding this comment.
Keep orphaned recorder processes from being forgotten
If the app is killed or crashes during a manual ./run.sh session, the exec'd parec child has no parent-death signal or persistent liveness channel and can continue recording. On the next launch, this cleanup treats the live child's PID file as an unowned marker and deletes it, allowing another recorder to start against the same WAV path while the orphan continues capturing. Preserve safe cross-process exclusion or arrange for the child to terminate with its parent rather than silently forgetting it.
Useful? React with 👍 / 👎.
| if self.audio_recorder.is_recording(): | ||
| return |
There was a problem hiding this comment.
Clear the recovered stop error before updating state
After a transient stop failure, show_tray_error() stores the failure in _tray_error_message, and this return intentionally leaves the recording available for a retry. If a later retry succeeds, none of the success paths clears that message, so update_tray_state() continues to prioritize the ERROR icon and tooltip throughout transcription and after returning to idle. Clear the prior stop error once the owned process has subsequently stopped successfully.
Useful? React with 👍 / 👎.
Secure recorder process lifecycle using Linux pidfds. Prevent signals to foreign processes and improve stop/discard error handling. Verified with 749 passing tests, isolated microphone live test, and independent review.