Skip to content

Fix/critical bugs#1

Merged
jb381 merged 8 commits into
mainfrom
fix/critical-bugs
May 14, 2026
Merged

Fix/critical bugs#1
jb381 merged 8 commits into
mainfrom
fix/critical-bugs

Conversation

@jb381
Copy link
Copy Markdown
Owner

@jb381 jb381 commented May 12, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 12, 2026 10:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR targets a set of reliability and safety fixes across the Phonos server and macOS client, including improved cleanup on upload failures, safer audio tap capturing, and configurable model-load timeouts.

Changes:

  • Improved server-side temp file cleanup during streamed uploads and added a startup warning when auth is disabled.
  • Made model-load timeout configurable and added worker restart behavior on transcription timeouts.
  • Fixed a potential retain cycle in the macOS AudioRecorder tap closure.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CHANGELOG.md Documents the 1.5.1 fixes/changes.
apps/server/phonos_server/transcription.py Adds try/except cleanup around temp-file streaming writes.
apps/server/phonos_server/models.py Uses configurable model-load timeout; restarts worker on transcription timeout.
apps/server/phonos_server/main.py Logs a warning when auth is disabled at startup.
apps/server/phonos_server/config.py Adds model_load_timeout_seconds setting.
apps/macos/Sources/AudioRecorder.swift Uses [weak self] in the installTap closure to avoid a strong cycle.
.gitignore Ignores findings.md and .codex.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -33,19 +33,29 @@ async def transcribe_audio(

max_upload_bytes = settings.max_upload_mb * 1024 * 1024
suffix = os.path.splitext(file.filename)[1] or ".wav"
Comment thread apps/server/phonos_server/models.py Outdated
Comment on lines 214 to 226
msg = self._result_queue.get(timeout=timeout)
except queue.Empty as exc:
self._last_error = f"Timed out transcribing audio after {timeout} seconds"
# Kill stale worker, reload fresh one to prevent stale results
self._stop_worker()
self._lock.release()
try:
self.load(self._model_name)
except Exception:
self._status = "error"
finally:
self._lock.acquire()
raise TimeoutError(self._last_error) from exc
Comment thread apps/server/phonos_server/models.py Outdated
Comment on lines +217 to +225
# Kill stale worker, reload fresh one to prevent stale results
self._stop_worker()
self._lock.release()
try:
self.load(self._model_name)
except Exception:
self._status = "error"
finally:
self._lock.acquire()
@jb381 jb381 merged commit cdbf705 into main May 14, 2026
4 checks passed
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