Skip to content

Add interviewer voice and accent selection - #265

Open
MorganHo001 wants to merge 2 commits into
sysprog21:mainfrom
MorganHo001:feature/interviewer-voice-selection
Open

MorganHo001 wants to merge 2 commits into
sysprog21:mainfrom
MorganHo001:feature/interviewer-voice-selection

Conversation

@MorganHo001

@MorganHo001 MorganHo001 commented Oct 8, 2026 •

Copy link
Copy Markdown

Let candidates choose Jim's voice and English accent independently during preflight. Both controls support Random, resolved on the server before token issuance and retained across reconnects. Default preserves GEMINI_VOICE and leaves the original interview instructions unchanged.

Reject unsupported selections and append only predefined accent instructions. Update the live prompt contract and golden fixtures while keeping existing prompt content unchanged.

Validation: ./scripts/test.sh passed after rebasing onto upstream main. The Node suite passed 1000 tests with no failures; one Java-dependent test was skipped. An editor timing assertion failed initially, then passed both in isolation and on the full rerun. Coverage includes real-browser selection, narrow layouts, server validation, random resolution, and reconnect setup.

Seventeen Rust tests remain ignored by default. Optional cargo-audit, actionlint, ruff, shellcheck, commentflow, and shfmt checks were unavailable. Live Gemini accent quality has not been evaluated.

Closes #261


Summary by cubic

Lets candidates choose the interviewer's voice and English accent independently during media preflight instead of relying on a server-wide default. Both controls support Default and Random; Random is resolved server-side once before the token is issued and stays fixed across reconnects. Default voice preserves GEMINI_VOICE, and Default accent leaves the interview instructions unchanged. Unsupported selections are rejected with a 400. The controls stack on narrow screens.

Accent selection appends a fixed speaking-style direction to the live prompt without changing interview content or assessment rules. The contract bundle moves to 33 with live prompt 24 and report schema 3; the report prompt and rubric stay unchanged. The server stamps the resolved voice and accent into reports, including incomplete ones, and report and replay cards show them; older reports stay readable without invented defaults. Token and runtime tests exercise every accepted voice and accent through the HTTP route, the signed metadata, and the final bootstrap instructions, so a validator that refuses all explicit selections fails. Closes #261.

Written for commit b171ee7. Summary will update on new commits.

View guided diff

cubic-dev-ai[bot]

This comment was marked as resolved.

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Avoid using ambiguous Refs #261.

Comment thread src/web/token.rs
@MorganHo001
MorganHo001 force-pushed the feature/interviewer-voice-selection branch from 3f094be to d534a0e Compare October 9, 2026 08:10
@jserv
jserv requested review from ColtenOuO and alanhc October 9, 2026 08:43
Comment thread src/agent.rs
Comment thread web/lib.js Outdated
Comment thread src/web/token.rs Outdated
@MorganHo001
MorganHo001 force-pushed the feature/interviewer-voice-selection branch from d534a0e to b593a00 Compare October 9, 2026 15:37
cubic-dev-ai[bot]

This comment was marked as resolved.

@MorganHo001
MorganHo001 force-pushed the feature/interviewer-voice-selection branch from b593a00 to 6064e69 Compare October 9, 2026 15:49

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rebase latest main branch and resolve conflicts.

@MorganHo001
MorganHo001 force-pushed the feature/interviewer-voice-selection branch 2 times, most recently from ff54275 to 5cb5bc2 Compare October 11, 2026 01:58
@jserv
jserv requested a review from ColtenOuO October 11, 2026 02:20
Comment thread src/agent.rs
pub const REPORT_PROMPT_VERSION: u32 = 18;
pub const RUBRIC_VERSION: u32 = 1;
pub const REPORT_SCHEMA_VERSION: u32 = 2;
pub const REPORT_SCHEMA_VERSION: u32 = 3;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this need a schema bump? Bundle 7 added server-stamped optional fields (debrief, topics, practice level) without one: "server-stamped fields are versioned at the browser sanitizer". With schema 3, a tab still running the previous build treats every report made after the deploy as unsupported and unscored, though no score or existing field changed. Keeping schema 2 and adding interviewerVoice/interviewerAccent as optional fields at the sanitizer would follow that precedent.

Comment thread src/agent/prompts.rs Outdated
examples_hidden,
interview_mode,
code_execution_disabled,
..

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The .. drops the exhaustive destructure, which made every new RuntimeOptions field fail to compile here until the prompt builder decided what to do with it. And since the accent is appended in bootstrap_with_rounds after this builder runs, a direct call to build_instructions_for_plan returns a prompt without it. Could the accent direction be appended here instead, with voice: _ named rather than ..?

Comment thread web/interview.html
<div class="interviewer-style-controls">
<div>
<label for="interviewer-voice">Jim's voice</label>
<select id="interviewer-voice">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These options, INTERVIEWER_VOICES/INTERVIEWER_ACCENTS in src/agent.rs, and the literal lists in tests/browser/interviewer-voice.test.js are kept in sync by hand, and nothing compares them. A voice added only to the Rust list passes every test, never shows up here, and can still be drawn by Random. A test reading these options and comparing them with the Rust constants would tie them together.

Let candidates choose Jim's voice and English accent independently
before an interview. Resolve Random choices before token issuance so
reconnects keep the same speaking style. Default preserves GEMINI_VOICE
and the original interview instructions. Stamp the resolved style into
server-owned report metadata so Random sessions remain traceable.
Keep the fields optional at the browser sanitizer. Version the live
prompt and refresh its golden fixture without changing the upstream
report prompt, rubric, or schema.

Closes sysprog21#261
Require valid interviewer choices to pass the token API and retain
their signed metadata, so a validator that refuses every choice fails.
Check the final bootstrap instructions for the selected round plan
and example visibility, including sessions with an accent, so lost
settings cannot silently fall back to defaults.
@MorganHo001
MorganHo001 force-pushed the feature/interviewer-voice-selection branch from 5cb5bc2 to b171ee7 Compare October 12, 2026 02:49
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.

Support configurable and randomized interviewer voices and accents

3 participants