Repository navigation
Credit only the restatement a candidate stated - #700
KentChen1112 wants to merge 3 commits into
Conversation
31e4744 to
82d59fa
Compare
jserv
left a comment
There was a problem hiding this comment.
Keep Git commit messages concise. Omit unnecessary details such as “This is report prompt 27 and bundle 48; live prompt 35, rubric 1, and report schema 4 are unchanged.”
95001bf to
b766431
Compare
|
Shortened the commit message to two paragraphs: the problem, and what the rule now credits and counts as a gap. The version numbers, band values and test location are dropped from it; they remain in the description and docs/interview-contract-versions.md. Amended in b766431; the code is unchanged from 95001bf. |
b766431 to
6cd5993
Compare
6cd5993 to
ab0026d
Compare
ab0026d to
9e1c025
Compare
9e1c025 to
18aa506
Compare
c354c96 to
b32b05b
Compare
|
Reworked as requested: rebased onto main (no conflicts), ran /codetrial-review and resolved its findings, killed the surviving mutants with new assertions, and squashed the series into two commits: 7411c63 (report grounding) and b32b05b (Repeat reopening). The large-change review for b32b05b is recorded. Earlier "Fixed in" hashes now map to these two commits. |
b32b05b to
9ca3282
Compare
ChenYuHsuan0719
left a comment
There was a problem hiding this comment.
Checked at 9ca3282a with a probe test added to tests/agent/restatement_comments.rs, using the Single Resale Window Python starter as the template and a recorded spoken restatement:
as you go sell after buy: recorded as a second Repeat row, sourceeditor_snapshotsell after buy: refusedthink out loud as you go: refused
da0cb66 to
d19dce1
Compare
|
Reworked as requested: rebased onto main (no conflicts), ran /codetrial-review and resolved its findings, killed the surviving mutants, and squashed the series into two commits: 7411c63 (report grounding) and d19dce1 (Repeat reopening, now limited to comments typed while no other step is recorded). The large-change review for d19dce1 is recorded and signed, and all checks pass. Earlier "Fixed in" hashes now map to these two commits. |
d19dce1 to
27d20f1
Compare
| let quoted = format!( | ||
| "\"{}\"", | ||
| bounded_model_text(quote.trim(), MAX_PHASE_JUDGE_QUOTE_CHARS) | ||
| bounded_model_text(quote.trim(), MAX_PHASE_JUDGE_QUOTE_CHARS).replace('"', "'") |
There was a problem hiding this comment.
The report credits a Repeat comment only through the row's quote, and that quote is cut to MAX_PHASE_JUDGE_QUOTE_CHARS (110). A restatement typed as one long comment, say the input and output followed by the sale must be on a later day, gets recorded, but the report reads the quote without the rule at its end and must score that rule as left out. restatement_quoted cuts the needle the same way, so quoting the same comment again counts as already recorded and cannot recover the tail. Either keep a Repeat comment quote whole, or have quote_is_grounded refuse an editor quote longer than the cap so the judge quotes a shorter span. Add a case with a rule past the 110th character.
Model text stored for a later prompt, such as a phase row's summary and quote or a pause-time note, is bounded so a line break inside it cannot write a line of its own. The bound dropped the break outright, so the words on either side were glued together: a quote copied across two comment lines reached the report as "the list of pricessell after buy", and an interviewer's summary as "statedtheinvariant". A character that could break a prompt line now becomes a space, as the transcript and the integrity details already do, so the text stays one line and keeps its words apart. The tests that pinned the glued text now expect the spaces. Change-Id: I74b56b8e494550a76e2ef34e4e033c349629cfe2
27d20f1 to
1525f16
Compare
|
Thanks for the thorough reviews. Before the next push, a question on scope: the branch is now about 1,450 lines, mostly in the Repeat comment path (quoting long comments in parts, telling starter text from the candidate's edits). The matrix and permutation tests cover source, timing, Repeat state and parts, and two independent reviews found and fixed further gaps. Would you prefer I keep closing edge cases of the comment path here, or land the stated-restatement rule and the reopening as they are and move remaining comment-path cases, such as quoting long comments in parts, to follow-up issues? |
1525f16 to
fbaf9d9
Compare
| let mut starter = vec![false; words.len()]; | ||
| for line in given { | ||
| let line = line.split(' ').collect::<Vec<_>>(); | ||
| let least = MIN_STARTER_WORDS_KEPT.max((line.len() * 4).div_ceil(5)); |
There was a problem hiding this comment.
kept_in_order takes a starter line's words wherever they fall in the candidate's comment line, however many of the candidate's own words sit between them, so a sentence the candidate wrote is cut as an edited starter line as soon as it holds four in five of a starter line's words in order. With the Python starter line # Definition for a binary tree node. that the tree problems share, # For a binary tree, return the label of each node seen from the left loses for a binary tree and node, so a quote of that sentence is refused for Repeat and the typed restatement reaches no row. Also bound how far apart the kept words may fall, for example by requiring them to be most of the words between the first and the last one kept, so a word or two added inside a starter line is still cut while a sentence that spreads its words across itself is not, and add this sentence as a case.
The report credits a rule written as an editor comment only when a repeat phase row quotes it, but the phase judge skipped Repeat once it was recorded, so a comment typed during Repeat after a correct restatement never got that row. While Repeat is the only step recorded at an editor, the judge may now record it again from a comment that adds an input, output or rule, and its prompt says so only then. A comment counts for Repeat, first or added, only while no other step is recorded, this answer's included in any order, so one typed after an example or an approach earns nothing; a late spoken restatement still counts, one also typed is read as speech then, and the judge's prompt then says that only speech records Repeat. At a whiteboard the Repeat checkpoint counts only when it is the first checkpoint image: the browser takes one image for each step new in a progress update, so a Repeat recorded in a later update than another step has its image taken after the candidate moved on, while one recorded in the same update comes first, in REACTO order, as a comment recorded from the same judge answer does at an editor. A row keeps 110 characters of its quote, and the report reads a comment only through it, so a rule typed past the 110th character of one long comment would be scored as left out. A Repeat quote from a comment longer than that is now refused, and the judge's prompt says to quote such a comment in parts, each its own repeat entry, which may overlap so that a rule in a short tail past the cut reaches six words; a judge that keeps quoting it whole records nothing from it, a known limit. Once a part is recorded from an answer, its other repeat entries are tried before its other steps, so an example in the same answer does not close Repeat on the parts after the first, and repeat entries are counted apart from the other steps, so a comment in many parts is read to its end. Parts are kept ahead only within the answer that recorded the first one, a known limit the contract row names. A long spoken restatement is still recorded, since the report reads it whole in the transcript. A comment the Repeat rows already quote, read together in the order they were recorded so that one quoted in parts is found too, is not recorded again; a row's quote is found by the double quotes around it, one inside stored as a single quote, since a comment or the judge's summary may also hold "Quote: ". The judge's six-word floor applies to its quote, and the comment lines are read joined with the starter's words cut out of them: a line left exactly as a starter comment line, however short, is cut whole, and a candidate's comment line that keeps, in order, at least three of a starter comment line's words and four in five of them, the kept words more than half of the words from the first of them to the last, is that line edited, and the words it keeps are cut, wherever the candidate added or took out words, so the starter's words never ground or pad a quote. Longer starter lines are matched first, so a shorter one that begins a longer one does not leave the rest of it uncut. A short starter line such as "@return {number}" inside the candidate's own sentence stays theirs, and so does a sentence that spreads what it keeps across itself, such as "For a binary tree, return the label of each node seen from the left" beside "Definition for a binary tree node."; every starter comment line the problem pages serve is checked, unchanged, with a word or two added and spread through a sentence. A known limit: a sentence keeping four in five of a short starter line's words with a few of its own among them, such as "for a TileTree that is one node", is still cut. The cut reads every comment line against every starter comment line, so a judge answer makes it once, when a step first needs it, rather than once for each of its entries. A rule comment under six words counts only when a row quotes it with lines the candidate typed around it; the editor rule says so. Close sysprog21#613 Change-Id: Iac3eaf9fb64b6f611a7ccb76e0350f08877a164c
fbaf9d9 to
0f29f92
Compare
jserv
left a comment
There was a problem hiding this comment.
Rebase the current branch onto the upstream default branch and resolve any conflicts. Run /codetrial-review in AI agents (use $codetrial-review in Codex) and resolve all identified issues. Rework the series into minimal, logically coherent commits, squash closely related commits, and ensure all commit messages follow the project’s rules.
| "as a comment in\n the code that a `repeat` phase row in the rolling assessment \ | ||
| quotes\n (a pause-time note does not date a comment, and a comment under six \ | ||
| words is\n not recorded on its own and counts only when a row quotes it with \ | ||
| the comment\n lines around it)", |
There was a problem hiding this comment.
A repeat row can also be speech recorded after the candidate moved on: while Repeat is unrecorded and another step is, quote_is_grounded skips the comment branch and records a late restatement as candidate_speech, which restatement_open does not bound. A candidate who goes straight to an example, then types # the sell day must come after the buy day while fixing a same-day bug and says the same words, gets a repeat row quoting that comment, so this sentence credits the comment as written before they moved on. Name the source here and in the bundle 49 row (a comment that a repeat row from editor_snapshot quotes), since that is the only kind of repeat row the phase judge writes only before the candidate moves on.
Problem and behavior
A report scored Repeat 90/100 and listed "You clearly restated the problem requirements" as a communication strength after the candidate misstated the output as the maximum price and never said that the sale must come after the purchase (reproduced on cfcd576, details in #613). The report brief carries the scenario contract, which requires
i < j, but the scoring rubrics asked only whether the candidate restated the problem, and the interviewer's "That's right" right after the restatement was a second source of unearned credit. After this change a restatement is judged as it stands when the candidate first moves on from it to any other step, counting what they stated in their own words, wrote as a comment in the code or on the board, corrected themselves, or settled with their own question by then; a misstated input, output or rule, a left-out input or output, or a relevant rule the scenario posed on screen that it still lacks is a gap, not a strength; and the interviewer's confirmation or rephrasing earns no credit.Approach
A bounded report-prompt change following #506: one grounding rule placed beside the rule #506 added, and "accurately restated" in both the editor and whiteboard scoring rubrics. The contract is the private specification the interviewer never reads out, so a rule only the contract holds, such as Single Resale Window's zero-profit case, is not a gap;
i < jstill is, because the screen says "selling on a later day". One timing boundary decides what the restatement holds: the moment the candidate first moves on from it to any other step. Before then, a question, a self-correction or a written comment counts, so asking or correcting during Repeat is never penalized; after then, nothing does, so a rule found by asking while coding, by fixing a same-day bug, or by restating late does not erase the gap, and nothing is inferred from the code or the board. A new{written}value renders "as a comment in the code that a rolling-assessment note records for Repeat" at an editor and "on the board" with the condition that the Repeat checkpoint shows it at a whiteboard, since neither the final code nor a later board image shows when something was written. So that the editor note can exist, a second commit keeps Repeat open to the phase judge while it is the latest recorded step, for a comment that adds to the restatement, and closes it once another step is recorded (live prompt 37). A gap is tied to rubric 1's anchors: it puts Repeat below 90-100, one left-out rule with the rest right is a minor gap (75-89), and a left-out input or output, or more than one left-out rule, is a material gap (60-74). A restatement that only leaves parts out is still a correct partial one and completes the step, as the phase judge holds, so it does not reach 0-39; a misstated input, output or rule is placed by the anchors, which reserve 0-39 for directly observed incorrect work. The phase judge reads an editor comment but at a whiteboard only the transcript, so a rule written only on the board is credited by the report and not seen by the phase judge. This is report prompt 27, live prompt 37 and bundle 49; rubric 1 and report schema 4 are unchanged, and the ledger and schema stay out of scope. The regression test lives in a new tests/agent/report_grounding.rs because tests/agent/prompts.rs is at its line ceiling.Validation
cargo test --test agentpasses (321) on this tree, including the newcontract_is_not_credited_as_candidate_restatement: its first assertions are preconditions showing the brief carries the contract, the on-screen "selling on a later day" and the interviewer's confirmation, and its clause loop is the regression check that both surfaces' rules carry each clause with{written}and{material}filled in. The rule was checked by reading against a table of candidate behaviors: complete restatement, a contract-only rule left out, the on-screen rule left out, a question during Repeat, a question after moving on or after skipping to code,j = i + 1in the final code, a self-correction during Repeat, an uncorrected misstatement, an input or output settled by a question, and a late restatement after a failed run. The test shows the rule reaches every report reviewer; it does not show that the model heeds it. One model run at report prompt 27 on the first version of this rule, before the review changes, with the same scripted restatement, scored Repeat 70 against 90 at bundle 44, and the communication strength narrowed from "clearly restated the problem requirements" to "clearly restated the goal", but the improvements still did not name the gap, and Example also fell from 85 to 70, so one pair of runs cannot separate the rule's effect from run-to-run variance; the rule as it now stands has not been run against the model. Known limit: a question lost to speech recognition, with only Jim's answer in the transcript, may still read as a gap../scripts/test.sh rustpasses on this tree, which the pre-push gate receipt requires; it skipped desktop clippy and tests (no libwebkit2gtk) and cargo-deny. The full gate's review-memory-tests and shell-syntax still fail locally, identically on a clean main in files this change does not touch: the local GitHub CLI 2.46.0 lacks attestation flags, and the local shellcheck 0.11.0 reports SC2319 at scripts/git-post-commit.sh:13; both passed in CI on the first head. Not checked locally: one browser test that needs ffmpeg and actionlint.Close #613