Skip to content

feat(interview-kit): parallel interview tracks (phase 3) - #32

Merged
wboudiche merged 15 commits into
mainfrom
feat/interview-tracks
Sep 23, 2026
Merged

wboudiche merged 15 commits into
mainfrom
feat/interview-tracks

Conversation

@wboudiche

Copy link
Copy Markdown
Owner

Phase 3 of multiple kinds of interview kit. A round can now hold several tracks running in parallel — a technical conversation and an RH screen on the same day — each with its own questions, interviewers and feedback sheets. The round closes when every track is done.

Spec: docs/superpowers/specs/2026-09-22-interview-tracks-design.md · Plan: docs/superpowers/plans/2026-09-22-interview-tracks.md

What changes

  • Starting a round: the picker becomes a checklist of active templates plus "No template"; each tick becomes a track. First scheduling pre-ticks the job's default; a round that already has tracks pre-ticks its own, so "Another round" (and re-scheduling the same round) is one click that changes nothing by surprise.
  • Candidate page: one tab per track, each showing its state — "2/3", "no interviewers", "…" while generating, "failed" if generation errored. Recruiters can add a track mid-round, or remove one nobody has written in. The round's last track cannot be removed.
  • Interviewers see only their own track — its questions, their own sheet, and after submitting, that track's other submitted sheets. They sit on one track per round (enforced by a database rule and a 409 on the panel editor).
  • Panel: assigned per track; the interviewers bar lists each track's people.
  • Closing: a round closes once every track has at least one interviewer and all of them have submitted, so a track nobody was assigned to keeps the round open instead of being silently skipped. "Mark as interviewed" still closes everything by hand.
  • Freeze and regeneration are per track: a submitted RH sheet locks RH's questions only.
  • No new table. A track is an interview_kits row plus the interview_assignments rows sharing its (application, round, track). The key is derived from the template (t<id>, or default without one) and never changes.
  • API: tracks on the kit read (plus the one-track kit field, unchanged, for existing clients); ?track= on the kit write endpoints, optional when a round has one track; interview_template_ids when scheduling; POST/DELETE /api/applications/{id}/interview-tracks; track on interviewer rows, sheets and live events.
  • Migration f3b7d2e8a915: re-keys phase-2 templated kits (and their panel rows) from default to t<template_id>, and tightens the interviewer uniqueness rule to one track per person per round. Its downgrade refuses once any round has two tracks, rather than silently dropping one. Round-tripped against real Postgres.

One-track rounds behave and look exactly as today — the point every pre-existing test pins down.

Decisions made during implementation

  1. Interviewers picked before a round has any kit sit on the default track and join the round's first track once tracks exist. Missing this stranded them: the assigned interviewer got a 404 when saving (found in review, fixed with a test).
  2. Re-scheduling the same round pre-ticks that round's own tracks. Pre-ticking the job default meant confirming the dialog deleted the round's other tracks and their panel rows (found in the whole-branch review).
  3. Reopening a round with a different template starts with an empty panel; phase 2 carried the whole panel over. An RH round rarely wants the technical panel. Behaviour change worth noting in the release.
  4. A generation abandons its write if its track was removed while the model was running, rather than recreating the track.
  5. "Generate" now takes the application row lock, since it can create a track and move panel rows.

Known limitations (deferred)

  • The board's "2/2 sheets in" badge doesn't hint that a round is still waiting on an unstaffed track.
  • Two behaviours work but have no test pinning them: the per-track question freeze on the scheduling path, and unsaved edits surviving a tab switch.
  • Adding a track publishes a live event that says "generating" even when that track immediately failed for lack of an LLM provider; the UI refetches and shows the real state.
  • 24 minor findings in total were triaged as non-blocking by the whole-branch review.

Test plan

  • Backend uv run pytest -q: 837 passed
  • Frontend npx vitest --run: 308 passed (49 files)
  • npm run lint (tsc) and npm run build clean
  • uv run ruff check src/ tests/: 474 (466 baseline + 10 B008 from the new router's Depends(...) defaults, − 2 lint regressions this branch cleared)
  • Migration forward, back (refusal included) and forward again on real Postgres; model and migration agree
  • After merge: back up the database, apply the migration, then run a round with Technical + RH in parallel — staff each track, check an interviewer sees only their own, and confirm the round closes only once both are in

🤖 Generated with Claude Code

wboudiche and others added 15 commits September 22, 2026 00:30
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…planning

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…losing rule

A track's key is derived from its template (t<id>, or default without
one); the migration re-keys phase-2 templated kits and their panels to
match, and an interviewer now sits on at most one track per round. A
round can close on its own only when every track is staffed and every
sheet is in, so an unstaffed RH track cannot be silently skipped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The kit read lists every track the caller may see — all of them for a
recruiter, only their own for an interviewer — and keeps the one-track
kit field for existing clients. The blind rule is scoped to the track,
and closing a round, by hand or automatically, stamps every track.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Recruiters name a track with ?track= (optional when the round has one);
an interviewer's own assignment names theirs. Freezing and answered-
question protection are per track, and a generation whose track was
removed while the model ran abandons instead of recreating it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…und had a kit

An interviewer assigned before a round had any kit sits on the model
default track. generate_kit's first kit now lands on the job's default
template's track key, not "default", so those rows were left stranded
with no matching kit. adopt_orphan_rows moves any round row on a track
with no kit onto the round's first track when the first kit is created.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The panel endpoint reports each interviewer's track and edits one
track's panel at a time; someone already on another track of the round
is refused. A panel picked before the round has any kit still goes on
the default track, as before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Scheduling takes interview_template_ids and makes one track per choice,
each generated on its own; a track that needs a model fails alone when
none is configured. Scheduling the same round again reconciles its
tracks, and another round copies the chosen tracks forward with their
panels. Interviewers picked before scheduling join the first track.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…eduled

A recruiter can add a parallel track to the live round, generated on
its own, and remove one nobody has written in. The last track stays,
and removing a track re-checks whether the round is now complete.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The kit section's body becomes TrackKitView, driven by one track's kit,
sheets and mutations; the hooks expose the round's tracks and name a
track on requests when there is more than one. Nothing visible changes:
the section's existing tests pass untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… one

A round with several tracks shows one tab each, with its submitted
count, and every tab stays mounted so unsaved edits survive switching.
Recruiters add a track from the templates the round lacks, and remove
one nobody has written in. A one-track round looks as before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ach one

The round-start picker becomes a checklist; another round preselects
the tracks the last one ran. With several tracks the panel is shown
and assigned per track, and someone already on one track cannot be
ticked for another. One-track rounds keep the single picker and panel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Backend fixes from the phase-3 whole-branch review: add_track now adopts
orphan panel rows the way generate_kit's no-kit branch does; generate_kit
takes the application row lock, since it can create a track and rewrite
panel rows and this also closes a two-concurrent-first-Generate race; and
run_generate_kit's post-lock guard now abandons whenever its track's kit
is gone, not only when one existed at dispatch — no test depended on the
create_kit fallback that guard made unreachable, so it and the now-unused
had_kit variable are removed. Also wraps an E501 line and fixes an I001
import order this branch introduced in the test suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ab, refresh the board on track removal

Frontend fixes from the phase-3 whole-branch review: the schedule/reopen
picker now preselects the live round's tracks whenever it already has
kits, in both picker modes — re-scheduling the SAME round (reject ->
re-invite -> schedule) no longer silently offers the job default and
drops every other track on confirm. A track's tab badge now shows
"failed" for an errored kit instead of looking like a healthy one.
Removing a track now also invalidates the jobs query, since removing the
last unstaffed track can close the round and change the board.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@wboudiche
wboudiche merged commit 740f5c4 into main Sep 23, 2026
2 checks passed
@wboudiche
wboudiche deleted the feat/interview-tracks branch September 23, 2026 15:58
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.

1 participant