Repository navigation
Add server-selected strict interview mode - #285
Conversation
ColtenOuO
left a comment
There was a problem hiding this comment.
Squash the commit and remove Co-authored-by: xxx in commit message.
Addressing review feedback doesn't require adding a new commit message.
8b0e3df to
95a5fd3
Compare
Squashed into "95a5fd3" and removed the "Co-authored-by" trailer. |
| let choices: Vec<_> = problems | ||
| .iter() | ||
| .filter(|problem| difficulties.contains(&problem.difficulty)) | ||
| .filter(|problem| Some(problem.variant().page) != previous) |
There was a problem hiding this comment.
Excluding only previous means the pool never shrinks: each reload is a fresh uniform draw from every other problem at those levels. A candidate who already knows some of them can keep reloading until one of those comes up, which is the "practice a familiar problem" case #185 is about. Each reload also sends out a new agent while the old room keeps its capacity slot. If that is acceptable for a self-assessment mode, say so in the limits paragraph of docs/interview-selection.md. Otherwise, a follow-up could store the draws in a bounded, signed set (or keep them on the server per account) so that reloading moves through the pool instead of re-rolling.
There was a problem hiding this comment.
This is an intentional limitation of the opt-in self-assessment mode. Excluding only the previous problem reduces immediate repetition but does not prevent deliberate re-rolling. Strict retains the existing agent cleanup policy, accepting temporary capacity overlap. Both trade-offs are now documented in docs/interview-selection.md.
You don't have to make statements like this, as GitHub always tracks commits. |
95a5fd3 to
6e9c9b4
Compare
6e9c9b4 to
afd7a92
Compare
2a49315 to
e03a0e2
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment was marked as outdated.
This comment was marked as outdated.
e03a0e2 to
08a21b1
Compare
08a21b1 to
29c232f
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
29c232f to
abc6eef
Compare
This comment has been minimized.
This comment has been minimized.
|
#440 adds a 10 s deadline on |
abc6eef to
cdcc80e
Compare
jserv
left a comment
There was a problem hiding this comment.
Rebase latest main branch and resolve conflicts.
cdcc80e to
3624b7c
Compare
| await connectLiveKit(connection, preflight, presenting); | ||
| state.connected = true; | ||
| if (strict) updateRunAvailability(); | ||
| if (strict && !whiteboard) nodes.editor.disabled = false; |
There was a problem hiding this comment.
This turns the editor back on without checking anything else. A pause or a behavioral round_state can arrive while connectLiveKit is still running, and this line then makes the editor editable when it should stay locked. Suggest nodes.editor.disabled = state.paused || codingClosed();, like the other places that turn the editor back on.
| "connection", | ||
| providerUiState("degraded", "The interview connection dropped.").message, | ||
| strict | ||
| ? "The Strict Interview connection dropped." |
There was a problem hiding this comment.
When the start fails after the room was joined, the catch block in connect calls joined.disconnect(). That fires this handler later, which replaces the specific failure banner (the timeout or Egress refusal) with this generic one. The catch has already cleared state.room, so setting the banner only when state.room === room would keep the real reason on screen.
| // waits for a signed-in account and suggested difficulties to settle. | ||
| start.disabled = | ||
| (selectionMode === "practice" && !problem) || | ||
| (selectionMode === "strict" && |
There was a problem hiding this comment.
On a deployment that requires login, a signed-out candidate who picks Strict sees Start labeled "Use GitHub to start", but this condition keeps it disabled (accountHistory !== true). So the sign-in-on-Start path through signInFirst is never reached, and clicking does nothing. Either let Strict through when signInFirst is set, or change the label for Strict.
Practice needs reproducible problem links, while strict interviews should prevent candidates from choosing known problems. Preserve difficulty selection in both modes and start a new strict attempt on reload instead of recovering the previous interview.
3624b7c to
5c53026
Compare
ColtenOuO
left a comment
There was a problem hiding this comment.
LGTM, very nice PR :) Thanks for your contribution and patience.
|
Thank @ZuoTso for contributing! |
Summary
Introduce an opt-in Strict Interview mode for more honest self-assessment, reducing the ability to repeatedly practice a familiar problem through URL selection or page refresh.
Strict assigns problems on the server based on the selected difficulty, while Practice remains unchanged. A normal same-tab refresh starts a new attempt and excludes the previous assignment when its receipt is available. Session recovery is not included.
Testing
./scripts/test.shpassed (1,141 tests, no failures or skips; 49 hook checks). Manually verified withmake web.Closes #185
Summary by cubic
Adds an opt-in Strict Interview mode that assigns a matching problem server-side after media preflight, closing #185 by preventing repeated practice of a known problem via URL or refresh. Practice mode keeps its current behavior; Strict requires GitHub sign-in.
Selection and refresh behavior
Written for commit 5c53026. Summary will update on new commits.