Skip to content

fix(speaker-recognition): restore green integration CI - #343

Merged
AnkushMalaker merged 3 commits into
devfrom
fix/speaker-recognition-ci
Jul 23, 2026
Merged

fix(speaker-recognition): restore green integration CI#343
AnkushMalaker merged 3 commits into
devfrom
fix/speaker-recognition-ci

Conversation

@AnkushMalaker

Copy link
Copy Markdown
Collaborator

The Speaker Recognition Tests workflow has been red on every run since 2026-07-15. Four independent problems, three of which had to be fixed before the suite could go green.

1. BuildKit disabled but required — the actual CI failure

Step 10/21 : RUN --mount=type=cache,target=/root/.cache/uv uv sync ...
the --mount option requires BuildKit.

run-test.sh exported DOCKER_BUILDKIT=0, forcing the legacy builder, while the Dockerfile uses RUN --mount=type=cache for the uv cache. The legacy builder rejects that flag outright, so docker compose up died ~90s in on every run.

At the last green commit (087a1060) the Dockerfile had a plain RUN uv sync ... with no --mount, and DOCKER_BUILDKIT=0 was already present. The cache mount was re-added later without dropping the export.

Swapped for BUILDKIT_PROGRESS=plain: the cache mount works, and we keep the flat greppable build log that disabling BuildKit was presumably meant to preserve. The workflow already runs docker/setup-buildx-action, so BuildKit was being set up and then discarded.

2. uv run discarded the CPU torch selection

run-test.sh synced --extra cpu, then bare uv run resynced to the default extra set. The CI log shows torch==2.9.0+cpu installing at 06:58:39, immediately followed by Downloading nvidia-cudnn-cu12 (674.0MiB), nvidia-cublas-cu12 (566.8MiB) and 13 more — roughly 40s and ~12GB of pure waste per run.

Pinned to uv run --extra cpu --group test.

3. Phase 7 asserted a contract that never existed

Phase 7 required a words field on every /diarize-and-identify segment, but that endpoint only diarizes and identifies — it has never transcribed, on main or dev. Phases 7-8 were added after the last green run (which had only Phases 1-6), so Phase 7 has never passed once.

Repointed at the structure the endpoint actually guarantees, rather than bolting transcription onto a diarization endpoint — that would change production behaviour and add a per-call Deepgram cost to satisfy a test. Word-level coverage is not lost: Phase 8 still validates it against /v1/diarize-identify-match, which is handed a transcript to match.

4. Workflow gated on a branch that no longer exists

Both triggers were [main, develop], but develop was retired in favour of dev and is gone from the remote. PRs targeting dev never ran this suite at all — only PRs into main did. Now [main, dev].

ios-ipa-build.yml and android-apk-build.yml carry the same stale reference; left alone to keep this scoped.

Verification

Run locally against the real service in a container with real HF/Deepgram credentials — not mocks:

1 passed in 110.92s
✅ Evan enrollment: PASS (confidence: 0.736)
✅ Katelyn enrollment: PASS (confidence: 0.967)
✅ Conversation processing: PASS (18 segments, 18 identified)
✅ Segment structure: PASS (18 segments)
✅ Diarize-identify-match: PASS (7 matched words in 1 segments)

Phase 8 executed for the first time in this run. The 4 test_enrollment_*.py tests also pass (12s), though no workflow runs them — worth wiring up separately.

Caveat: the BuildKit change is read directly off the CI error and could not be exercised locally (docker on my machine is a podman shim that accepts --mount regardless). This PR's own run is the first real test of it.

Three independent problems kept the speaker-recognition workflow red on
every run since 2026-07-15.

1. BuildKit disabled but required (the actual CI failure)

   run-test.sh exported DOCKER_BUILDKIT=0, forcing the legacy builder,
   while the Dockerfile uses `RUN --mount=type=cache` for the uv cache:

     Step 10/21 : RUN --mount=type=cache,target=/root/.cache/uv uv sync ...
     the --mount option requires BuildKit.

   At the last green commit (087a106) the Dockerfile had a plain
   `RUN uv sync ...` with no --mount, and DOCKER_BUILDKIT=0 was already
   present. The cache mount was re-added later without dropping the
   export, so `docker compose up` died ~90s in on every run.

   Swap DOCKER_BUILDKIT=0 for BUILDKIT_PROGRESS=plain: the cache mount
   works and we keep the flat, greppable build log that disabling
   BuildKit was presumably meant to preserve. The workflow already runs
   docker/setup-buildx-action, so BuildKit was set up and then discarded.

2. `uv run` discarded the CPU torch selection

   run-test.sh synced `--extra cpu`, then bare `uv run` resynced to the
   default extra set, pulling PyPI CUDA torch plus 15 nvidia wheels on
   top of the CPU build - ~40s and ~12GB of pure waste per run. Pin the
   invocation to `uv run --extra cpu --group test`.

3. Phase 7 asserted a contract that never existed

   Phase 7 required a `words` field on every /diarize-and-identify
   segment, but that endpoint only diarizes and identifies - it has never
   transcribed, on main or dev. Phases 7-8 were added after the last green
   run (which had only Phases 1-6), so Phase 7 has never passed once.

   Point it at the structure the endpoint actually guarantees rather than
   bolting transcription onto a diarization endpoint. Word-level coverage
   is not lost: Phase 8 still validates it against
   /v1/diarize-identify-match, which is handed a transcript to match.

Verified locally against the real service in a container with real
HF/Deepgram credentials: 1 passed in 110.92s, with Phase 8 executing for
the first time. The BuildKit change is read directly from the CI error
and cannot be exercised locally (docker here is a podman shim that
accepts --mount regardless), so it needs a CI run to confirm.
The workflow gated both its push and pull_request triggers on
[main, develop], but develop was retired in favour of dev years ago and
no longer exists on the remote (origin/HEAD -> origin/dev).

The practical effect was silent: PRs targeting dev never ran the speaker
recognition suite at all, so the only runs came from PRs into main. Point
both triggers at dev so the tests actually gate the branch we merge into.

ios-ipa-build.yml and android-apk-build.yml carry the same stale
reference and are left alone here to keep this change scoped.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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 Plus

Run ID: 627593cc-26bf-4f3b-9d5b-560bbcc2f1e4

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 fix/speaker-recognition-ci

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.

The iOS and Android workflows had two overlapping gaps:

  push:         branches: [main, develop]   # develop no longer exists
  pull_request: branches: [main]            # dev never included at all

develop was retired in favour of dev, so the push trigger's second entry
was dead. Worse, the pull_request trigger only ever covered main, so app
changes merged into dev were never built - not by the stale entry, and
not by the PR gate either.

Four merged PRs touched app/** with base=dev and got no build: #319, #315,
#311, #233. Point both triggers at [main, dev].
@AnkushMalaker
AnkushMalaker merged commit 7abaf8d into dev Jul 23, 2026
3 checks passed
@AnkushMalaker
AnkushMalaker deleted the fix/speaker-recognition-ci branch July 26, 2026 00:12
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