Skip to content

Add server-selected strict interview mode - #285

Open
ZuoTso wants to merge 1 commit into
sysprog21:mainfrom
ZuoTso:fix-interview-refresh
Open

ZuoTso wants to merge 1 commit into
sysprog21:mainfrom
ZuoTso:fix-interview-refresh

Conversation

@ZuoTso

@ZuoTso ZuoTso commented Oct 11, 2026 •

Copy link
Copy Markdown

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.sh passed (1,059 tests, no failures or skips; 46 hook checks). Manually verified with make 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.

Selection and refresh behavior

  • Difficulty remains a multi-select choice; the server draws from matching problems, excluding the previous assignment.
  • A signed receipt in session storage remembers the previous problem per tab; clearing or replaying it resets the exclusion.
  • Reloading returns to preflight, then starts a fresh attempt with a different problem; admission is refused with HTTP 409 if none remains.
  • Strict ignores URL problem selection, does not fall back to offline practice, and restores no interview progress.
  • Strict always starts a fresh room, bypassing a pinned development room.

Written for commit 6e9c9b4. Summary will update on new commits.

View guided diff

cubic-dev-ai[bot]

This comment was marked as resolved.

@ColtenOuO ColtenOuO left a comment

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.

Squash the commit and remove Co-authored-by: xxx in commit message.

Addressing review feedback doesn't require adding a new commit message.

@ZuoTso
ZuoTso force-pushed the fix-interview-refresh branch from 8b0e3df to 95a5fd3 Compare October 11, 2026 21:31
@ZuoTso

ZuoTso commented Oct 11, 2026

Copy link
Copy Markdown
Author

Squash the commit and remove Co-authored-by: xxx in commit message.

Addressing review feedback doesn't require adding a new commit message.

Squashed into "95a5fd3" and removed the "Co-authored-by" trailer.

Comment thread src/web/selection.rs
let choices: Vec<_> = problems
.iter()
.filter(|problem| difficulties.contains(&problem.difficulty))
.filter(|problem| Some(problem.variant().page) != previous)

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.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

@jserv

jserv commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Squashed into "95a5fd3" and removed the "Co-authored-by" trailer.

You don't have to make statements like this, as GitHub always tracks commits.

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.
@ZuoTso
ZuoTso force-pushed the fix-interview-refresh branch from 95a5fd3 to 6e9c9b4 Compare October 13, 2026 04:20
@jserv
jserv requested a review from ColtenOuO October 13, 2026 04:53
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.

Refreshing or reusing an interview URL allows restarting a known problem

3 participants