Skip to content

test(stt): broaden http-remote plugin test surface #414

@Coldaine

Description

@Coldaine

Context: PR #410 added live integration tests for the happy path of the http-remote Parakeet plugin (exact-transcript equality on `test_1.wav`). The Codex review of that PR flagged real regression surface still uncovered by any test.

Task: Add `#[ignore]`-gated live tests (or stub-level unit tests in `crates/coldvox-stt/src/plugins/http_remote.rs`) that cover:

  • Chunked `process_audio`: split `test_1.wav` into 4-8 chunks and call `process_audio` once per chunk, then `finalize`. Assert same transcript as single-buffer flow.
  • Double `finalize` / post-finalize `process_audio` reuse semantics. Should buffer reset? New utterance_id increment?
  • Non-200 responses: 4xx/5xx from the service → `SttError::TranscriptionFailed` with the status code and body preserved in the message. (Partially covered by existing stub tests — extend or add live variant.)
  • Malformed JSON response body → plugin should not panic; should surface a clear error.
  • Bearer auth / custom headers: `bearer_token_env_var` resolves from env and the resulting Authorization header is correct; `headers` on config are applied.
  • Actual `main` bootstrap: a test that goes through the genuine config-discovery path (not `Settings::from_path` directly) to catch discovery-order regressions.

Each of these is one more `#[ignore]` test or a stub-level unit test. Pick the cheapest that gives confidence.

Depends on: PR #410 merged (uses the test infrastructure landed there)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kilo-duplicateAuto-generated label by Kilokilo-triagedAuto-generated label by Kilo

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions