Skip to content

fix(tinyhumans): build the backend-error classifier without the voice feature - #8526

Merged
M3gA-Mind merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/tinyhumans-voice-const-ungated
Nov 2, 2026
Merged

M3gA-Mind merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/tinyhumans-voice-const-ungated

Conversation

@M3gA-Mind

Copy link
Copy Markdown
Collaborator

Summary

  • openhuman-tinyhumans fails to compile on main unless the voice feature is on. This PR makes it build without voice again.
  • HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE moves from voice/reply_speech.rs, which only exists with voice, to inference/backend_error_code.rs, the backend-error classifier, which always exists.
  • voice::reply_speech re-exports the constant, so its public path and callers stay the same. The message text and classification behaviour don't change.

Problem

  • fix(voice): map ElevenLabs BYOK config errors, keep hosted failures reported #8521 (f05c2c1, kept by 1b7c03c) made inference/backend_error_code.rs reference crate::voice::reply_speech::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE unconditionally. The reference is in is_hosted_voice_unavailable_copy and in its test.
  • lib.rs declares pub mod voice under #[cfg(feature = "voice")], and voice is not a default feature (default = ["openhuman-embed/default", "jev", "media"]).
  • So any build of openhuman-tinyhumans without voice fails with error[E0433]: cannot find voice in the crate root at backend_error_code.rs:143, plus the same error at backend_error_code_tests.rs:295 and its knock-on E0277s. That includes the coverage suite's -p openhuman-tinyhumans --features storage-sqlite run (scripts/ci/rust-coverage.sh).

Solution

  • The constant now lives next to the classifier that matches on it, which is not gated on a feature.
  • inference re-exports it with pub use backend_error_code::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE, and voice::reply_speech re-exports it from there with pub use crate::inference::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE. map_hosted_voice_error and reply_speech_tests still read it as super::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE.
  • The classifier test refers to it as super::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE instead of going through crate::voice.

Submission Checklist

If a section does not apply to this change, mark the item as N/A with a one-line reason. Do not delete items.

  • N/A: no new tests, because this is a build fix with no behaviour change; the existing hosted_voice_unavailable_copy_is_backend_owned_and_not_reported_again test covers the moved constant and now also compiles without voice
  • N/A: diff coverage, because the changed lines are a constant, two re-exports and a path change; the existing classifier test runs them
  • N/A: coverage matrix, because this is a behaviour-only change (a build fix)
  • N/A: no feature IDs are affected, because no feature behaviour changes
  • No new external network dependencies introduced
  • N/A: no release-cut surface changes
  • N/A: no linked issue; the main build regression was found while checking member PR fix(voice): classify hosted live-voice billing refusals instead of reporting them #8520

Impact

  • Build only: openhuman-tinyhumans compiles again without the voice feature, as in the coverage suite's --features storage-sqlite run. Builds with voice are unchanged.
  • No runtime, user-visible, security or migration impact. The message text is identical.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/tinyhumans-voice-const-ungated
  • Commit SHA: 132f444025667b19ffed94b126bccc338229ab92

Validation Run

  • N/A: pnpm --filter openhuman-app format:check, because no app files changed
  • N/A: pnpm typecheck, because no TypeScript changed
  • Focused tests: not yet run on this commit. Remote CI is paused; the prepush is queued to resume.
  • Rust fmt/check (if changed): not yet run on this commit. For reference, the base without this fix (main e09a88e + chore: finish upstream module roll-up integration #8512's pins) gives cargo check -p openhuman-tinyhumans --lib --tests: --features storage-sqlite 6 errors (this bug), --features storage-sqlite,voice 0 errors. The check with this fix is pending.
  • N/A: Tauri fmt/check, because no Tauri changes

Validation Blocked

Behavior Changes

  • Intended behavior change: none
  • User-visible effect: none

Parity Contract

  • Legacy behavior preserved: yes. The message text is the same, the public path voice::reply_speech::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE is kept through the re-export, and classification is unchanged.
  • Guard/fallback/dispatch parity checks: the existing classifier test

Duplicate / Superseded PR Handling

  • Duplicate PR(s): none
  • Canonical PR: this one
  • Resolution (closed/superseded/updated): N/A

… feature

inference/backend_error_code.rs referenced
crate::voice::reply_speech::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE, but
the voice module is cfg(feature = "voice") and voice is not a default
feature, so openhuman-tinyhumans failed to compile without it (E0433),
including the coverage suite's --features storage-sqlite run.

Move the constant next to the classifier, which is not gated, and
re-export it from reply_speech so its path and callers are unchanged.
@tinysweeper

tinysweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: 132f444025667b19ffed94b126bccc338229ab92

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 4 of 4 files.
Pull request purpose (title): fix(tinyhumans): bui…

Diagnostics and supporting details

Full summary

Pull request purpose (title): fix(tinyhumans): build the backend-error classifier without the voice feature. Tiny Sweeper completed its review; deterministic results follow.

Review snapshot

Change surface Files Review signal Count
Production 3 Active findings 0
Tests 1 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 0 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

`HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE` moves from the `voice`-gated `voice/reply_speech.rs` into `inference/backend_error_code.rs` alongside the classifier that matches on it. `inference/mod.rs` re-exports it (`pub use backend_error_code::HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE`), and `voice/reply_speech.rs` re-exports it from `inference`, keeping its public path stable. Internal references in `is_hosted_voice_unavailable_copy` and the classifier test now resolve locally via `super::`/module scope rather than through `crate::voice`. The message string and classification semantics are unchanged.

Features

  • Internal refactor — Relocate HOSTED_VOICE_UNAVAILABLE_USER_MESSAGE into ungated backend-error classifier: The constant now lives in a module that always compiles, so the backend-error classifier no longer depends on the `voice` feature and `openhuman-tinyhumans` can build with `--features storage-sqlite` (without `voice`). Message text is identical. (crates/openhuman-tinyhumans/src/inference/backend_error_code.rs pub fn body_flags_malformed(err: &str) -> bool {)
  • Modified — Classifier internal reference resolves locally: `is_hosted_voice_unavailable_copy` reads the constant from its own module instead of `crate::voice::reply_speech`, removing the unconditional cross-module reference that caused E0433 without `voice`. (crates/openhuman-tinyhumans/src/inference/backend_error_code.rs pub fn body_flags_malformed(err: &str) -> bool {)
  • Added — Public re-export via inference module: `inference` now publicly exposes the constant, and `voice::reply_speech` re-exports it from there, preserving the existing public path so callers do not break. (crates/openhuman-tinyhumans/src/inference/mod.rs use openhuman_embed::__host::inference_registry::{, crates/openhuman-tinyhumans/src/voice/reply_speech.rs const LOG_PREFIX: &str = "[voice_reply]";)

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 4 files; 0 findings. _The code index is behind this pull request (indexed at `e9dae140000f`), so retrieved context may be out of date._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 4 files; 0 findings. _The code index is behind this pull request (indexed at `e9dae140000f`), so retrieved context may be out of date._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Tests lane, Answered with no findings, characterizes the change as a pure relocation that preserves the `voice`-path invariant via the updated classifier test.
  • Lane summary: Pure relocation: the constant moves from `voice/reply_speech.rs` into `inference/backend_error_code.rs` (so the classifier is no longer gated on the `voice` module), with a re-export in both files preserving the old path. No behavioural change, so no new test is needed; the existing `hosted_voice_unavailable_copy_is_backend_owned_and_not_reported_again` test is updated to the new path and still pins the invariant. _The code index is behind this pull request (indexed at `e9dae140000f`), so retrieved context may be out of date._

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Commits lane is Answered and reports no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files. _The code index is behind this pull request (indexed at `e9dae140000f`), so retrieved context may be out of date._

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Description lane is Answered and confirms the diff matches the stated intent: the constant and its doc comment move into the ungated module, re-exports preserve the old path, and the text is unchanged.
  • Lane summary: The diff matches the description: the constant and its doc comment move from the `voice`-gated `reply_speech.rs` into the ungated `backend_error_code.rs`, `inference/mod.rs` and `reply_speech.rs` re-export it, and the two internal references now resolve locally. The text is unchanged and no caller path breaks; one detail the body omits is that `inference` gains a new `pub use` of the constant, which is minor and not worth a finding. _The code index is behind this pull request (indexed at `e9dae140000f`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.000363
  • Tokens: 174411 input · 4386 output · 33792 cached · 184 embedding
  • Updated: 2026-11-02T17:31:52Z
Head State Pass summary
132f44402566 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-11-02T17:31:52Z)

tinysweeper 0.1.2

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T17:33:20.390054Z 132f444 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

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

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

Diagnostics

Total spend: $0.0004

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Nov 2, 2026
@M3gA-Mind
M3gA-Mind merged commit 3a15d05 into tinyhumansai:main Nov 2, 2026
18 of 23 checks passed
M3gA-Mind added a commit to senamakel/openhuman that referenced this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant