fix(rectification): separate question slots from model prose
This commit is contained in:
@@ -83,10 +83,9 @@ test("birth-time rectification entry mounts the V9 case-ref chat", () => {
|
||||
test("persisted rectification turns hydrate after the async Case refresh", () => {
|
||||
assert.match(chat, /function messagesFromTurns\(initialTurns:/);
|
||||
assert.match(chat, /useState<RenderMessage\[\]>\(\(\) => messagesFromTurns\(initialTurns\)\)/);
|
||||
assert.match(chat, /finalizeRectificationSpokenAndThinking/);
|
||||
assert.doesNotMatch(chat, /settleRectificationSpokenAndThinking/);
|
||||
assert.match(chat, /text: split\.spoken,/);
|
||||
assert.doesNotMatch(chat, /split\.spoken \|\| raw/);
|
||||
assert.doesNotMatch(chat, /spoken-answer/);
|
||||
assert.doesNotMatch(chat, /splitRectificationSpokenAndThinking|settleRectificationSpokenAndThinking|finalizeRectificationSpokenAndThinking/);
|
||||
assert.match(chat, /text: raw,/);
|
||||
assert.match(page, /key=\{`\$\{rectificationSessionId\}-\$\{rectificationCaseId\}-\$\{rectificationTurns\.length > 0 \? "ready" : "loading"\}`\}/);
|
||||
assert.doesNotMatch(page, /rectificationTurns\.at\(-1\)\?\.id/);
|
||||
assert.match(page, /methods: Array\.isArray\(\(turn\.receipt as \{ methods\?: unknown \}\)\.methods\)/);
|
||||
@@ -248,10 +247,8 @@ test("usage completes or releases without hiding settlement failures", () => {
|
||||
assert.match(run, /answerTokens: 8_192/);
|
||||
assert.match(run, /thinkingTokens: 8_192/);
|
||||
assert.match(run, /activity.changed/);
|
||||
assert.match(run, /if \(!answerText\.trim\(\)\) \{[\s\S]*composeRectificationTurnNarration/);
|
||||
assert.match(run, /bindSpokenToOpenQuestion/);
|
||||
assert.match(run, /CHOICE_CARD_CONTINUATION_ACK/);
|
||||
assert.match(run, /openQuestionPromptFromToolResult/);
|
||||
assert.match(run, /if \(!answerText\.trim\(\)\) return failedAttempt\(attemptId, "empty_stream"\)/);
|
||||
assert.doesNotMatch(run, /bindSpokenToOpenQuestion|CHOICE_CARD_CONTINUATION_ACK|openQuestionPromptFromToolResult/);
|
||||
assert.doesNotMatch(run, /heldSpoken/);
|
||||
assert.match(run, /replace: true/);
|
||||
const narration = readFileSync(
|
||||
@@ -540,9 +537,7 @@ test("time-selection cards use server adoption state and stay mutually exclusive
|
||||
const cardsIndex = messageLoop.indexOf("<RectificationCandidateCards");
|
||||
assert.ok(actionsIndex >= 0 && cardsIndex > actionsIndex);
|
||||
assert.match(chat, /candidateResult\?\.selectionAllowed/);
|
||||
assert.match(chat, /turnOfferedSelection/);
|
||||
assert.match(chat, /rectification-offer-candidates/);
|
||||
assert.match(chat, /showLiveChoiceCard = Boolean\(\s*choiceCard[\s\S]*answeredQuestionIds[\s\S]*!busy/);
|
||||
assert.match(chat, /showLiveChoiceCard = Boolean\([\s\S]*currentQuestion\?\.kind === "choice"[\s\S]*choiceCard[\s\S]*answeredQuestionIds[\s\S]*!busy/);
|
||||
assert.match(chat, /showSelectionCards = Boolean\(\s*candidateResult\?\.selectionAllowed[\s\S]*candidateResult\?\.canAdopt[\s\S]*!showLiveChoiceCard[\s\S]*!busy[\s\S]*!readonly/);
|
||||
assert.doesNotMatch(
|
||||
chat.slice(chat.indexOf("const showSelectionCards"), chat.indexOf("const selectionCardMessageKey")),
|
||||
@@ -637,7 +632,8 @@ test("rectification Agent output stays natural and keeps tool execution silent",
|
||||
assert.match(strategy, /没有更多事件/);
|
||||
assert.match(strategy, /(?:无需|不要求)结束、暂停或保存进度/);
|
||||
assert.match(strategy, /不要一进场就出 A\/B\/C\/D/);
|
||||
assert.match(agent, /没有持久化当前问题时,用自然语言问一件带大概年份的经历/);
|
||||
assert.match(agent, /有持久化 current_question 时,题干与选项完全由结构化槽位和 UI 承担/);
|
||||
assert.match(agent, /正文不得提问、复述、改写或拼接题干/);
|
||||
});
|
||||
|
||||
test("clear current-turn events go through the batch evidence service", () => {
|
||||
|
||||
Reference in New Issue
Block a user