Skip to content

Fix Azure Government Speech routing and transcription errors (main hotfix) - #1948

Merged
Paul Lizer (paullizer) merged 1 commit into
mainfrom
paullizer-government-speech-main
Nov 17, 2026
Merged

Paul Lizer (paullizer) merged 1 commit into
mainfrom
paullizer-government-speech-main

Conversation

@paullizer

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve the configured Government/custom Speech endpoint for managed-identity voice discovery and synthesis; retain public-cloud managed-identity region routing and all key-authentication behavior.
  • Reject failed/interrupted/timed-out chat recognition even after partial text; preserve normal completion/silence, stop/disconnect cleanup, and stable client-safe errors with sanitized diagnostic reasons.
  • Narrow port of Development commit 467921145f593b8704618e02fc8912e0a6528211. Main keeps its inline, SDK-only chat path; no Development Fast Transcription or absent Cosmos boundary-inventory machinery is imported.

Known branch-flow blocker: This separate main-targeted hotfix PR was explicitly requested. .github/workflows/enforce-branch-flow.yml rejects main PRs unless their head is Staging; this PR is therefore expected to fail that check. No policy change/bypass, Staging modification, merge, or Azure deployment is authorized or performed.

These are code-level fixes, not a confirmed diagnosis of a customer incident. No customer logs, deployed version, authentication mode, or exact failing workflow were available.

Linked issue

Refs #1946

Release Notes & Latest Features

  • New Feature
  • Bug Fix
  • UI Enhancement
  • Breaking Change
  • Internal only

Is this visible to end users?

  • Yes
  • No

Is this admin-facing (Admin Settings, governance, deployment, config)?

  • Yes
  • No

Should this become a Latest Feature card?

  • Yes
  • No
  • Already added

Screenshot needed for the card?

  • Yes
  • No
  • Attached

Version bump

  • application/single_app/config.py VERSION third segment bumped, or not needed because this is docs-only
  • deployers/version.txt bumped, or not needed because deployers/ was not changed

Main-local version: 0.261.064 → 0.261.065. No deployer files changed.

Testing / validation

  • python -m pytest functional_tests\test_government_speech.py -q -p no:cacheprovider — passed, 2 fresh-process probes, native Speech SDK 1.47.0. Covers Government/custom endpoint retention, public/key compatibility, required configuration, normal speech/silence/end-of-stream, error/interrupt/timeout with partial results, late cancellation, start failure, real route responses, cleanup, and diagnostic privacy/sanitizer retention.
  • Existing TTS compatibility tests — passed, 10 tests, using external-I/O-blocked real-module imports:
$env:PYTHONPATH = "$PWD\functional_tests"; python -c "from test_support.offline_bootstrap import offline_app_imports; import pytest; ctx=offline_app_imports(); ctx.__enter__(); result=pytest.main(['functional_tests/test_tts_speech_speed_prosody_rate.py','functional_tests/test_tts_voice_fallback.py','-q','-p','no:cacheprovider']); ctx.__exit__(None,None,None); raise SystemExit(result)"
  • python scripts\check_swagger_routes.py application\single_app\functions_documents.py application\single_app\route_backend_speech.py application\single_app\config.py — passed.
  • python functional_tests\route_tests\test_route_blueprint_policy_inventory.py — passed, 6/6.
  • python functional_tests\route_tests\test_route_unauthenticated_policy_contract.py — passed, 4/4.
  • python functional_tests\route_tests\test_route_policy_test_coverage.py — passed, 2/2.
  • python functional_tests\test_docs_app_surface_coverage.py — passed, 7/7, inventory current.
  • python functional_tests\test_docs_site_quality.py — passed, 6/6.
  • python -m py_compile application\single_app\functions_documents.py application\single_app\route_backend_speech.py application\single_app\config.py functional_tests\test_government_speech.py — passed.
  • python -m compileall -q application\single_app — passed.
  • git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check and the corresponding staged diff --cached --check — passed.
  • python -m pytest functional_tests\test_audio_ffmpeg_fallback.py -q -p no:cacheprovider — 6 passed, 2 pre-existing failures: stale exact-version assertions require app 0.250.011 and deployer 1.0.21. Both were independently reproduced against unchanged HEAD sources, which contain 0.261.064 / 1.0.32. Unrelated tests were not modified.

No live Azure/RBAC/network or deployed Government recognition/synthesis smoke test was run. Offline native SDK checks do not establish deployment health. Main has no Cosmos response-boundary inventory/checker to refresh; no storage owner or response handling changed. Main's existing logger uses allowlisted reason rather than Development's newer failure_code field so diagnostic codes remain visible without broad logging changes.

Documentation

  • Release notes updated, or not needed
  • Feature documentation updated, or not needed
  • Fix documentation updated, or not needed

Added docs/explanation/fixes/AZURE_GOVERNMENT_SPEECH_FIX.md and updated the Speech managed-identity setup guide. Release notes and issue progress comments are intentionally deferred to the coordinating session per the current request.

Security checklist

  • New Flask routes include @swagger_route(security=get_auth_security())
  • Settings sent to non-admin frontends use sanitize_settings_for_user()
  • Browser JavaScript is served from local SimpleChat static assets only; no CDN-hosted JS
  • No secrets, keys, connection strings, or local-only artifacts are included

No routes, settings payloads, frontend assets, or authorization policies were added or changed. Modified Speech error paths do not emit audio/transcripts, raw provider errors, access tokens, keys, or tracebacks.

Narrow port of Development commit 4679211, preserving main's SDK-only chat recognition path.

Refs #1946

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit bd08506 into main Nov 17, 2026
9 of 10 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.

1 participant