Skip to content

Extend practice feedback and problem bank checks - #54

Open
jserv wants to merge 28 commits into
mainfrom
dev
Open

jserv wants to merge 28 commits into
mainfrom
dev

Conversation

@jserv

@jserv jserv commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

This branch widens what a practice session gives back and tightens what the problem bank has to prove. Candidates can write their own test cases and see what their code returns, practice without a camera when the interview is not recorded, and get a post-interview debrief that states the hint rung they reached and the level they practiced for, while the report is refused if it names the published problem. The lobby keeps a longer history whose reports can be reopened, keeps due reviews across level changes, resets a failed review to one day, and shows progress by topic. The bank now accepts original exercises, every judge needs five cases including a boundary one, and a C starter that returns an array has to say who frees it. On the server, a provider whose credentials are refused leaves rotation, and report-model reviews during quiet pauses are capped per interview. CI gains a check that the release image matches the manifest's Rust version and a weekly run that requires the pinned avatar model, and the legacy migration paths for the git hooks and vendored files are removed. The interview contract moves to bundle 8, live prompt 3 and report prompt 8, with each step recorded in docs/interview-contract-versions.md.

Verified with ./scripts/test.sh at each of the 18 commits, not only the tip, and all pass; the tip runs 672 Rust tests and 523 browser tests with nothing skipped. The guarantees the commits claim were checked by breaking the guarded line and confirming a test failed: a prompt edit without a version bump, the interim review cap and its limit of 72, 401 and 403 provider refusal, the published-name check, judge case coverage, the C ownership note, and the version parity check. The candidate case fixes were reproduced before and after in Chromium. One upstream test this branch does not touch, setup_page_accepts_credentials_and_writes_the_primary_config_file in tests/cli.rs, failed once under load and passed on every rerun.

Deliberately left for follow-up: a report for an original exercise can still mention LeetCode, because the published-name check keys off a source title those exercises do not have; a sixth candidate case blocks the test run instead of being refused on its own; a null expected value breaks the palindrome checker; a mistyped class-case method breaks the whole C++ or Java compile; only four of the five candidate cases reach the reviewer; the parity check passes when neither version can be read; and the failed-review test cannot fail as written. A checkout that still holds web/vendor/avatar/jim.vrm from before the model moved to the browser cache now fails verify-vendor.sh until the file is deleted.


Summary by cubic

Practice sessions now return a fuller debrief, accept candidate-written test cases, and make the camera optional when the interview isn't recorded. The problem bank and CI are stricter, and a report that names the published problem is repaired instead of sent.

Practice and reports

  • The interview contract moves to bundle 8 and report schema 2; schema 1 reports remain scored, and prompt-only bumps no longer invalidate stored scores.
  • The debrief adds the hint rung reached, volunteered hints, and practiced level.
  • Browser-run candidate cases run beside judge cases and reach the interviewer and report prompt; class judges read return types from the contract so a missing expected value still builds, and operation arity is checked before a class case runs.
  • Unrecorded interviews can skip the camera, with output confirmation and microphone still required; the signed reason appears as a neutral report condition.
  • The lobby keeps 500 attempts, reopens reports past the full-report cap, preserves due reviews across level changes, resets a failed review to one day only when it is the newest outcome, and groups progress by topic.
  • Quiet-pause interim reviews are capped per interview (CODETRIAL_MAX_INTERIM_REVIEWS, default 12, max 72).
  • Malformed neighboring entries no longer hide valid review history or candidate-case checker failures.

Problem bank and tooling

  • The bank accepts original problems, adding fixed-capacity-ring-buffer; rubrics are generated, every judge needs five cases including a boundary case, and C starters returning arrays must state who frees them.
  • The BST contract allows an empty tree, scoped to that exercise, and malformed bank input is refused consistently.
  • Providers rejected with 401 or 403 leave rotation until the credential is replaced, which takes effect after a server restart.
  • CI checks the release Rust image against Cargo.toml's rust-version and runs a weekly avatar-model check.
  • Legacy git-hook and vendored-avatar migration paths are removed; a stale web/vendor/avatar/jim.vrm must be deleted or verify-vendor.sh fails.

Written for commit 528f490. Summary will update on new commits.

Review in cubic

A prompt edit used to invalidate stored scores, so every change had
to be added to a browser-side list that nothing forced anyone to
update. Compare the recorded rubric and schema versions instead: a
prompt-only bump leaves scores comparable and the list goes away. The
golden digest now covers every prompt builder, so an edit that skips
its version bump fails the gate rather than a review.
A report could name the published exercise or the practice site it came
from, which hands back the source the interview scenario deliberately
withholds. Validate against the selected problem at the exact paths
a candidate reads, and let Gemini repair a violation so one stray
title does not cost the whole report.
A verdict arrived with nothing to learn from it. Carry debrief metadata
on generated and fallback reports alike, under a second report schema
so the addition is recorded rather than inferred. Schema 1 reports
stay scored, because existing history is still the candidate's.
Spaced-repetition reviews were filtered by the level chosen for new
problems, so changing level silently hid work already due. Choose
due reviews before that filter applies. A failed review drops to a
one-day interval, which is what being due is for.
Full reports are capped, so an older attempt disappeared from the
lobby altogether rather than ageing out of detail. Keep a compact
index past the cap holding enough to list and reopen an attempt,
and stop asking the page map about entries the cap has already retired.
A candidate could only run the judge's cases, so the cases they
thought to try left no trace in the evidence. Saved typed cases run
beside the judge's without touching its totals, and what the browser
observed reaches both the interviewer and the report prompt, where
testing instinct is worth reading.
Every bank entry had to be an imported exercise carrying a published
title and examples, which tied the bank to one study plan and left
no way to write a problem for this tree. An entry may now declare
itself original and carry no published fields: its title comes from
the variant, validation stops demanding a source, and the plan checks
pass it over. Rubrics become generated output, because the title an
entry shows is no longer a constant the bank can state.
A hint count alone cannot separate a candidate who asked once for
a deep hint from one the interviewer kept prompting unasked. Pass
the rung reached and how many hints were volunteered, and say in the
prompt that both are context: a volunteered hint is weaker evidence
than a requested one and neither is a numeric deduction.
A missing or declined camera turned a candidate away from an interview
that never needed video. Require one only when recording is enabled,
since that is what the recording notice describes. The reason the
camera went unused is signed into the integrity trail so the report
reads a neutral condition rather than absence of evidence.
Quiet-pause reviews and the final report spend the same provider quota,
and the existing rate limits still allow seventy-two reviews in a long
interview, ahead of the report that matters. Bound them per interview,
fixed when the interview starts so a config reload cannot raise the
ceiling underneath a session already running.
The pool probe removed a project only for an explicit 429, so a project
whose credential had been revoked stayed in rotation and failed later
at token minting, where the candidate sees it. Read 401 and 403 as
refusals too. Everything else still counts as available, because
refusing an interview over a brief network fault is the worse error.
A candidate practising for a senior role got the same verdict as one
practising for a junior role, with nothing on the page saying which
bar had been applied. Pass the selected level as coaching context
and show it beside the verdict. The decision stays against the fixed
mid-level bar, which the prompt now states twice because it is what
a reviewer is most likely to let drift.
Progress listed recurring weaknesses but never which topics had
actually been practised, so a topic failed twice and a topic never
attempted looked alike. Group attempts by the topics their problems
carry, with passes and the date each was last seen.
A judge could ship with two cases and none of them near a boundary,
which makes a passing run weak evidence of anything. Require five cases
and one the declared argument types admit as small at their own domain,
rather than treating a single JSON shape as a boundary everywhere. The
exception file carries its own count, so a line left behind after
its cases are authored fails instead of excusing that judge forever.
A C starter that returns an array through returnSize says nothing
about who frees it, and a candidate reading it has no way to find
out. Require the starter comment to state that the caller frees the
returned storage.
The release workflow pinned a toolchain that nothing compared against
what the crate claims to build with, so the two could drift until
a release failed. Declare the minimum in the manifest and fail the
gate when the Linux image no longer matches it.
The avatar browser check accepts an unavailable avatar, so that a
developer without the model can still run the flow. That also means
nothing would notice the pinned model going away. Run the flow on a
schedule with the fallback disallowed, which checks the pin somewhere
without making the local run depend on it.
The hook installer and the vendor fetch carried branches for trees laid
out the way this one no longer is, and nothing left in the repository
can reach them. Require the current behavior outright. The docs go
with them: the Java lane needs a working toolchain rather than a
version nobody here tested, and the connection notes drop a claim
about which assertions moved that was never checked.
cubic-dev-ai[bot]

This comment was marked as resolved.

Keep cases, reports, and judge bounds aligned in browser and agent.
cubic-dev-ai[bot]

This comment was marked as resolved.

Apply failure resets only to newer review outcomes.
Keep valid history and checker failures visible under hostile inputs.
cubic-dev-ai[bot]

This comment was marked as resolved.

Keep empty-tree contracts and malformed bank input consistent.
cubic-dev-ai[bot]

This comment was marked as resolved.

cubic-dev-ai[bot]

This comment was marked as resolved.

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