Repository navigation
Add interviewer voice and accent selection - #265
MorganHo001 wants to merge 2 commits into
Conversation
jserv
left a comment
There was a problem hiding this comment.
Avoid using ambiguous Refs #261.
3f094be to
d534a0e
Compare
d534a0e to
b593a00
Compare
b593a00 to
6064e69
Compare
jserv
left a comment
There was a problem hiding this comment.
Rebase latest main branch and resolve conflicts.
ff54275 to
5cb5bc2
Compare
| 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; |
There was a problem hiding this comment.
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.
| examples_hidden, | ||
| interview_mode, | ||
| code_execution_disabled, | ||
| .. |
There was a problem hiding this comment.
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 ..?
| <div class="interviewer-style-controls"> | ||
| <div> | ||
| <label for="interviewer-voice">Jim's voice</label> | ||
| <select id="interviewer-voice"> |
There was a problem hiding this comment.
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.
5cb5bc2 to
b171ee7
Compare
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.