practice: the learner's creation note — optional free-form input carried to partitioner + generators (owner, 2026-09-29)
- dialog: optional 'Anything else?' textarea (typing-only, 2000-char mirror) - API: body gains note? — trimmed, whitespace-only omitted, hard 400 over 2000 - pipeline: note persisted on the set and threaded to both agent stages - agents: THE LEARNER'S NOTE prompt block (present only when set) + the weighed-never-owed stance pinned in both doctrines - fix en route: doubled THE PARAMETERS heading in both prompts since slice 3 (renderParams owns the heading; the literal blocks removed)
This commit is contained in:
@@ -152,6 +152,13 @@ describe("isProblemSet", () => {
|
||||
assert.ok(!isProblemSet({ ...init(), status: "cooked" }));
|
||||
});
|
||||
|
||||
it("the learner's note: optional string, round-trips; non-string refused (owner, 2026-09-29)", () => {
|
||||
assert.ok(isProblemSet({ ...init({ note: "keep it geometric" }), id: "ps_noted" }));
|
||||
assert.ok(!isProblemSet({ ...init({ note: 42 as unknown as string }), id: "ps_badnote" }));
|
||||
const created = practiceStore.createSet(init({ note: "lean toward pricing" }));
|
||||
assert.equal(practiceStore.getSet(created.id)!.note, "lean toward pricing");
|
||||
});
|
||||
|
||||
it("tolerates optional fields — a minimal stub (no error/answer/grade) reads", () => {
|
||||
const minimal = { ...init({ problems: [{ id: "pp_1", chains: [], statement: "", solution: "", rubric: "", status: "generating" }] }), id: "ps_valid" };
|
||||
assert.ok(isProblemSet(minimal));
|
||||
|
||||
Reference in New Issue
Block a user