delete the batch practice-problems module (superseded by practice sessions)
Owner ruling 2026-10-04: the module is a sunk cost, retrievable from history if ever revisited. Removed: core practice contracts + pipeline helpers, the PracticeStore port + adapter + data dir path, server service + API routes (sets, clusters picker, practice aborts), the practice pages + dialog/exam/list UI, chain-table's Generate handoff, sidebar nav, activity-dock practice rows, and the partitioner/ problemGenerator/grader model roles (BACKGROUND_MODEL_ROLES 8 → 5). Survivors, moved to core/chains.ts (pure + browser-safe): ReasoningChain, chainsForSelection, formatChainLine — the chain table and graph emission still consume them.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* Extraction abort is idempotent by design (aborting with nothing in
|
||||
* flight is success — the blob is gone either way) -> 200.
|
||||
*/
|
||||
import { abortExtraction, abortJob, abortTurn, practice } from "@/src/server";
|
||||
import { abortExtraction, abortJob, abortTurn } from "@/src/server";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
let body: unknown;
|
||||
@@ -27,11 +27,9 @@ export async function POST(req: Request) {
|
||||
return Response.json({ error: "Invalid JSON body" }, { status: 400 });
|
||||
}
|
||||
const { kind, id } = (body ?? {}) as { kind?: string; id?: string };
|
||||
if ((kind !== "job" && kind !== "extraction" && kind !== "turn" && kind !== "practice") || typeof id !== "string" || id === "") {
|
||||
return Response.json({ error: 'Body must be {kind: "job"|"extraction"|"turn"|"practice", id: string}' }, { status: 400 });
|
||||
if ((kind !== "job" && kind !== "extraction" && kind !== "turn") || typeof id !== "string" || id === "") {
|
||||
return Response.json({ error: 'Body must be {kind: "job"|"extraction"|"turn", id: string}' }, { status: 400 });
|
||||
}
|
||||
// Practice row keys carry ":" (setId:gen:problemId) — the charset
|
||||
// admits it for every kind (job/turn/extraction ids never use it).
|
||||
if (!/^[A-Za-z0-9:_-]+$/.test(id)) {
|
||||
return Response.json({ error: "Invalid id" }, { status: 400 });
|
||||
}
|
||||
@@ -51,14 +49,6 @@ export async function POST(req: Request) {
|
||||
}
|
||||
// kind === "extraction": true cancellation; idempotent (nothing in
|
||||
// flight is success — same dock outcome)
|
||||
if (kind === "practice") {
|
||||
// practice restructure (owner, 2026-09-29): id is the ROW key —
|
||||
// abort routes by shape (a gen row kills THAT problem only; the
|
||||
// partition row ends the run; a grade row drops that grade).
|
||||
// Idempotent like extraction (nothing in flight is success).
|
||||
practice.abortPracticeRow(id);
|
||||
return Response.json({ ok: true });
|
||||
}
|
||||
abortExtraction(id);
|
||||
return Response.json({ ok: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user