free-recall explain tool: the quizzing-mechanic switch (owner 2026-09-27)
Sycophancy mitigation as a structural commitment: the model writes its full correctAnswer (plus explanation, in that order) BEFORE the learner sees the question; the commitment rides the persisted call args, is revealed on submit, and grades his free text in the model's next reply — the client never grades free recall. - tools.explain setting (segmented 'Quizzing — Multiple choice | Free recall' in Agent settings' Tools group): free arms explain and drops quiz for BOTH agents (prober variant carries no nodeId, same pattern as the probe quiz); mechanics keys never pass filterEnabledTools — quiz stays unwritable (the 2026-09-19 wedge ruling stands) - doctrine lives pi-natively in the tool descriptions (owner ruling — no conditional system-prompt chunks): explain carries the commitment rule; the MC option-building craft moved out of the prompt into the quiz description; shared/20-question-tools.md slims to the quiz-agnostic core - display seams: parseExplainInput (LaTeX-debris restoration included), dock text-mode with an 'I don't know' row (kbd row 0), AnsweredCard reveal (The answer / Why, no verdict chips), [Explain answer] format - phases/plan seams recognize both quizzing tools' nodeId tags; explain answers deliberately feed no ledger evidence (no client grading to key on — a future ruling can parse the model's grade) 1049/1049 tests, typecheck/lint/build green.
This commit is contained in:
@@ -405,3 +405,47 @@ describe("derivePlanStatuses (the map tracks position, not completion)", () => {
|
||||
assert.equal(derivedNodeStatus(later, "c"), "upcoming");
|
||||
});
|
||||
});
|
||||
|
||||
// ─── the explain mechanic derives position identically (owner 2026-09-27) ──
|
||||
|
||||
describe("derivePlanStatuses: tagged explain calls move the map like quiz calls", () => {
|
||||
const tree: PlanTree = {
|
||||
nodes: [
|
||||
{ id: "a", title: "A" },
|
||||
{ id: "b", title: "B" },
|
||||
],
|
||||
edges: [{ from: "a", to: "b" }],
|
||||
version: 1,
|
||||
};
|
||||
const explainPart = (nodeId: string | undefined) => ({
|
||||
type: "tool-explain",
|
||||
state: "output-available",
|
||||
input: nodeId === undefined ? {} : { nodeId },
|
||||
});
|
||||
type Part = { type: string; state: string; input: unknown; output?: unknown };
|
||||
const msg = (...parts: Part[]) => ({ parts });
|
||||
|
||||
it("a tagged explain call is the current position; earlier ones are visited", () => {
|
||||
const st = derivePlanStatuses(tree, [
|
||||
msg(explainPart("a")),
|
||||
msg(explainPart("b")),
|
||||
]);
|
||||
assert.equal(st.current, "b");
|
||||
assert.deepEqual([...st.visited], ["a"]);
|
||||
});
|
||||
|
||||
it("untagged explain calls move nothing", () => {
|
||||
const st = derivePlanStatuses(tree, [msg(explainPart(undefined))]);
|
||||
assert.equal(st.current, null);
|
||||
assert.equal(st.visited.size, 0);
|
||||
});
|
||||
|
||||
it("mixed mechanics (an old quiz record, then an explain) still derive one run", () => {
|
||||
const st = derivePlanStatuses(tree, [
|
||||
msg({ type: "tool-quiz", state: "output-available", input: { nodeId: "a" } }),
|
||||
msg(explainPart("b")),
|
||||
]);
|
||||
assert.equal(st.current, "b");
|
||||
assert.deepEqual([...st.visited], ["a"]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user