Skip to content

[codex] fix test isolation and metal recommendations#1

Draft
lalalune wants to merge 2 commits into
mainfrom
prb1-1018
Draft

[codex] fix test isolation and metal recommendations#1
lalalune wants to merge 2 commits into
mainfrom
prb1-1018

Conversation

@lalalune

@lalalune lalalune commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

  • require real GGUF sources for Apple Silicon hardware-fit recommendations
  • isolate tests that were leaking stubbed core and SQLAlchemy modules across the suite
  • make topic analyzer regression tests owner-aware

Validation

  • uv run --no-project --with-requirements requirements.txt --with pytest python -m pytest tests/test_hwfit_macos.py tests/test_research_query_fallback.py tests/test_scheduler_restart_doublefire.py tests/test_security_regressions.py::test_auth_manager_migrates_legacy_admin_role tests/test_topic_analyzer.py tests/test_task_scheduler_session_delivery.py -q
  • git ls-files 'tests/test*.py' | xargs -r uv run --no-project --with-requirements requirements.txt --with pytest python -m pytest -q
  • python3 -m py_compile app.py core/.py routes/.py src/.py services/**/.py tests/*.py
  • node --check static/js/research/panel.js
  • node --check static/js/modalManager.js
  • docker compose --env-file .env.example config

Tatlatat and others added 2 commits June 2, 2026 15:39
…fails

STTService._transcribe_local writes the audio to a NamedTemporaryFile
(delete=False) and only unlinks it on the success path, before the except.
If model.transcribe() raises (corrupt audio, model/runtime error, etc.) the
function logs, returns None, and leaves the .webm temp file behind — so
every failed local transcription leaks a file in the system temp dir.

Initialize tmp_path = None up front and move the unlink into a finally
block so the temp file is cleaned up whether transcription succeeds or
raises.

tests/test_stt_leak.py stubs the whisper model to raise during transcribe,
runs _transcribe_local, and asserts it returns None and leaves no new .webm
file in the temp dir. Fails before this change.
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68bb42f5-1971-4f08-a238-95804e81d8d2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch prb1-1018

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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