Skip to content

test(dictation): stop the DC-G1 audio tests failing on a loaded runner by waiting for the audio write - #361

Merged
GeiserX merged 1 commit into
mainfrom
test/dictation-audio-write-wait
Oct 9, 2026
Merged

GeiserX merged 1 commit into
mainfrom
test/dictation-audio-write-wait

Conversation

@GeiserX

@GeiserX GeiserX commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Problem

"DELETE all leaves no audio files" failed on the macOS CI of PR #355 (run 37717273327) with "Expected length 1, Received 0". The DC-G1 and DC-G3 tests read dictation/audio/ as soon as the dictation is inserted. The app writes that audio off the dictation's thread, so on a loaded runner the folder can still be empty at that point. "DELETE one" and "turning dictation.keepAudio off" read the folder the same way. The keepAudio one failed the same way in a full local run on a loaded machine.

Fix

The test's spoken() now waits for the write by asking for the audio over the API (GET /v1/dictations/:id/audio). That route answers once the write in flight has ended, as it does for a user's request. There is no polling and no wider bound.

Users never see this race. The app hands the audio over when the session ends, before decode and insert. From then on the dictation counts as having audio, and the audio route waits for the write. The new slow-write test shows the route waiting through a 3 s write.

Tests

  • The fake helper takes a new --encode-delay MS. Its encode now exits 74 with a warn line after that delay, so the app falls back to WAV that much later. It used to fail on its own usage path.
  • New: with a 3 s encode, the audio is on disk once spoken() returns, and DELETE all removes it. This was red before the wait, with the CI symptom: expected one WAV, received an empty folder. It is green after.
  • Positive control: for a clip, which keeps no audio, the wait fails with 404 no_audio.

Tracked as bead akou-9uk.

…e audio folder

The DC-G1 and DC-G3 tests read `dictation/audio/` right after the insert, but
the app writes the audio off the dictation's thread, so on a loaded runner the
folder was still empty (macOS CI: expected one file, received none).

spoken() now waits for the write through GET /v1/dictations/:id/audio, which
answers once the write in flight has ended, as a user's request does. A
dictation whose write lands 3 s after the insert (the fake helper's new
`--encode-delay`) is listed and deleted; a clip with no audio kept makes the
wait fail with no_audio.

The race is the test's only: the app hands the audio over before the insert
and the audio route waits for the write.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: GeiserX/akou/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d3b47a41-4261-4ef7-b837-fe493393277d

📥 Commits

Reviewing files that changed from the base of the PR and between 2b68a7a and fcdb863.


📒 Files selected for processing (2)
  • scripts/fake-helper.ts
  • tests/dictation-doors.e2e.test.ts


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@GeiserX
GeiserX merged commit 089c5f4 into main Oct 9, 2026
29 checks passed
@GeiserX
GeiserX deleted the test/dictation-audio-write-wait branch October 9, 2026 15:16
GeiserX added a commit that referenced this pull request Oct 9, 2026
…aker and akou start and akou quit finish (#374)

## Problem

On 0.6.4, with the Nemotron diarizer on, every call line waited about 2 s for its speaker before it reached the transcript. The first `akou start` after an install gave up at 3 s while the app was still coming up. `akou quit` on Linux could hang after a call. All three are fixed on main and no release carries them yet.

## What 0.6.5 ships

- A call line is written when its segment closes, and its speaker follows as a correction to the same line (#359).
- `akou start` waits up to 20 s for a slow first launch and stops the idle launcher afterwards (#360).
- `akou quit` always finishes on Linux (#367).
- A search hit names the speaker who said the matched word (#365).
- A file job without speaker labels fetches, and is admitted for, only the models it runs (#364).
- Three messages no longer point at a command that cannot help (#366).
- Behind the scenes: G1 and G3 pass, G4, G6 and G7 stay Partial (#354, #357, #358, #362, #363, #371, #372), the dictation audio tests wait for the write (#361), and `glama.json` (#373).

The Known limitations list in CHANGELOG.md names what the reviews left open: late first lines after a cold start, the four-core x64 line latency, a launcher left by an earlier failed launch, the silent wait in `akou quit`, and two search citation cases.

## The bump

- `scripts/stamp-version.ts --set 0.6.5` wrote the 11 stamped places.
- By hand: the install line in README.md, the image tags and the `--branch` line in docs/server.md and docs/server-hardware.md, and the "Known in" line in docs/troubleshooting.md. The menu bar item still moves, since nothing touched it after 0.6.4.
- docs/gates and docs/ROADMAP.md keep the versions their evidence ran on.
- `stamp-version.ts --check --tag v0.6.5` passes, and `--tag v0.6.6` fails as the control.

The tag is pushed after the merge.
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