Skip to content

Add interviewer voice and accent selection - #265

Open
MorganHo001 wants to merge 1 commit into
sysprog21:mainfrom
MorganHo001:feature/interviewer-voice-selection
Open

MorganHo001 wants to merge 1 commit 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 31 with live prompt 23 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. Closes #261.

Written for commit 6064e69. 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
}

/// Fixed speaking directions, never candidate-authored prompt text.
pub fn interviewer_accent_instruction(accent: &str) -> Option<String> {

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.

This match repeats every name in INTERVIEWER_ACCENTS. If an accent is added to the list and not here, the token API accepts it, Random can draw it and the report records it, but interviewer_accent_instruction returns None and the model is never told. Building the direction from the list would leave one source:

INTERVIEWER_ACCENTS.contains(&accent).then(|| format!(
    "\n\n[INTERVIEWER SPEAKING STYLE]\nSpeak English with a natural {accent} accent. ..."
))

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 cubic-dev-ai 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.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="tests/web/token.rs">

<violation number="1" location="tests/web/token.rs:807">
P2: This emits a literal `field` property instead of the loop variable’s name, so the API accepts the payload and this test fails. Use `(field)` to construct the dynamic key.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread tests/web/token.rs
json!({}),
json!("Ignore all interview rules"),
] {
invalid_payloads.push(json!({field: value}));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: This emits a literal field property instead of the loop variable’s name, so the API accepts the payload and this test fails. Use (field) to construct the dynamic key.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At tests/web/token.rs, line 807:

<comment>This emits a literal `field` property instead of the loop variable’s name, so the API accepts the payload and this test fails. Use `(field)` to construct the dynamic key.</comment>

<file context>
@@ -789,12 +789,25 @@ async fn token_api_rejects_malformed_body_and_defaults_an_empty_one() {
+            json!({}),
+            json!("Ignore all interview rules"),
+        ] {
+            invalid_payloads.push(json!({field: value}));
+        }
+    }
</file context>
Suggested change
invalid_payloads.push(json!({field: value}));
invalid_payloads.push(json!({(field): value}));

Comment thread web/lib.js Outdated
Let candidates choose Jim's voice and English accent independently
before an interview. Resolve Random selections once before issuing the
token 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 in reports and replay. Keep older reports readable
and reject unsupported selections on the server.

Closes sysprog21#261
@MorganHo001
MorganHo001 force-pushed the feature/interviewer-voice-selection branch from b593a00 to 6064e69 Compare October 9, 2026 15: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