Skip to content

fix: repair Audio Bridge runtime multipart self-loop - #10229

Merged
diegosouzapw merged 5 commits into
release/v3.8.50from
fix/audio-bridge-multipart-runtime
Aug 13, 2026
Merged

diegosouzapw merged 5 commits into
release/v3.8.50from
fix/audio-bridge-multipart-runtime

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • serialize the Audio Bridge self-loop upload as an explicit multipart Buffer
  • preserve the file MIME, filename, binary bytes, model field, bearer and timeout behavior
  • add a regression guard for the runtime FormData/Undici incompatibility

Root cause

OmniRoute patches the runtime global fetch with the packaged Undici implementation. The Audio Bridge built its body with Node native FormData, so the patched fetch sent an invalid multipart body and /v1/audio/transcriptions returned HTTP 400. The guardrail then replaced the clip with the unavailable STT stub.

VPS .15 evidence

All local/product tests for this fix were run on the Local VPS (192.168.0.15).

Reproduction and TDD

  • pre-fix live guardrail: modified payload contained the unavailable STT stub
  • direct Deepgram control: HTTP 200 with the expected non-sensitive transcript
  • regression test: failed before the implementation change, then passed
  • runtime helper under the patched ProxyFetch: Deepgram returned the expected transcript

Exact deployed candidate

  • PR head: d4b8bd9cabe9ef35a6069bedf2a024acc996900a
  • VPS dist/BUILD_SHA: d4b8bd9cab
  • health: HTTP 200, healthy, version 3.8.50
  • PM2: online, zero restarts after deployment

Live product gate

A real WAV generated on the VPS was sent as input_audio through /v1/chat/completions to the proven text-only target openai/gpt-4.1-mini, with deepgram/nova-3 configured as the STT model.

  • HTTP status: 200
  • transparency header: x-omniroute-modality-bridge: audio->text;model=deepgram/nova-3;parts=1
  • sanitized response excerpt: OmniRoute Audio Bridge live verification number 739.
  • expected transcript match: true

Freeze gates on the exact candidate

  • focused Node suites: 23/23 passed
  • Audio Bridge UI Vitest: 4/4 passed
  • focused ESLint: passed
  • typecheck:core: passed
  • check:cycles: passed, no cycles across 412 checked files
  • changelog fragment validation: 0 invalid fragments
  • changelog anti-eat comparison vs f1eb0b835722ca744692834c84661f1bc8d564a6: 0 lost bullets
  • Build App, CodeQL, DAST, and Semgrep: passed

Known base-red, outside this diff

typecheck:noimplicit:core remains red on the pure release base in open-sse/utils/usageTracking.ts and src/shared/services/cliRuntime.ts; neither file is changed by this PR.

Gate status

  • deploy this fix transactionally to VPS .15
  • send real input_audio through chat to a proven text-only model
  • record HTTP status, transparency header, and sanitized response excerpt
  • repeat the relevant freeze gates against the exact candidate tip

@diegosouzapw
diegosouzapw marked this pull request as ready for review August 13, 2026 03:00
@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Merge freeze verdict — HOLD on inherited release base-reds

The Audio Bridge candidate itself is green and its mandatory live gate passed, but release/v3.8.50 is not release-green. Per the project base-green protocol, inherited reds must not be used to bypass required gates, so this PR is intentionally not merged.

Exact PR head: d4b8bd9cabe9ef35a6069bedf2a024acc996900a
Exact base: f1eb0b835722ca744692834c84661f1bc8d564a6
Existing tracker: #9985

Candidate-owned evidence

  • the new multipart regression passed in the official Unit Tests shard 4/4
  • 23/23 focused Node tests and 4/4 Audio Bridge UI tests passed on VPS .15
  • focused ESLint, typecheck:core, cycles, fragment validation and anti-eat passed on VPS .15
  • real input_audio -> deepgram/nova-3 -> openai/gpt-4.1-mini passed with HTTP 200 and the required transparency header
  • Build App, CodeQL, DAST, Semgrep, merge integrity and change classification passed

Base-red discrimination on pure f1eb0b8357, reproduced on VPS .15

  • Docs: identical `CHANGELOG.md first section must be "## [Unreleased]" failure
  • Vitest: base fails the same three files (DistributeProxiesButton, Auto-Combo weights, tiered rotation); base had 18 failures and the candidate had 17
  • i18n ratchet: pure base measures i18nUiCoverage.pct=90.2 against baseline 100, identical to the PR check
  • provider consistency: pure base reports registry-only chatanywhere
  • mutation coverage: pure base reports the same 8 covering tests across 4 modules missing from stryker.conf.json
  • unit gate: pure-base probes reproduce the 45 expected vs 46 actual agent-skill catalog/generator failures; the official PR shards also contain dozens of unrelated provider/i18n/docs/runtime failures
  • secrets ratchet: the full-tree scan reports one pre-existing finding; this PR adds no credential-like line, and its only auth literal is unchanged test context from the base

The failed checks are therefore inherited HARD failures, not Audio Bridge regressions, but remain merge blockers. The next safe action is a dedicated base-red repair campaign/PR; after the release tip is green, this PR must be refreshed, its affected freeze gates repeated, then merged with exact-head protection and redeployed as the official release SHA.

@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Freeze revalidation — previous HOLD superseded

The inherited release reds recorded in the previous HOLD were repaired by the base-first PR #10236 and merged as 7acddd91a9bc183c0521dd20095d8d78fe1d3e36.

This repair branch was then reconciled by a normal merge. Exact current state:

  • PR head: d737bfd7a9d811955ac8c947ba4e414c7e9e83d7
  • release base: 7acddd91a9bc183c0521dd20095d8d78fe1d3e36
  • diff: exactly the multipart helper, its regression test, and changelog fragment
  • official Build App run 31669857553: green; artifact omniroute-build ID 9170284499
  • deployed artifact: version 3.8.50, dist/BUILD_SHA=d737bfd, PM2 online with 0 restarts, health healthy

All manual freeze gates were executed exclusively on VPS 192.168.0.15:

  • focused Node: 149/149
  • Audio/Modality UI: 4/4 files, 18/18 tests
  • full Vitest: 39/39 files, 355/355 tests
  • focused ESLint with official suppressions, typecheck:core, 412-file cycle gate, docs-all, diff check and changelog integrity: green
  • i18n: all 42 locales at 100%, 12,579 keys each, no missing keys/placeholders; value-drift and glossary green
  • provider consistency: 259 registry entries / 339 canonical providers / 0 exceptions
  • mutation coverage: 3,946 unit tests scanned, no drift

Known unrelated base debt remains unchanged: typecheck:noimplicit:core reports the same 40 errors, only in open-sse/utils/usageTracking.ts and src/shared/services/cliRuntime.ts; neither is in this diff.

Mandatory live Deepgram proof on the exact deployed candidate

A real WAV input_audio request was sent through /v1/chat/completions to text-only openai/gpt-4.1-mini, using active deepgram/nova-3 for STT.

  • HTTP: 200
  • header: x-omniroute-modality-bridge: audio->text;model=deepgram/nova-3;parts=1
  • sanitized transcript/result: OmniRoute Audio Bridge live verification number 739.
  • deployed build: d737bfd
  • temporary auth material: removed after the request

Therefore the prior base-red HOLD is superseded. Merge remains pending only for the rest of the current exact-head CI, followed by exact-head merge, official release deploy, and one final live verification.

@diegosouzapw
diegosouzapw merged commit 32da2a1 into release/v3.8.50 Aug 13, 2026
22 checks passed
@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Official post-merge deployment — final live gate

The merged release commit is now deployed on Local VPS 192.168.0.15 from its own official Build App artifact.

  • official release SHA: 32da2a1afe09401b89f6f9f48d2925493fe9b223
  • Build App run: 31674929570 (success)
  • artifact: omniroute-build ID 9171497235
  • deployed dist/BUILD_SHA: 32da2a1
  • version: 3.8.50
  • health: healthy; configured/active providers: 48/48
  • PM2: online, 0 restarts
  • rollback backup preserved: dist.bak-3.8.50-d737bfd

Final real input_audio -> deepgram/nova-3 -> openai/gpt-4.1-mini result on the official merged build:

  • HTTP 200
  • x-omniroute-modality-bridge: audio->text;model=deepgram/nova-3;parts=1
  • sanitized transcript/result: OmniRoute Audio Bridge live verification number 739.
  • temporary auth file removed by the request trap

The post-merge product gate is complete on the official release SHA.

@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Post-merge release-tip revalidation on Local VPS .15 - 2026-08-13

The release branch advanced after the repair merge. I therefore repeated the official-artifact deploy and live gate on the then-current exact release tip:

  • release tip: d2dd39e
  • official Build App: run 31679380772, conclusion success
  • artifact: omniroute-build ID 9173299611, bound to the same full SHA
  • deployed sentinel: dist/BUILD_SHA=d2dd39e
  • health: healthy, version 3.8.50, provider summary 48 configured / 48 active (339 catalog)
  • PM2: online, 0 restarts
  • rollback backup preserved: dist.bak-3.8.50-32da2a1

Fresh real-audio proof, executed only on VPS .15:

  • TTS source: gtts/default, HTTP 200, 39,360-byte MP3
  • direct control through deepgram/nova-3: HTTP 200; sanitized transcript "Audio bridge live verification number 739."
  • the same MP3 submitted as OpenAI input_audio to text-only openai/gpt-4.1-mini
  • chat result: HTTP 200, Content-Type application/json
  • transparency header: x-omniroute-modality-bridge: audio->text;model=deepgram/nova-3;parts=1
  • sanitized final response: "Audio bridge live verification number 739."
  • direct transcript match and bridged-chat transcript match: true

The API key was selected only inside the VPS process, written to a mode-0600 temporary header file, never printed, and removed together with the audio/payload/response files by the trap. No credential or sensitive transcript is included here.

@diegosouzapw
diegosouzapw deleted the fix/audio-bridge-multipart-runtime branch August 14, 2026 10:42
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ce#10229)

* fix(guardrails): serialize audio bridge multipart safely

* docs(changelog): record Audio Bridge multipart fix

---------

Co-authored-by: backryun <bakryun0718@proton.me>
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