Report credits an inaccurate problem restatement as a strength

Open
#613 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@KentChen1112 is already working on this.

Since Nov 8, 2026.

  • #700 by @KentChen1112 — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Inspect the report generation path and the scoring and communication feedback prompts or rubrics referenced by the report: bundle 44, live prompt 33, report prompt 25, rubric 1, and report schema 4. Compare how the scripted restatement is evaluated with the scenario contract and its stated pitfall, then trace where Repeat and communication strengths are produced. Done means inaccurate or incomplete restatements lower Repeat and are reported as communication improvements.

Written by the indexing model from the issue text.

Description

Observed behavior

In a coding-only Editor interview on Single Resale Window (LeetCode 121), ended after Repeat and Example, the candidate's only restatement misstated the output (a price instead of the profit) and never stated that the sale must come after the purchase. The report still scored Repeat 90/100 in the framework assessment, and communicationFeedback.strengths[0] reads: "You clearly restated the problem requirements, including the input format and the goal of maximizing profit."

The same report's scenario contract requires i < j, and its first common pitfall is "Allowing a sell before the buy", so the report had the rule the restatement omitted.

Impact: a candidate who leaves out the key constraint is told their restatement was clear, so the report reinforces the gap instead of naming it.

Expected behavior

A restatement earns credit only for the inputs, output and rules it actually states. A misstated output, or an omitted contract rule that the brief lists as a pitfall, is a gap: it should lower Repeat and appear under communication improvements, not strengths.

Reproduction
  1. Start a coding-only Editor interview and select Single Resale Window.
  2. When Jim asks for a restatement, say: "The input is an integer array that represents the price every day. I need to find out which day is the best day to buy and which day is the best day to sell. To make the profit maximum. And I need to return the price. The maximum price."
  3. Give one example: decreasing prices 6, 5, 4, 3, 2, 1 return 0.
  4. End the interview and generate the report.
  5. Repeat scores 90/100 and communicationFeedback.strengths says the problem requirements were clearly restated.

Observed twice so far, on bundle 14 and bundle 44. The report is model-generated, so how often it happens is not yet measured.

CodeTrial version

codetrial 0.1.0 (cfcd576)

Environment

OS: Windows 11 with WSL2 (Ubuntu), server built from source
Browser: Google Chrome
Language: C++
Interview loop: Coding only, Editor
Problem: single-resale-window (LeetCode 121)
REACTO or STAR step: report (the claim concerns Repeat)
Reconnect: none

Sanitized evidence

Report header: bundle 44; live prompt 33; report prompt 25; rubric 1; report schema 4.

  • Phase scores: Repeat 90 / 100, Example 85 / 100.
  • communicationFeedback.strengths[0]: "You clearly restated the problem requirements, including the input format and the goal of maximizing profit."
  • Scenario contract in the same report: "bestSingleFlip(prices) returns the maximum of prices[j] - prices[i] over all day pairs with i < j, or 0 if no pair gives a positive difference (including a single day)."

The quoted restatement is the scripted line from a test session run to reproduce this, not a real candidate's interview.

Initial analysis

At cfcd576:

  • The rule does reach the report model: the report brief includes variant.contract (src/agent/prompts/assessment.rs:707), which for single-resale-window requires i < j, and the pitfalls list "Allowing a sell before the buy".
  • Nothing tells it to compare the restatement with that contract: EDITOR_SCORING asks only "whether they restated the problem" (assessment.rs:748), and WHITEBOARD_SCORING the same (assessment.rs:763). The phase judge, by contrast, requires "an accurate restatement ... of the relevant inputs, output and rules" (assessment.rs:242).
  • Hypothesis: the report model treats any restatement as complete Repeat evidence. The interviewer's "That's right, you want to maximize the profit from one round trip trade" right after the restatement may also lead it to credit the restatement, since the report rubric, unlike the phase judge, does not say that the interviewer's words never count. The hypothesis is refuted if the brief already carries an accuracy rule I missed, or if a correct restatement in the same setting leaves the Repeat score and the strength unchanged.
  • Proposed change, bounded like #506: add a grounding rule beside the one #506 added (assessment.rs:861) that the contract states the rules, and a restatement is credited only for the inputs, output and rules the candidate stated; a misstated output or an omitted contract rule is a gap, not a strength, and the interviewer's confirmation or rephrasing earns no credit. Add a sanitized regression case where the restatement omits i < j, checking that the brief still carries the contract and that both scoring surfaces carry the rule. Bump the report prompt and bundle versions and the prompt golden as docs/interview-contract-versions.md requires, and keep ledger and schema changes out. A prompt rule lowers the chance of unsupported credit but cannot guarantee it; the PR will say what the test shows and does not.
  • Out of scope: Jim replying "That's right" to the inaccurate restatement, which is live-prompt behavior and belongs in a separate issue.
Public data confirmation
  • I removed credentials, session tokens, candidate recordings, and personal interview content from this public report.
Dominant language
Rust
Stars
236
Forks
153
Avg merge
1d 9h
Merged PRs (30d)
187

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sysprog21/codetrial

All issues in sysprog21/codetrial

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.