Skip to content

fix: bind recorder signals to owned process identity - #63

Merged
TimInTech merged 1 commit into
mainfrom
fix/recorder-process-identity
Oct 13, 2026
Merged

TimInTech merged 1 commit into
mainfrom
fix/recorder-process-identity

Conversation

@TimInTech

Copy link
Copy Markdown
Owner

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.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 09:25

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T09:29:46.589936Z 2bf380e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TimInTech
TimInTech merged commit cd08046 into main Oct 13, 2026
12 checks passed
@TimInTech
TimInTech deleted the fix/recorder-process-identity branch October 13, 2026 09:27

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread app/audio_recorder.py
Comment on lines 254 to +256
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()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread app/blitztext_linux.py
Comment on lines +1248 to +1249
if self.audio_recorder.is_recording():
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants