Skip to content

Weekly upstream sync 2026-05-12 (2 commits) - #7

Open
loganbronstein wants to merge 3 commits into
mainfrom
upstream-week-2026-05-12
Open

loganbronstein wants to merge 3 commits into
mainfrom
upstream-week-2026-05-12

Conversation

@loganbronstein

Copy link
Copy Markdown
Owner

Weekly upstream sync (2026-05-12)

Upstream grandamenium/cortextos added 2 commit(s) since the last run.
Each one is summarized in plain English below.


What's new

  1. New feature in telegram: wire whisper-cli voice transcription into media pipeline (feat(telegram): wire whisper-cli voice transcription into media pipeline grandamenium/cortextos#384)

  2. Bug fix in task: bump random suffix from 3 to 8 digits to eliminate ID-collision flake (fix(task): eliminate task-ID collision flake (3→8 random digits) grandamenium/cortextos#385)


How to merge

  • Reply to this PR with merge all to take everything.
  • Reply with merge 1 3 5 (numbers from the list above) to cherry-pick those.
  • Reply with skip to dismiss this whole PR.
  • If there's a merge conflict, you'll see it on the Files tab. Logan tells boss what to do.

This PR was opened automatically by boss every Sunday at 6:30pm Chicago time.

grandamenium and others added 3 commits May 10, 2026 10:52
…ision flake (grandamenium#385)

createTask generated ids as `task_${Date.now()}_${randomDigits(3)}`. With only
3 random digits, two createTask calls landing in the same millisecond had a
~1/1000 chance of colliding. When they did, the new task's id matched its own
declared blocker — detectCycleOrThrow then threw "X ultimately blocks itself
via X" and the test failed nondeterministically.

CI run 25618845172 (https://github.com/grandamenium/cortextos/actions/runs/25618845172)
hit exactly this case in tests/unit/bus/task.test.ts:761 ("once the dependent
completes, the blocker becomes eligible"), which calls createTask twice
back-to-back. The branch under test (feat/voice-transcription) does not
touch src/bus/task.ts or its tests — this is a pre-existing flake.

Bumping to randomDigits(8) drops collision probability to ~1e-8 per
same-ms call pair. The id-format assertion in task.test.ts:40 was tightened
to match. The looser regex in codex-bus-roundtrip.test.ts (/[a-z0-9]+/) is
unaffected.

Co-authored-by: Boris <boris@cortextos.ai>
…ine (grandamenium#384)

* feat(telegram): wire whisper-cli voice transcription into media pipeline

Voice .ogg files are now transcribed locally via whisper-cli + ffmpeg the
moment they're downloaded in src/telegram/media.ts, threaded through
ProcessedMedia.transcript, and surfaced to agents via
formatTelegramVoiceMessage. Previously the framework downloaded voice
notes but never produced a transcript — agents received only the .ogg
path and had to invoke whisper themselves (which most templates did
not), so voice messages effectively reached agents as "[voice message]".

Behaviour:
- Transcription runs best-effort with graceful fallback. Any failure
  (missing whisper-cli, missing ffmpeg, missing model, timeout) returns
  null and the agent still receives the .ogg path — no regression vs.
  the previous behaviour.
- Defaults to ggml-tiny.en.bin (~75MB) at ~/.cortextos/models/. Override
  with CTX_WHISPER_MODEL, CTX_WHISPER_BIN, CTX_FFMPEG_BIN. Disable
  entirely with CTX_TELEGRAM_NO_TRANSCRIBE=1.
- scripts/install-whisper-model.sh downloads the GGML model
  idempotently; intentionally separate from npm install so the bundle
  stays slim. whisper-cli + ffmpeg come from `brew install whisper-cpp
  ffmpeg` on macOS.

Tests: 7 new unit tests in tests/unit/telegram/transcribe.test.ts
covering env disable, missing inputs, missing binaries, and timeout.
Existing media tests updated to set CTX_TELEGRAM_NO_TRANSCRIBE=1 so
they don't shell out.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(install): auto-install whisper-cli + ffmpeg + GGML model

Extends `cortextos install` to provision the voice-transcription stack
that PR 384 wires into the media pipeline. New agents now get voice
transcripts out of the box on macOS without a separate manual step.

Behaviour:
- whisper-cli auto-install via `brew install whisper-cpp` (mac).
  Linux/Windows print build/install instructions; install.ts continues.
- ffmpeg auto-install via brew (mac), apt-get (linux), or
  winget/choco (windows).
- GGML model fetched via the existing
  scripts/install-whisper-model.sh (idempotent, skips if present).
- All three steps are best-effort: any failure prints a hint and lets
  install.ts continue. Voice messages still flow as path-only when the
  stack is incomplete — transcribe.ts already returns null gracefully.

This complements PR 384 by making "default voice transcription for all
agents" a real default rather than something each operator wires up
manually after the fact.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Boris <boris@cortextos.ai>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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