Skip to content

bug(interview): explicit 'done' path bypasses completion_candidate_streak requirement #405

@shaun0927

Description

@shaun0927

Summary

The interview auto-complete path correctly requires completion_candidate_streak >= 2 (two consecutive qualifying turns) before ending the interview. However, the explicit "done" path (when the user types "done") only checks qualifies_for_seed_completion() without any streak requirement, allowing premature interview completion on a single lucky low-ambiguity score.

Root Cause

# authoring_handlers.py — auto-complete path (line ~1028)
if (
    live_score is not None
    and qualifies_for_seed_completion(live_score, ...)
    and state.completion_candidate_streak >= AUTO_COMPLETE_STREAK_REQUIRED  # ✅ streak checked
):
    return await self._complete_interview_response(...)

# authoring_handlers.py — explicit done path (line ~947)
if exit_score is not None and qualifies_for_seed_completion(exit_score, ...):
    return await self._complete_interview_response(...)  # ❌ no streak check

Impact

Suggested Fix

Add a minimum streak check to the done path (at least streak >= 1), or use the same AUTO_COMPLETE_STREAK_REQUIRED gate.

Introduced In

v0.28.3 — commit b6e53ea (#342)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions